Skip to content

mobile-tabs - Improve reliability - #7879

Merged
fregante merged 4 commits into
mainfrom
mobile-tab
Oct 11, 2024
Merged

fregante merged 4 commits into
mainfrom
mobile-tab

Conversation

@fregante

@fregante fregante commented Oct 9, 2024 •

Copy link
Copy Markdown
Member

Test URLs

https://github.com/oven-sh/bun

outdated screenshots

Before

Screenshot 9

After (unfinished)

I have to restore some extra padding

Screenshot 10

@fregante fregante added the bug label Oct 9, 2024
@fregante fregante changed the title mobile-tabs - More reliable layout mobile-tabs - Improve reliability Oct 10, 2024
@fregante

Copy link
Copy Markdown
Member Author

Bugfix before/after

Screenshot 8 Screenshot

Base view before/after

The wide buttons were just a consequence of the flex autolayout; the desired padding has always been 10px.

Screenshot 7 Screenshot 5

@fregante
fregante marked this pull request as ready for review October 10, 2024 10:59
"locked-issue",
"mark-merge-commits-in-list",
"mark-private-orgs",
"mobile-tabs",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feature can no longer be disabled now. The delayed addition of the rgh-mobile-tabs attribute sometimes caused the overflow mechanism to run before the size change, leaving just 2 tabs visible.

@fregante

Copy link
Copy Markdown
Member Author

Found a bug, fixed.

Screenshot 9

Here are all the possible layouts, correctly centered:

Screenshot 13 Screenshot 11 Screenshot 12 Screenshot 10

Comment on lines +80 to 91
/* When counter is missing */
:root .UnderlineNav-item:not(:has(.Counter)),
:root .UnderlineNav-item:has(.Counter:empty) {
grid-template-areas:
'icon icon'
'title title';

svg {
justify-self: center;
}
}
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wish there was a way to do this natively in CSS Grid.

In short, the icon should span and center when the counter is missing or empty.

If you have any ideas, please try them and open a PR. I already tried all the "what about X" 😅

@fregante
fregante merged commit 8527cdb into main Oct 11, 2024
@fregante
fregante deleted the mobile-tab branch October 11, 2024 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

mobile-tabs bad wrapping on 1000+ counters

1 participant