Skip to content

Conversation

@cpAdm
Copy link
Contributor

@cpAdm cpAdm commented Nov 18, 2025

  • Document theme (dark/light) listens to system's theme if user's theme is 'system'
  • Changed all darkmode checkboxes to select inputs
  • Added some stricter typing to settingsView.tsx and uiUtils.ts::Settings
  • Moved the HeaderView settings dialog outside the button, this was intercepting events for the select
  • Changed existing dark mode test, and added another for system theme change
Inspector HTML reporter Trace viewer UI mode
image
image
image
image
image
image
image
image

Closes: #37874

}
}

export type Theme = 'dark-mode' | 'light-mode' | 'system';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: declare Theme as DocumentTheme | 'system' for simplicity.

const prefersDarkScheme = window.matchMedia('(prefers-color-scheme: dark)');
const defaultTheme = prefersDarkScheme.matches ? 'dark-mode' : 'light-mode';
const theme = currentTheme();
const documentTheme: DocumentTheme = theme === 'system'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to make updateDocumentTheme(currentTheme()) work here.

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.

[Bug]: UI does not change theme whenever system changes theme

2 participants