Skip to content

refactor dark mode checks#2407

Merged
samfreund merged 1 commit intoPhotonVision:mainfrom
samfreund:cleanup-theme
Mar 24, 2026
Merged

refactor dark mode checks#2407
samfreund merged 1 commit intoPhotonVision:mainfrom
samfreund:cleanup-theme

Conversation

@samfreund
Copy link
Copy Markdown
Member

Description

The current method for checking light vs. dark mode is to compare the name of the theme against a hardcoded string. This PR uses a dark mode boolean. This change is for verbosity and so that we're not reliant on theme name. Additionally, we change some references to colors to the global theme, instead of indexing the list of themes.

Meta

Merge checklist:

  • Pull Request title is short, imperative summary of proposed changes
  • The description documents the what and why, including events that led to this PR
  • If this PR changes behavior or adds a feature, user documentation is updated
  • If this PR touches photon-serde, all messages have been regenerated and hashes have not changed unexpectedly
  • If this PR touches configuration, this is backwards compatible with all settings going back to the previous seasons's last release (seasons end after champs ends)
  • If this PR touches pipeline settings or anything related to data exchange, the frontend typing is updated
  • If this PR addresses a bug, a regression test for it is added
  • If this PR adds a dependency, the license has been checked for compatibility and steps taken to follow it

@samfreund samfreund requested a review from a team as a code owner March 24, 2026 21:19
@github-actions github-actions Bot added the frontend Having to do with PhotonClient and its related items label Mar 24, 2026
@samfreund samfreund requested a review from Gold856 March 24, 2026 21:21
Comment thread photon-client/src/views/DashboardView.vue
@samfreund samfreund merged commit 032deba into PhotonVision:main Mar 24, 2026
96 of 98 checks passed
@samfreund samfreund deleted the cleanup-theme branch March 24, 2026 22:50
<v-btn
color="buttonPassive"
:variant="theme.global.name.value === 'LightTheme' ? 'elevated' : 'outlined'"
:variant="theme.global.current.value.dark ? 'outlined' : 'tonal'"
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.

I don't think we meant to change this.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yup, I'll lump that into #2394

samfreund added a commit to samfreund/photonvision that referenced this pull request Mar 24, 2026
samfreund added a commit to samfreund/photonvision that referenced this pull request Mar 26, 2026
samfreund added a commit to samfreund/photonvision that referenced this pull request Mar 26, 2026
samfreund added a commit to samfreund/photonvision that referenced this pull request Mar 26, 2026
SpeedSlicer pushed a commit to SpeedSlicer/photonvision that referenced this pull request Mar 30, 2026
The current method for checking light vs. dark mode is to compare the
name of the theme against a hardcoded string. This PR uses a dark mode
boolean. This change is for verbosity and so that we're not reliant on
theme name. Additionally, we change some references to colors to the
global theme, instead of indexing the list of themes.
cswilson252 pushed a commit to cswilson252/photonvision that referenced this pull request Apr 22, 2026
The current method for checking light vs. dark mode is to compare the
name of the theme against a hardcoded string. This PR uses a dark mode
boolean. This change is for verbosity and so that we're not reliant on
theme name. Additionally, we change some references to colors to the
global theme, instead of indexing the list of themes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Having to do with PhotonClient and its related items

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants