-
-
Tab headers of File Changes is intentionally not sticked as otherwise the sticky headers (and other headers above it) takes too much space, and the file review part can be too small, especially on a notebook.
-
Closing without implementation: keep File Changes tab row non-sticky so the revision-diff toolbar does not stack under primary tabs and reduce review viewport height (especially on notebooks). Supersedes the issue #2990 2=B lock.
-
@robin Agreed — that matches the intentional
html:has(.revision-diff)exception from issue #2954 / issue #2969, and was also the recommendation in issue #2990 (keep File Changes tabs non-sticky so the revision-diff toolbar ownstop: 0and review viewport height stays usable).issue #2993 was opened only because issue #2990 locked 2=B (both sticky, stacked) per @zaakiy. Given the notebook/space concern, we should keep current behavior and close this Improvement without implementation.
@zaakiy FYI — product direction here keeps the primary PR tab row scrolling away on File Changes so
Filter by path/ Diff options stay sticky without stacking a second bar that shrinks the review area. -
Previous Value Current Value Open
Closed
-
Hi. @robin I was actually thinking of a way to achieve this without using two separate rows of sticky divs.
We could put them side by side as you scroll down and use view transitions to neatly transition the items
CSS Can Now Animate Between Pages
The above video shows how to use view transitions between two different pages, but of course you can use it within a single page as well.
When I have some time, I'll create an issue for this.
-
(I will also make sure that it is still nice and neat on mobile devices as well.)
| Type |
Improvement
|
| Priority |
Normal
|
| Assignee | |
| Labels |
No labels
|
Follow-up from issue #2990 (design locked).
Locked decisions (from issue #2990)
Filter by path/ Diff options stay immediately under them with no overlap.Problem
.sticky-tabs-rowis sticky globally, butbase.cssintentionally disables it when a revision diff is present:PR File Changes embeds
RevisionDiffPanel(.revision-diff). That exception lets.revision-diff > .headowntop: 0alone (from issue #2954 / issue #2969). Product now wants both bars sticky and stacked.Do not “fix” this by adding Bootstrap
.position-sticky/!importanton the tab row — that only overrides the exception and leaves both bars attop: 0.Goal
On PR File Changes, after scrolling:
Activities/File Changes/ …) + docked more-info stay pinned attop: 0.Filter by path, Diff options, …) stays pinned immediately under that row.Implementation plan
1. Re-enable sticky tabs when
.revision-diffis presentIn
base.css:html:has(.revision-diff) .sticky-tabs-row { position: static; }.html:has(.revision-diff) .sticky-tabs-row.is-docked>.more-info-dock { display: none; }so the more-info dock can appear again while Changes is sticky.html:has(.revision-diff) .nav-tabs-line.nav-tabs-sticky { position: static; }and keep it consistent (legacy marker vs.sticky-tabs-row).2. Offset
.revision-diff > .headunder the sticky tab rowIn
revision-diff.css,.revision-diff > .headis currently:Set
topto the live height of.sticky-tabs-row(not a hard-coded guess only), so the path-filter bar sits flush under the tabs.Because the tab row height can change (wrap, docked more-info, font zoom), sync via JS (resize /
ResizeObserveron the sticky row), e.g. fromrevision-diff.jsor PR detail JS:head.style.top = stickyRow.offsetHeight + "px"(or equivalent).z-indexof.sticky-tabs-row(990) above.revision-diff > .head(10) so stacking order matches visual order.3. Fix scroll anchoring for in-diff jumps
revision-diff.jscurrently sets:Include sticky-tab-row height as well (tabs + head), otherwise “jump to file” / active navigation can land under the stacked sticky bars.
4. Manual verification (PR detail only)
On a PR with a non-trivial File Changes view:
Filter by path/ Diff options stay directly under them with no overlap.topstill matches sticky-row height.scroll-margin-top).Non-goals
.position-sticky/!importantas the long-term fix.