Page MenuHomePhabricator

[e.cash] Add max height to image styles to fix image on what's eCash page
ClosedPublic

Authored by Kronkmeister on Aug 13 2024, 02:45.

Details

Summary

Adding an explicit height of 830px; to HeroCtn in sub-page-hero styles and removing the min height.
The spiningcoin animation was ranging into the navbar, looks cleaner now.

Test Plan

visit e.cash/what-is-eCash, check positioning of spiningcoin animation.
Also check other pages for images being rendered correctly.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
margin
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 29970
Build 59474: Build Diff
Build 59473: arc lint + arc unit

Event Timeline

Is this specific to some screen size ? On my monitor it just makes the animation appear slightly off center offset to the bottom. I have no issue with the current version also.

That's how it looks for me and Aimal:

image.png (780×1 px, 379 KB)

So we tried to putt it further down so that the navigation bar doesn't overlap it:

image.png (801×1 px, 381 KB)

bytesofman added a subscriber: bytesofman.

imo this is an overcomplicated fix that is likely to cause more problems than it solves. the picture of the original problem -- interference with the nav menu on some devices/resolutions -- does not seem that bad.

if we really want to solve that, we should do it with rules on the nav menu to ensure space below for any given thing, not rules for space above on one particular thing that happens to be below the nav menu in this one case.

This revision now requires changes to proceed.Aug 13 2024, 16:53

I think the issue is with the subPageHero component.
The min height of the container does not account for the top padding and image height. So tall images are overflowing into the nav and shorter screens.

Just havent had a tall image like this used before I think is why it hasnt been noticed

Adding an explicit height of 830px; to HeroCtn in sub-page-hero styles and removing the min height should fix it

This will also avoid an unnecessarily tall hero section on large monitors

web/e.cash/components/sub-page-hero/styles.js
18–19 ↗(On Diff #49174)

Okay, some images already have this kind of adjustment on them (e.g.: core tech) , but I agree that the source files need to be corrected. In fact I suggest alternative images to begin with. I will create a new task where I show the alternative imagery we could use and the reason for scrapping these hand-animations altogether. But that is something for a later date I presume.

I will abandon this diff.

This revision now requires changes to proceed.Aug 13 2024, 18:33

I just saw John's comment. I will apply his changes for now and remove mine.

Kronkmeister retitled this revision from [e.cash] Add marginTop to SpiningCoin image on what's eCash page to [e.cash] Add max height to image styles to fix image on what's eCash page.
Kronkmeister edited the summary of this revision. (Show Details)
Kronkmeister edited the test plan for this revision. (Show Details)

Removed the complex code and added an explicit height for images in styles which will
fix issues with tall images.

lmao the 'lgtm' auto meme posting!? is that custom or built in phab feature haha

lmao the 'lgtm' auto meme posting!? is that custom or built in phab feature haha

pwned

a little wary about hardcoding the height, seems like this would produce different behavior than previous code (which is saying, take up the whole height of the screen, and if the screen is less than 700px tall -- then take up at least 700px).

seems like this could cause some responsiveness issues.

however, I'm not able to find them in testing. something to keep an eye on tho.

This revision is now accepted and ready to land.Aug 14 2024, 17:00