Skip to content

Scroll affordance fixes, login background right-sizing#5582

Open
nabramovitz wants to merge 5 commits into
cloudfoundry:developfrom
nabramovitz:norm/fix/scroll-affordance
Open

Scroll affordance fixes, login background right-sizing#5582
nabramovitz wants to merge 5 commits into
cloudfoundry:developfrom
nabramovitz:norm/fix/scroll-affordance

Conversation

@nabramovitz

Copy link
Copy Markdown
Contributor

What

Two UX fix groups plus a perf follow-up to #5550, and the dev.133 bump.

Scroll affordance

  • The dashboard shell's bottom scroll shadow only updated on scroll events and a delayed NavigationEnd hook. It now measures on init and reacts to content size changes via ResizeObserver + MutationObserver (including native <details> toggles on the diagnostics page), mirroring the signal-list overflow-fade pattern.
  • macOS overlay scrollbars are 0px wide when idle, so several scrollable containers had no affordance at all: the tile grids on every summary tab, role-assignment lists, side panel preview, kube create-release namespace dropdown, and the recent-apps card. A global .custom-scrollbar utility (same 6px themed styling the endpoint-register modal and steppers already used locally) is now applied at those sites; a dead overflow-y-auto wrapper on the cf summary tab is removed.

Login background (refs #5550)

  • The stock 415 kB 1080p JPEG is replaced with a 1280x720 WebP q65 (158 kB, -62%). It was the heaviest pre-auth asset and re-transfers in full on warm visits under the no-cache policy. Same-resolution recompression only saved 10-37% on this image; downscaling is the effective lever, and behind the login card the result is visually equivalent.
  • .gitattributes now marks *.webp as binary — the blanket * text eol=lf rule could otherwise corrupt webp files.
  • New "Login Background Image: Performance" section in docs/branding-architecture.md gives operators a size budget, a sizing recipe, and the measured variants as a worked example.

Testing

  • Full local gate green (frontend + backend suites, docs lint 57 files / 0 problems).
  • Live-verified on the dev stack: scrollbar renders on the summary tile grid; shadow appears on initial overflow without scrolling and clears when the diagnostics accordion closes; webp served and referenced correctly (committed blob verified byte-identical to source).

The dashboard shell's bottom scroll shadow only updated on scroll
events and a delayed NavigationEnd hook, so it was missing on pages
whose content rendered after the 100ms mark and went stale when
content shrank without a scroll (e.g. closing a native <details>
accordion on the diagnostics page).

Measure once in ngAfterViewInit and wire ResizeObserver plus
MutationObserver (childList + subtree + attributes, the latter for
<details> open-toggles) on the content element, mirroring the
signal-list overflow-fade pattern. The NavigationEnd+delay hack is
now redundant and removed.
macOS overlay scrollbars are 0px wide when idle, leaving scrollable
containers with no affordance at all. Tile grids (every summary tab)
scrolled invisibly, as did the role-assignment lists, side panel
preview body, kube create-release namespace dropdown and the
recent-apps card.

Add a global .custom-scrollbar utility (same 6px themed styling the
endpoint-register modal and steppers already use locally) and apply
it at those sites; tile-grid gets the styling in its own scss since
it is the scroll element itself. Also drop the dead overflow-y-auto
on the cf summary tab wrapper - its only child is the fit tile-grid,
which absorbs all overflow.
Operators can point config.login.backgroundImage at any asset; the
branding doc now says what that costs (pre-auth fetch, full
re-transfer per visit under no-cache), gives a size budget and
sizing recipe, and uses the stock image right-sizing from cloudfoundry#5550 as
a worked example.
The stock login background was a 415 kB 1080p JPEG - the heaviest
asset left on the pre-auth page after the cloudfoundry#5560 fix wave, and it
re-transfers in full on every warm visit under the blanket no-cache
policy (Chromium re-downloads it with a 200, not a 304).

Replace it with a 1280x720 WebP at quality 65 (158 kB, -62%). As a
background rendered behind the login card the downscale is visually
equivalent; same-resolution recompression was measured at only
-10..-37% on this high-entropy photo. All default-theme references
now point at login-bg.webp; the example-theme and devkit schematic
assets are untouched.

Also mark *.webp as binary in .gitattributes - the blanket
'* text eol=lf' rule would otherwise corrupt any webp whose bytes
contain CRLF sequences, and align the branding doc's worked example
with the shipped variant.

Refs cloudfoundry#5550

@norman-abramovitz norman-abramovitz 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.

LGTM - but I will need to live verify later

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants