Skip to content

Mobile View Fix for bottom sidebar - #5428

Closed
kala-moz wants to merge 14 commits into
firefox-devtools:mainfrom
kala-moz:mobile-sidebar-ui-fix
Closed

kala-moz wants to merge 14 commits into
firefox-devtools:mainfrom
kala-moz:mobile-sidebar-ui-fix

Conversation

@kala-moz

@kala-moz kala-moz commented Apr 15, 2025 •

Copy link
Copy Markdown
Contributor

Please open the profile setting your screen on mobile view: Deploy preview

For review: please look at this most relevant commit: removed media queries & reponsive tab bar component; made the tab and stack menus scroll horizontally; sidebar closed on mobile breakpoint

Offered solution:

  • Close the sidebar on mobile breakpoint
  • Make the tab bar and stack menu scroll horizontally within the defined width.

Screenshot and video:

Screenshot 2025-05-08 at 13 40 18
ProfilerMobile.mov

Changed location of icon button to be more visible to users
@kala-moz kala-moz added sidebar Issues related to the sidebar panel mobile labels Apr 15, 2025
@kala-moz kala-moz self-assigned this Apr 15, 2025
@codecov

codecov Bot commented Apr 15, 2025 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.03%. Comparing base (fbc7d79) to head (be0ef2f).
Report is 32 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5428   +/-   ##
=======================================
  Coverage   86.03%   86.03%           
=======================================
  Files         312      312           
  Lines       30365    30365           
  Branches     8299     8299           
=======================================
  Hits        26126    26126           
  Misses       3645     3645           
  Partials      594      594           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mstange

mstange commented Apr 17, 2025

Copy link
Copy Markdown
Contributor

I think we should do this work in two steps:

First, make it so that the layout remains sturdy even with small viewports. By sturdy I mean that no circles get squished, no text labels wrap, no extra spaces appear, and you can never scroll to unintended gaps. So the first milestone would be something that looks and feels robust but which makes many things inaccessible because they get clipped off. We can add overflow-x: auto; scrollbar-width: none in some cases to make the clipped-off content reachable, for example for the panel tabs.

Once this is achieved, we can do the second step: Introduce wrapping flex in some places where we want wrapping to happen, and introduce media queries and custom "small screen" layout where it makes sense.

But in the first step there shouldn't be any media queries yet.

@julienw julienw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't mind Markus plan on the long run, but I think I'd be fine with some early quick fixes too.
I'd like that the users can easily see the timeline, or reach the marker table, for example. This would make it possible to look at things from mobile even if things are not "nice" yet.

I didn't look at the exact CSS because it's still a draft, just left a few surprises and comments.

Comment thread src/components/app/Details.css Outdated
border-width: 1px 0;
background: var(--grey-10);

@media screen and (max-width: 768px) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm very surprised that adding a media query inside the css rule works at all. I don't see any documentation about this syntax...

I mean:

.classrule {
  @media query {
  }
}

I thought @media queries always need to be top-level:

@media query {
  .classrule {
  }
}

But I'm fine with the syntax if it's supported broadly!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ah I see this is pretty new and comes with CSS nesting:
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_nesting/Nesting_at-rules

This seems to be quite well supported: https://caniuse.com/?search=CSS%20nesting but still a bit early.

For example it's not in the older Firefox ESR (v115) that is still supported by Mozilla. So I think we'd need to add https://www.npmjs.com/package/postcss-nesting to our postcss configuration to be able to use it for now. What do you think?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, to accommodate the older versions, I'll add postcss-nesing package. Fair enough.

Comment thread yarn.lock Resolved
returnToZipFileList,
invalidatePanelLayout,
},
mapDispatchToProps: { returnToZipFileList, invalidatePanelLayout },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

it looks like your IDE's formatting configuration changes things that you don't touch otherwise (see also the changes to Details above), and that are not necessary. While I don't really mind, this makes the patches more difficult to review.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, it's not intentional. It's hard to catch these file changes when I run the lint commands. I'll keep an eye out in the future.

@kala-moz

Copy link
Copy Markdown
Contributor Author

I think we should do this work in two steps:

