Skip to content

feat: theming, UI polish and dark mode integrations (#157)#190

Open
Vinyl-Davyl wants to merge 9 commits intoNetflix:masterfrom
Vinyl-Davyl:feat/darkmode-implementation
Open

feat: theming, UI polish and dark mode integrations (#157)#190
Vinyl-Davyl wants to merge 9 commits intoNetflix:masterfrom
Vinyl-Davyl:feat/darkmode-implementation

Conversation

@Vinyl-Davyl
Copy link
Copy Markdown

@Vinyl-Davyl Vinyl-Davyl commented Mar 24, 2026

Requirements for a pull request

  • Unit tests related to the change have been updated
  • Documentation related to the change has been updated

Description of the Change

This PR addresses the general implementation of the Dark Mode and several UI regressions and theme consistency issues. It focuses on ensuring parity between OS-level theme detection and manual theme toggling, while refining the visual style of tables, logs, inputs and more.

Key Changes

1. Dark Mode Integration, Theme Consistency & Explicit Resets

Metaflow UI is now fully themed for both light and dark modes. The implementation leverages the existing CSS variable architecture:

  • Automatic Detection: Defaults to the user's OS preference (prefers-color-scheme).
  • Manual Toggle: A Sun/Moon toggle has been added to the header (next to "Quick links") for explicit theme switching.
  • Persistence: Theme selection is persisted to localStorage.
  • UI Polish: Resolved issues where text was unreadable on hover in dark mode and fixed layout padding for the "Runs" heading on the home page (added 12px left padding).
  • Light Mode Fix: Implemented a comprehensive [data-theme='light'] reset block in theme.css. This ensures that when a user manually toggles to Light Mode on a machine with a Dark OS preference, all color primitives (text, backgrounds, inputs) are explicitly reset to their light-mode hex values rather than inheriting dark-mode variables.
  • Manual Toggle Parity: Added dark-mode overrides for --code-bg, --input-text-color, and --table-cell-border to the explicit [data-theme='dark'] block to ensure a consistent experience across both "Auto" and "Manual" dark modes.

2. UI Polish & Aesthetics to fit Development

  • Subtle Table Borders: Replaced thick white borders in the "Runs" table and other property tables with a subtle grey (1px solid rgba(255, 255, 255, 0.1)) in dark mode, matching a more modern, premium aesthetic.
  • Log Viewer Improvements: Updated the log background to a custom light-grey (#f5f5f5) in light mode and a deep charcoal (#181818) in dark mode, providing better contrast and distinguishing logs from the main page background.
  • AppBar Alignment: Aligned the Dark Mode toggle button height (2.375rem) precisely with the adjacent "Quick links" button to maintain a balanced header layout.
  • Parameter Table Fix: Resolved a regression where JSON parameter values in the "Details" dropdown appeared inside white boxes; they now correctly use theme-aware surface tokens.

Alternate Designs

  • Component-level state: Considered adding a theme prop to every component, but selected the CSS variable + global attribute approach as it's cleaner, requires zero new component code, and is easier to maintain.

Possible Drawbacks

  • Legacy browser support: Older browsers that don't support CSS variables or media queries will continue to see the default light theme.

Verification Results

The implementation has been verified for both Light/Dark modes and Auto/Manual toggling. Below are the key visual confirmations:

Issue Verification Screenshot
Subtle Dark Borders Screenshot 2026-03-24 at 9 51 55 PM
Input Text (Light/Dark) Compatible Screenshot 2026-03-24 at 9 56 33 PM
Theme-Aware Logs Screenshot 2026-03-24 at 9 48 34 PM
Header Bar Theme Toggle Screenshot 2026-03-24 at 10 01 11 PM
Details Dropdown Screenshot 2026-03-24 at 9 50 45 PM
DAG Graph Screenshot 2026-03-24 at 9 49 20 PM
Debug Log Checks Screenshot 2026-03-24 at 9 47 09 PM

Related checks

The implementation has been verified for both Light/Dark modes and Auto/Manual toggling. Below are more key visual confirmations:

Screenshot 2026-03-24 at 9 43 23 PM Screenshot 2026-03-24 at 9 45 06 PM Screenshot 2026-03-24 at 9 45 59 PM Screenshot 2026-03-24 at 9 46 22 PM Screenshot 2026-03-24 at 9 51 55 PM Screenshot 2026-03-24 at 9 56 33 PM Screenshot 2026-03-24 at 9 47 31 PM Screenshot 2026-03-24 at 9 48 11 PM Screenshot 2026-03-24 at 9 48 34 PM Screenshot 2026-03-24 at 9 49 20 PM Screenshot 2026-03-24 at 9 50 12 PM Screenshot 2026-03-24 at 9 50 45 PM Screenshot 2026-03-24 at 9 47 09 PM

Related Issues

Closes the final set of UI polish requests for the Dark Mode integration in issue #157

@Vinyl-Davyl
Copy link
Copy Markdown
Author

cc: @saikonen @romain-intel

@Vinyl-Davyl Vinyl-Davyl changed the title feat: theming, UI polish and dark mode integrations feat: theming, UI polish and dark mode integrations (#157) Mar 26, 2026
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