Fix/dashboard theme layout shift - #17232
Merged
teknium1 merged 2 commits intoMay 1, 2026
Merged
Conversation
All built-in themes now spread DEFAULT_TYPOGRAPHY, removing independent baseSize overrides and converging on 15px. All themes also use density: comfortable, removing the compact/spacious divergence that caused item-count shifts on fixed-height pages (e.g. Skills). Two additional per-theme overrides are also normalized: - rose: lineHeight: "1.7" removed — was paired with density: spacious for an airy feel; once density was normalised the elevated line-height became an orphaned artefact causing nav item height drift. - cyberpunk: letterSpacing changed from "0.02em" to "0" — extra tracking on top of an already-wide monospace font caused text to wrap earlier than in other themes. Switching themes is now a purely cosmetic change — color palette, font family, border-radius, and typographic style differ; font size, spacing, line-height, and letter-spacing do not.
Collaborator
|
Fixes #17229. |
Themes previously embedded layout-affecting values (baseSize, lineHeight, density, letterSpacing) alongside visual identity properties, coupling user ergonomic preferences to color theme selection. This change establishes a clear separation of concerns: - Themes own: palette, font family, border-radius, and font-coupled letterSpacing (e.g. Inter's -0.005em tracking) - Layout scale (baseSize, lineHeight, density) is standardized via DEFAULT_TYPOGRAPHY and DEFAULT_LAYOUT — not overridden per theme All themes now spread DEFAULT_TYPOGRAPHY and DEFAULT_LAYOUT as their base, removing silent divergence and making future layout settings (e.g. user-configurable density) trivially applicable across all themes without per-theme special-casing.
Contributor
Author
|
Referencing the discussion here #17229 (comment), acceptance of this PR would depend on whether our direction is to have separation of concerns between visual identity (e.g. colors, fonts, corner radius) and layout density, versus opinionated themes where each theme sets their own font sizes, densities, etc. The latest commit supports the former direction, further improving layout consistency across themes with usage of the already existing
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What does this PR do?
Switching between dashboard themes caused visible layout shifts across four axes: font sizes varied by up to 3px, spacing scaled by up to 40% (compact/spacious density), the rose navbar was taller due to an orphaned
lineHeight: 1.7, and the cyberpunk theme caused text to wrap earlier than other themes due to extraletterSpacing: 0.02emon top of an already-wide monospace font.The root cause was that each built-in theme independently hardcoded typography and layout values rather than inheriting from
DEFAULT_TYPOGRAPHY. Divergence was silent — no single author made a wrong decision, but the values accumulated without a shared constraint.The fix spreads
DEFAULT_TYPOGRAPHYinto every per-theme typography object, removing explicit overrides forbaseSize,density,lineHeight(rose), andletterSpacing(cyberpunk). Layout-affecting values now default to a shared baseline; themes retain their distinct identity through palette, font family, border-radius, and stylistic typographic choices.Related Issue
Fixes #17229
Type of Change
Changes Made
web/src/themes/presets.ts:...DEFAULT_TYPOGRAPHY, removing independentbaseSizevalues and converging on 15pxmono,cyberpunk,rose:densitychanged to"comfortable"(wascompact,compact,spacious)rose:lineHeight: "1.7"removed — now inherits1.55via spread (was orphaned after density normalization, causing nav item height drift)cyberpunk:letterSpacingchanged from"0.02em"to"0"— extra tracking on a monospace font caused text to wrap earlier than other themesHow to Test
hermes dashboardand navigate to the Skills page — note how many skill rows are visible.Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AScreenshots / Logs
Before
After