Conversation
This PR changes the way we update our favicon based on system theme preference. Currently, we rely on the media attr in the link tag to obey the system preference, but some browsers don't seem to support that very well. Instead, we will now add a listener when Teleport loads to the theme and set the favicon dynamically. Note: this means the favicon will match the theme of the system/browser and NOT the theme of the page (which can be different, depending on user). The goal of the favicon theme switch is to make the favicon visible based on the browser's theme, rather than necessarily matching the page theme. This can eventually be expanded upon to be included in a theme switch when we have a user settings page that allows "system" as a theme choice
ryanclark
approved these changes
Aug 27, 2024
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Aug 27, 2024
This PR changes the way we update our favicon based on system theme preference. Currently, we rely on the media attr in the link tag to obey the system preference, but some browsers don't seem to support that very well. Instead, we will now add a listener when Teleport loads to the theme and set the favicon dynamically. Note: this means the favicon will match the theme of the system/browser and NOT the theme of the page (which can be different, depending on user). The goal of the favicon theme switch is to make the favicon visible based on the browser's theme, rather than necessarily matching the page theme. This can eventually be expanded upon to be included in a theme switch when we have a user settings page that allows "system" as a theme choice
avatus
added a commit
that referenced
this pull request
Oct 7, 2024
This PR changes the way we update our favicon based on system theme preference. Currently, we rely on the media attr in the link tag to obey the system preference, but some browsers don't seem to support that very well. Instead, we will now add a listener when Teleport loads to the theme and set the favicon dynamically. Note: this means the favicon will match the theme of the system/browser and NOT the theme of the page (which can be different, depending on user). The goal of the favicon theme switch is to make the favicon visible based on the browser's theme, rather than necessarily matching the page theme. This can eventually be expanded upon to be included in a theme switch when we have a user settings page that allows "system" as a theme choice
Merged
avatus
added a commit
that referenced
this pull request
Oct 8, 2024
This PR changes the way we update our favicon based on system theme preference. Currently, we rely on the media attr in the link tag to obey the system preference, but some browsers don't seem to support that very well. Instead, we will now add a listener when Teleport loads to the theme and set the favicon dynamically. Note: this means the favicon will match the theme of the system/browser and NOT the theme of the page (which can be different, depending on user). The goal of the favicon theme switch is to make the favicon visible based on the browser's theme, rather than necessarily matching the page theme. This can eventually be expanded upon to be included in a theme switch when we have a user settings page that allows "system" as a theme choice
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Oct 8, 2024
* [v15] Fix theme picker text when unspecified theme * Add favicon theme listener (#45864) This PR changes the way we update our favicon based on system theme preference. Currently, we rely on the media attr in the link tag to obey the system preference, but some browsers don't seem to support that very well. Instead, we will now add a listener when Teleport loads to the theme and set the favicon dynamically. Note: this means the favicon will match the theme of the system/browser and NOT the theme of the page (which can be different, depending on user). The goal of the favicon theme switch is to make the favicon visible based on the browser's theme, rather than necessarily matching the page theme. This can eventually be expanded upon to be included in a theme switch when we have a user settings page that allows "system" as a theme choice * Use dynamic base path for favicon images (#46719)
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.
This PR changes the way we update our favicon based on system theme preference. Currently, we rely on the media attr in the link tag to obey the system preference, but some browsers don't seem to support that very well. Instead, we will now add a listener when Teleport loads to the theme and set the favicon dynamically.
Note: this means the favicon will match the theme of the system/browser and NOT the theme of the page (which can be different, depending on user). The goal of the favicon theme switch is to make the favicon visible based on the browser's theme, rather than necessarily matching the page theme.
This can eventually be expanded upon to be included in a theme switch when we have a user settings page that allows "system" as a theme choice.
example below (ignore safari, they are trying their best)
062f8096203003011f14590f6b60fd82.mp4
Closes #45258