First, make it so that the layout remains sturdy even with small viewports. By sturdy I mean that no circles get squished, no text labels wrap, no extra spaces appear, and you can never scroll to unintended gaps. So the first milestone would be something that looks and feels robust but which makes many things inaccessible because they get clipped off. We can add overflow-x: auto; scrollbar-width: none in some cases to make the clipped-off content reachable, for example for the panel tabs.

Once this is achieved, we can do the second step: Introduce wrapping flex in some places where we want wrapping to happen, and introduce media queries and custom "small screen" layout where it makes sense.

But in the first step there shouldn't be any media queries yet.

I see. I'll consider the robustness of the layout while I work through this PR.

@kala-moz
kala-moz requested a review from mstange May 8, 2025 23:04
@kala-moz kala-moz changed the title DRAFT: Mobile View Fix for bottom sidebar Mobile View Fix for bottom sidebar May 8, 2025

@mstange mstange left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry for the delay, I'm slowly digging out from under my review backlog.

The default-sidebar-to-closed fix looks fine except for the one issue I found. Could you submit it as a separate PR? Then we can land it quickly.

The tab bar overflow fix I think can be done with pure CSS. I can help you find the right CSS incantations; we should be able to do this without hardcoding a small screen breakpoint width, and without using calc or hardcoding the sidebar button width, just by using flex in the right way. But I don't want that part to block the landing of the sidebar fix, that's why I'm asking for the sidebar fix to be a separate PR. Hope that's not too much work!

Comment thread src/components/app/Details.js Resolved
Comment thread yarn.lock
resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570"
integrity sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==

"@react-hook/media-query@^1.1.1":

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The yarn.lock changes look unrelated to this PR. Please squash all commits and remove the yarn.lock changes.

Comment thread src/components/app/TabBar.css Resolved
@kala-moz

Copy link
Copy Markdown
Contributor Author

Thanks for your review, @mstange . Not too much work at all. I'll clean this right up and handle the Sidebar in a separate PR.

kala-moz added 4 commits May 15, 2025 15:46
… stack menus scroll horizontally; sidebar closed on mobile breakpoint

lint fix

Update all Yarn dependencies (2025-04-09) (firefox-devtools#5416)

Update stylelint-config-standard 37.0.0 → 38.0.0 (major) (firefox-devtools#5427)

* ⬆️ Update stylelint-config-standard to version 38.0.0

* Also update stylelint

Bump koa from 2.15.4 to 2.16.1 (firefox-devtools#5417)

Bumps [koa](https://github.com/koajs/koa) from 2.15.4 to 2.16.1.
- [Release notes](https://github.com/koajs/koa/releases)
- [Changelog](https://github.com/koajs/koa/blob/master/History.md)
- [Commits](koajs/koa@2.15.4...v2.16.1)

---
updated-dependencies:
- dependency-name: koa
  dependency-version: 2.16.1
  dependency-type: indirect
...

Update all Yarn dependencies (2025-04-16) (firefox-devtools#5430)

⬆️ Update @fluent/bundle to version 0.19.1 (firefox-devtools#5433)

Update all Yarn dependencies (2025-04-28) (firefox-devtools#5435)

Bump http-proxy-middleware from 2.0.7 to 2.0.9 (firefox-devtools#5436)

Bumps [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware) from 2.0.7 to 2.0.9.
- [Release notes](https://github.com/chimurai/http-proxy-middleware/releases)
- [Changelog](https://github.com/chimurai/http-proxy-middleware/blob/v2.0.9/CHANGELOG.md)
- [Commits](chimurai/http-proxy-middleware@v2.0.7...v2.0.9)

---
updated-dependencies:
- dependency-name: http-proxy-middleware
  dependency-version: 2.0.9
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

⬆️ Update glob to version 11.0.2 (firefox-devtools#5441)

Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>

update snapshots

resolved pr comments: removed js in tab bar and details; used only media queries:
@kala-moz

kala-moz commented May 20, 2025 •

Copy link
Copy Markdown
Contributor Author

Closing this PR due to experimentation commits. New PRs: #5464 (sidebar) + #5463 (scrollable tab bar).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mobile ready for review sidebar Issues related to the sidebar panel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants