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.
Details
Video above.
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
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? |
Fixed. Changes I've made in previous diff were.. far fetched to say the least. Minor css fix did the job!
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) |
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. |
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. |
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.