Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ABW-1983: Fix the issue with brokenImage #663

Closed
wants to merge 2 commits into from

Conversation

maciek-rdx
Copy link
Contributor

@maciek-rdx maciek-rdx commented Aug 14, 2023

Jira ticket: ABW-1983

Description

Fixes the issue with brokenImage. It's a problem common to all images that are displayed using LoadableImage under the hood, so the change is pretty significant. I think it looks better now for most cases. The list of NFTs validator brokenImage placeholders still doesn't look that great, but I think it's not that big of a deal.

Notes

There are some limitations to applied solution that I highlighted here.

How to test

Retest the layout of loadable images, when the image link is broken across the app.

Screenshot

Before After
1before 1after
Before After
3before IMG_3561
Before After
4before IMG_3562
Before After
5before IMG_3563
Before After
6before IMG_3560
Before After
8before 8after
Before After
9before 9after

Copy link
Contributor

@CyonAlexRDX CyonAlexRDX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm the screenshots does show improvements for sure, but the NFTs list is probably not not how we want it to look and NFTs are arguable the most important images... should you be using different content modes and resizeable view modifier perhaps? perhaps @kugel3 has some ideas?

}
.frame(height: .imagePlaceholderHeight)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we use aspectRatio? or even just set the frame?

Copy link
Contributor Author

@maciek-rdx maciek-rdx Aug 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we use aspectRatio?

There is a number of possible expectations when it comes to layout. aspectRatio is not a silver bullet. I think it's safe to reuse the sizing behavior of the image in the context of brokenImage.

or even just set the frame?

I'm not sure if I understand your comment correctly @kugel3 - it was previously set and that's the source of the entire issue. We can't simply set the frame here as this component works in a number of different contexts.

@kugel3
Copy link
Contributor

kugel3 commented Aug 14, 2023

When did this issue first appear? As far as I remember, this used to work fine everywhere.

@maciek-rdx
Copy link
Contributor Author

maciek-rdx commented Aug 14, 2023

When did this issue first appear? As far as I remember, this used to work fine everywhere.

Not sure when exactly the regression got introduced, but all the recent changes to that file belong to you @kugel3 .

Screenshot 2023-08-14 at 19 21 40

@maciek-rdx
Copy link
Contributor Author

maciek-rdx commented Aug 14, 2023

So I reused the logic of imageView sizing. This time the placeholder of validator got hit (the size of the thumbnail is smaller than the placeholder itself, see screenshot). I hope it's acceptable, if not - I can dig further.

We have two more things out there as well - the placeholder and loadingView, although I'd not keep myself busy with them as nobody signalized problems, and I guess we have more important things to do now.

@maciek-rdx maciek-rdx requested review from CyonAlexRDX and kugel3 and removed request for CyonAlexRDX August 14, 2023 17:53
@maciek-rdx
Copy link
Contributor Author

Fixed in competing PR

@maciek-rdx maciek-rdx closed this Aug 18, 2023
@CyonAlexRDX CyonAlexRDX deleted the ABW-1983-Fix-the-issue-with-brokenImage branch August 31, 2023 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants