Page MenuHomePhabricator

[web] Fixed visual bug with disappearing buttons
ClosedPublic

Authored by przemek on Nov 24 2022, 9:12 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 11, 11:28 PM
Unknown Object (File)
Thu, Apr 11, 11:28 PM
Unknown Object (File)
Thu, Apr 11, 11:28 PM
Unknown Object (File)
Thu, Apr 11, 11:27 PM
Unknown Object (File)
Thu, Apr 11, 11:27 PM
Unknown Object (File)
Thu, Apr 11, 11:25 PM
Unknown Object (File)
Tue, Mar 26, 12:57 AM
Unknown Object (File)
Mar 1 2024, 4:45 PM

Details

Summary

Fixing: https://linear.app/comm/issue/ENG-2057/userlist-buttons-are-cutoff-when-there-are-a-lot-of-users
With many users and short browser window, buttons were disappearing.
Fixed by using flexbox.

Test Plan

Video above.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tomek requested changes to this revision.Nov 25 2022, 4:37 AM

Do we have a task for this?

web/settings/relationship/user-list.css
18–21 ↗(On Diff #18825)

Could you make sure that all of these are necessary?

22 ↗(On Diff #18825)

We should avoid using scroll as it always displays the scroll instead of doing it only when necessary. Also we're using overflow in .container - are you sure we need to use it twice?

26 ↗(On Diff #18825)

Are you sure about this?

This revision now requires changes to proceed.Nov 25 2022, 4:37 AM

Fixed. Changes I've made in previous diff were.. far fetched to say the least. Minor css fix did the job!

przemek added 1 blocking reviewer(s): tomek.
This revision is now accepted and ready to land.Nov 25 2022, 9:26 AM
web/settings/relationship/user-list.css
3–4 ↗(On Diff #18845)

I prefer to set them explicitly instead of using flex: syntax, and I noted that's what we do in project as well. Basis is necessary for button to show if screen is too short. (case from the bug description in linear)

tomek requested changes to this revision.Nov 25 2022, 9:29 AM
tomek added inline comments.
web/settings/relationship/user-list.css
3–4 ↗(On Diff #18845)

It looks a lot better but please check what flex shorthand actually does. Especially what would be the value of flex-basis when flex: 1 is set.

This revision now requires changes to proceed.Nov 25 2022, 9:29 AM
web/settings/relationship/user-list.css
3–4 ↗(On Diff #18845)

It seems like we've sent comment almost at the same time. To explain a little more what my concern is about, flex: 1 means 3 things:

flex-grow: 1;
flex-shrink: 1;
flex-basis: 0;

After your change we have following

flex-grow: 1;
flex-shrink: 1; - initial value
flex-basis: 0; - the same as flex-basis: 0px;

So it looks like we're not changing anything.

przemek marked 2 inline comments as done.

We can't use flex: 1, as it sets flex-basis: 0%, and apparently we need some explicit pixel value.
I set it to flex-basis: 120px, so it can never be shrinked to size shorter then two elements.
Should rarely happen, as nobody expects webpage to wrok propery with 300px of window height.

We can't use flex: 1, as it sets flex-basis: 0%, and apparently we need some explicit pixel value.
I set it to flex-basis: 120px, so it can never be shrinked to size shorter then two elements.
Should rarely happen, as nobody expects webpage to wrok propery with 300px of window height.

Sounds reasonable!

This revision is now accepted and ready to land.Nov 29 2022, 2:56 AM