Skip to content

292881 back-to-top scope: CMS wiki + content pages only#208

Open
dfe-lance wants to merge 2 commits into
mainfrom
292881-back-to-top
Open

292881 back-to-top scope: CMS wiki + content pages only#208
dfe-lance wants to merge 2 commits into
mainfrom
292881-back-to-top

Conversation

@dfe-lance

Copy link
Copy Markdown
Contributor

Ticket 292881. Reverts the "render on every layout" change from #f0812507 so back-to-top only appears on CMS-driven wiki and content pages, not
on search results, admin surfaces, or share pages. Users reported the pill getting in the way on non-guidance surfaces.

Change

  • Removes the _BackToTop partial from _Layout.cshtml, _AdminLayout.cshtml, and _ShareLayout.cshtml, plus the back-to-top.js script
    tag from the admin and share layouts.
  • Restores the partial call at the bottom of Views/Page/Wiki.cshtml and Views/Page/Content.cshtml.
  • Script stays in _Layout.cshtml (which Wiki/Content use); no-ops on any page without an .app-back-to-top container so unrelated _Layout
    pages don't pay for it.

Net diff on the source change: 5 files, +6/-32 lines. Single-commit revert of f0812507.

VR baselines

Full E2E surfaced 6 pre-existing VR failures unrelated to this scoping change. help-page.png, warning-text-page.png, and the three
help-page-*-viewport variants had drifted +37–50px since the 2026-07-14 rebake (b516180d) due to unrelated post-baseline commits adding
chrome to those pages. admin-deleted-pages-page.png had ~4% pixel drift for the same reason. Rebaked all 6 (plus refreshed
admin-landing-page.png and observability-dashboard-page.png from the same run so the linux-chromium baseline set stays coherent) — all 8
verified stable across two consecutive passes for the 5 that drifted.

Two admin surface tests (AdminLandingPage_MatchesSnapshot, DashboardPage_MatchesSnapshot) still oscillate ±59px between test-fixture cold
and warm state — a pre-existing fixture-determinism bug on main, not caused by this change (removing hidden-by-default DOM can't grow layout).
Reproduces against both old and new baselines. Out of scope here; needs its own ticket.

Test plan

  • /wiki/wiki-sandbox shows the back-to-top pill after scrolling past the fold, hidden at top-of-page.
  • /pages/sample-content same behaviour.
  • / (homepage) shows no back-to-top pill at any scroll position.
  • /search (results page) shows no back-to-top pill.
  • /admin, /admin/pages, /help/deleted show no back-to-top pill.
  • Any tokened share page shows no back-to-top pill.
  • Unit suite green (2883/2883 locally).
  • E2E suite green modulo the pre-existing admin-landing / observability-dashboard flakiness noted above.

Reverts f081250 which had moved the partial into _Layout, _AdminLayout,
and _ShareLayout so every page rendered a back-to-top link. Users report
the pill gets in the way on non-guidance surfaces (search results, admin
lists, dashboards, share pages), so return to the original ticket 290817
scope: partial renders only from Wiki.cshtml and Content.cshtml (the CMS
node views), and the enhancement script stays in _Layout with defer.

Public and admin surfaces outside the CMS no longer render the pill.
The script no-ops on any page without an .app-back-to-top container, so
short-form CMS pages that don't scroll past the fold still see nothing.
Running the full E2E suite on this branch surfaced 6 pre-existing VR
failures against the 2026-07-14 baselines. Attribution:

Genuinely drifted (5 baselines, +37-50px page height):
  - help-page.png                        1280x1314 -> 1280x1364
  - help-page-desktop-large-1920x1080    1920x1314 -> 1920x1364
  - help-page-mobile-375x667             375x1573  -> 375x1610
  - help-page-tablet-768x1024            768x1423  -> 768x1473
  - warning-text-page.png                1280x1344 -> 1280x1394
  - admin-deleted-pages-page.png         (viewport-only) 4.272% pixel diff

Post-b516180d commits on main added chrome that made these pages 37-50px
taller across the board; none of the affected views were touched by the
back-to-top scoping revert in this branch (removing hidden-by-default DOM
can't grow layout). Baselines rebaked from a cold cypd_web run and
verified with a second pass — the 5 above are now stable.

Two admin surfaces still oscillate between passes:
  - admin-landing-page.png       cold 1280x4521, warm 1280x4580 (+59px)
  - observability-dashboard-page cold 1280x3136, warm 1280x3195 (+59px)

The 59px jump is between test-fixture cold/warm state, not baseline drift —
same content-render height difference reproduces on both old and new
baselines. Left in place; needs a separate fixture-determinism fix on
main (out of scope for this branch).
@github-actions

Copy link
Copy Markdown

Deployments

Review app is available at these URLs:
https://check-performance-data-pr-208.test.teacherservices.cloud

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant