Repository navigation
Make the tab bar scrollable to allow accessing tabs on narrow page widths (mobile layout) - #5463
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5463 +/- ##
==========================================
- Coverage 86.04% 86.04% -0.01%
==========================================
Files 312 312
Lines 30367 30362 -5
Branches 8300 8295 -5
==========================================
- Hits 26130 26124 -6
Misses 3643 3643
- Partials 594 595 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ecb2145 to
b130e8d
Compare
lint fix move media query to correct class in stacksettings
0deb7fc to
4a372eb
Compare
…#5464) This PR closes the sidebar for mobile view. [Deploy preview](https://deploy-preview-5464--perf-html.netlify.app/public/rxabzrr1e4fcb8f05aavnbm7vsgcp4cn2hg7mtr/calltree/?globalTrackOrder=a0w9&hiddenGlobalTracks=1w8&hiddenLocalTracksByPid=4612-0w4~4636-0~4617-0&implementation=js&search=activity-s&thread=f&timelineType=category&v=10)
There was a problem hiding this comment.
I would prefer to do this in a way where we don't have to hardcode a width at which we transition to a "mobile layout". Let's find a way to express this so that the layout works on all widths. Having a specific transition point means that there will be some widths where the layout doesn't work. For example, if I resize my browser window in the deploy preview, I can still get into a state where the sidebar button overlaps the last tab, or a state where the "x" button in the search field is occluded by the sidebar and the bar is not scrollable.
Instead, I think we should:
- Use
overflow-x: autoso that the box becomes scrollable when necessary - Do the work that's needed to make the right elements grow/shrink in the right ways when the window is resized. This may require properties such as
overflow: hiddenandmin-width: 0on various elements, or changes toflex-shrinkandflex-grow.
|
Another problem with using a fixed pixel value as the transition point is that, in many cases, you can't actually pick a value that works reliably. That's because many of the elements involved here are sized based text content, and text can have different sizes based on the language, platform font rendering, and font size accessibility settings. So finding a way to express the behavior we want dynamically will make the layout more robust to those variations. |
|
Hi @mstange, I reviewed your comments and removed the media queries and relied more on flexbox. However, adding Example of broken selected tab appearance: |
|
@mstange, thanks for your review. I think this should be ready to check in. Let me know. |
lint fix move media query to correct class in stacksettings
mstange
left a comment
There was a problem hiding this comment.
Need to tweak the comments in the CSS so that they make sense with the new styles. Once that's addressed, this is good to go!



A duplicate of the closed Mobile View Fix for bottom sidebar #5428. Please see the former for relevant history and notes.
Please open the profile and set your screen to mobile view: Deploy Preview
Offered solution: