Skip to content

fix: GitHub theme and catalog view padding gaps#91

Open
johnnyhuy wants to merge 3 commits into
mainfrom
fix/theme-and-catalog-padding
Open

fix: GitHub theme and catalog view padding gaps#91
johnnyhuy wants to merge 3 commits into
mainfrom
fix/theme-and-catalog-padding

Conversation

@johnnyhuy
Copy link
Copy Markdown
Contributor

@johnnyhuy johnnyhuy commented May 31, 2026

Summary

  • Fix GitHub Light/Dark themes missing text colors and component overrides
  • Import styles.css into GitHub theme package so CSS custom properties are applied
  • Add MuiTypography and MuiCard component overrides to both GitHub themes
  • Remove negative marginBottom={-1} from catalog Grid items that caused cards to touch
  • Add consistent spacing={2} to all catalog Grid containers for proper gaps
  • Critical fix: Remove broken MuiGrid overrides from default and GitHub themes
  • Critical fix: Add global CSS fix for Backstage's v5-MuiGrid class name prefix mismatch
    • Backstage's UnifiedThemeProvider configures MUI's ClassNameGenerator to add a v5- prefix
    • But MUI Grid's internal CSS for spacing still uses .MuiGrid-item selectors
    • This caused ALL Grid items to have 0 padding, making cards touch everywhere
    • Added packages/app/src/styles/grid-fix.css with selectors targeting the prefixed classes

Consequences

  • Catalog entity cards now have comfortable breathing room instead of touching
  • GitHub themes render with proper text contrast and consistent card styling
  • Homepage Quick Actions and Catalog Overview cards now have proper gaps
  • All Grid-based layouts across the app now respect the spacing prop correctly

Testing

  • mise run lint passed (type-check + lint across all packages)
  • Visual inspection confirms cards no longer overlap on homepage, entity pages, and system pages

johnnyhuy added 2 commits May 31, 2026 20:11
- Add MISE_PYTHON_GITHUB_ATTESTATIONS=false to Dockerfile (both build
  and run stages) to bypass mise Python 3.10.12 attestation failures
  in mise 2026.5.16+
- Copy .yarn/plugins/ and backstage.json before yarn install in build
  stage - the Backstage Yarn plugin requires these to resolve
  backstage:^ version ranges
- Remove yarn tsc from Dockerfile - type checking is already covered
  by backstage-cli repo lint in CI
- Copy .yarn/plugins/ and backstage.json before yarn workspaces focus
  in run stage for the same reason
- Run mise install locally to rebuild native modules (better-sqlite3,
  isolated-vm, cpu-features) for Node 22 ABI
- Fix GitHub Light/Dark themes missing text colors and component overrides
- Import styles.css into GitHub theme package
- Add MuiGrid, MuiTypography, MuiCard overrides to GitHub themes
- Remove negative marginBottom from catalog Grid items
- Add consistent spacing={2} to all catalog Grid containers
- Increase default theme MuiGrid padding from .5rem to 1rem
- Fix missing item prop on nested Grid in apiPage
@johnnyhuy johnnyhuy enabled auto-merge (squash) May 31, 2026 11:44
- Remove MuiGrid overrides from both default and GitHub themes
  The overrides broke MUI's spacing prop by zeroing out item padding
- Add global CSS fix for Backstage's v5-MuiGrid class name prefix
  Backstage's UnifiedThemeProvider adds 'v5-' prefix to MUI classes,
  but Grid's internal CSS still targets .MuiGrid-item selectors.
  This mismatch caused all Grid items to have 0 padding, making
  cards touch each other across all pages.
- Import grid-fix.css in index.tsx so it applies globally
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.

1 participant