-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Refactor branch list to flexbox #34889
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: main
Are you sure you want to change the base?
Conversation
…gitea into feat/flexbox-branch-list
I believe it needs grid, but not flex .... Or table+scrollbar, just like GitHub Otherwise, multiple lines would mis-align. |
I think flex works just fine for it. If we use grid, it will be very hard to make it responsive, and I don't think table looks good. |
What we might do in the future is replacing the button row with overflow-menu, but for it to work properly changes to the menu need to be made, this is out of scope. |
Imo the problem is this bar thingy, it will look odd either ways because as always one side of it is a lot shorter than the other, it looks like wrong spacing. I would abolish it all together as it is neither intuitive nor very informative. |
IMO flex & grid have different use cases:
I think the "branch list" is the second case. |
And here is GitHub Copilot's answer:
Summary Table
|
Both grid and flex will work, but grid is probably more well-suited to render such a table. |
But I don't see how flex could layout this UI (#34889 (comment)) well .... |
Would need to give the elements a static width at least so the content aligns, it's going to be ugly with flex. |
So #34889 (comment): the flex layout doesn't work well with a list with at least 2 flexible columns. |
@@ -20,6 +20,7 @@ | |||
flex-grow: 1; | |||
flex-basis: 60%; /* avoid wrapping the "flex-item-trailing" too aggressively */ | |||
min-width: 0; /* make the "text truncate" work, otherwise the flex axis is not limited and the text just overflows */ | |||
gap: .25rem; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-> Refactor some trivial problems #34959
I will double-check tomorrow, maybe a combination of flex and grid could fit best |
FYI, there are some approaches to mix different layouts. For example:
You can have |
Use existing
flex-item
elements.Before:
After:
Replace #29620
Close #27469