The Focus timer partially layers wrongly with the transparent top bar
Categories
(Firefox :: New Tab Page, defect)
Tracking
()
People
(Reporter: jan.jar.cerny, Assigned: egg, Mentored)
Details
(Keywords: good-first-bug, Whiteboard: [lang=css])
Attachments
(1 file, 1 external file)
|
897.24 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:155.0) Gecko/20100101 Firefox/155.0
Steps to reproduce
Open a new tab and go down to Widgets. There start a timer. lastly scroll down so that the timer is behind the transparent top bar
Actual results
Rounding dot of the timer is between the transparent overlay and the Search bar
Control element is infrot of both the transparent overlay and the Search bar.
Expected results
both elements should be below the transparent overlay and the Search bar.
Comment 1•1 month ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox::New Tab Page' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•1 month ago
|
||
| frontend-triage | ||
This is a CSS stacking-order problem in the Nova layout. When the search bar sticks, the page draws a full-width backdrop as .nova-outer-wrapper.stuck-search::before: it is position: fixed with z-index: 2, and the sticky .search-wrapper sits above it at z-index: 3 (_Search.scss). In the default Nova layout, nothing between the Focus Timer card and the page root creates a stacking context, so the timer's own z-indexes compete with the header directly (_FocusTimer.scss):
.progress-circle-cap-rotator(the dot) hasz-index: 2(line 420). It ties with the backdrop and wins because it comes later in the DOM, but stays below the search bar..focus-timer-play-buttonhasz-index: 3(line 358). It ties with.search-wrapperand wins the same way, so it paints above both.
That matches both symptoms in the report. The side-by-side and Spaces layouts shouldn't be affected: there the widgets section uses the layout-panel mixin (_mixins.scss), which already sets isolation: isolate. Classic doesn't have these elements.
Proposed fix: add isolation: isolate to the .nova-enabled & block of .focus-timer in _FocusTimer.scss, which is already position: relative. The card then gets its own stacking context, and the cap and play button stay inside it. There's precedent: .nova-enabled .weather-widget already contains its children the same way by adding z-index: 1 on top of widget-base-style (_Weather.scss).
A broader version would put the isolation in the widget-base-style mixin. Clocks and Picture of the Day also use z-index: 2 internally, so that would cover them too. Before doing that, check the Clocks add-city results list (.clocks-search-results, absolutely positioned under .clocks-panel at z-index: 2). If it can hang below the bottom of the card, isolating every widget would let later widgets paint over it. Widget menus are unaffected either way, because panel-list opens in the top layer.
Tests: browser_newtab_sticky_search.js covers the stuck state but not paint order or widgets. It could be extended to check that, while stuck, document.elementFromPoint inside the header doesn't land on a timer element. FocusTimer.test.jsx covers the component's markup only.
Suggested severity: S4. It's cosmetic: parts of the timer briefly draw over the sticky search header while scrolling, and nothing is blocked or lost.
If you'd like to provide feedback on this comment, please use the 👍 or 👎 reaction.
If you want to categorize your feedback you can add one of the following tags: ai-triage-{wrong-file, wrong-cause, hallucination, out-of-scope, not-a-bug, wrong-fix, shallow-fix, wrong-severity}.
Needinfo hackbot@mozilla.tld to have a patch generated for this bug, include any questions or directions as needed in your comment.
Updated•27 days ago
|
Comment 3•27 days ago
|
||
Filing as a good first bug to learn workflows.
When the search bar sticks to the top of New Tab as you scroll, parts of the Focus timer widget paint on top of it. The timer's progress dot shows above the overlay behind the search bar, and the play button shows above the search bar itself.
Steps to reproduce:
- Open a new tab
- Click start on the Focus timer widget (if it isn't visible, check under Widgets in about:preferences#home)
- Scroll down so the timer passes under the search bar
This happens because the progress dot and play button use z-index values that tie with the search bar and its overlay, and because they come later in the page order they paint on top. The recommended fix is to add isolation: isolate to the Nova .focus-timer rule in _FocusTimer.scss. That keeps the timer's own z-index values inside the widget, so the whole card stays below the search bar.
To verify the fix:
./mach build faster
./mach run
Then repeat the steps above and check that the timer sits fully under the search bar.
Before submitting, run the linter:
./mach lint --fix browser/extensions/newtab/content-src/components/Widgets/FocusTimer/_FocusTimer.scss
Tutorial to contribute:
https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
https://firefox-source-docs.mozilla.org/contributing/stack_quickref.html
Please don't ask for the bug to be assigned. It will be automatically assigned to the first patch.
| Assignee | ||
Comment 4•4 days ago
|
||
Updated•4 days ago
|
Description
•