Closed L03TJ3 closed 11 months ago
Please use the same image behavior of the wallet for the feed. The height should be variable, the width fixed.
That way, independently of the image we use, the image will always display. It's a better way to build the feed in terms of user experience, and also it facilitates for editorial when creating the images.
The way this is implemented is the opposite of the wallet, and it's going to crop all the images OR generate extra hassle for the editorial. It also limits our capabilities, as, using the current logic, we won't be able to have tall or very thin posts in the feed.
@patpedrosa Based on documentation + gpt: When you set height: auto in React Native (what we use on both dapp/wallet), the system doesn't understand how to compute the auto value, which means the height will default to zero, making the image not display.
I am absolutely clueless about how this worked in the past (as the code seems to be written 18 months ago. we can not give no height or auto height. we need to specify a value.
and then the only reference I have is Figma Private Zenhub Image
with a fixed height of 187, which I rounded up to 190
Added to this. wallet has been changed to 190 now as well as yesterday Tiago reported: 'no images are showing' and this was because of the 'auto' tag
@L03TJ3 well look at the wallet code. We probably have a utility for calculating the right perspective, you can also ask Alexey how the wallet does that.
@sirpy it was just set to 'auto' before nothing else. this was released yesterday and stopped showing/loading images either spec has changed, or something made it work. but according to docs/stackoverflow etc it should not have worked in the first place
but I'll chat with Alexey
@L03TJ3 The notion that it simply suddenly stopped working seems very strange and illogical to me. Please verify and double check that nothing has changed regarding code for images in the last release
@sirpy it is strange to me how it worked in the past. whenever I apply an height: 'auto' to any image it disappears (height is 0) consistently
but I found this to tackle it: https://faq.dailymotion.com/hc/en-us/articles/360022841393-How-to-preserve-the-player-aspect-ratio-on-a-responsive-page#:~:text=In%20the%20CSS%20for%20the,56.25%25%20%3D%2016%3A9.
is for iframe, but applies the same
We want to show/add the news-feed widget from the wallet onto protocolUI (claimPage)