Repository navigation
web: resolve themed icon URLs everywhere - #25103
Conversation
✅ Deploy Preview for authentik-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #25103 +/- ##
=======================================
Coverage 91.67% 91.67%
=======================================
Files 1151 1151
Lines 73416 73448 +32
Branches 4054 4054
=======================================
+ Hits 67301 67335 +34
+ Misses 6073 6071 -2
Partials 42 42
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
|
authentik PR Installation instructions Instructions for docker-composeAdd the following block to your AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-81f315894929d9d594d68c75c02f53b6ab2d535e
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)sAfterwards, run the upgrade commands from the latest release notes. Instructions for KubernetesAdd the following block to your authentik:
outposts:
container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
image:
repository: ghcr.io/goauthentik/dev-server
tag: gh-81f315894929d9d594d68c75c02f53b6ab2d535eAfterwards, run the upgrade commands from the latest release notes. |
kensternberg-authentik
left a comment
There was a problem hiding this comment.
Approved, but the dead code bothers me.
| } | ||
| :root[data-theme="dark"] .branding-logo--light, | ||
| :root:not([data-theme="dark"]) .branding-logo--dark { | ||
| display: none; |
There was a problem hiding this comment.
data-theme and prefers-color-scheme aren't the same, and they're not required to be the same; we made it so that data-theme can override prefers-color-scheme if the user specifies the theme in the URL or has set it to an alternative which we store in localStorage. So it's possible for the page to be in the user's preference, and the favicon not to be.
I'm not sure this is a bad thing; the favicon reflects the system color scheme, so it has contrast with the tab background, whereas the user can set the page color to some expressed value, falling back to the system colors when there is no such expression.
|
|
||
| import type { CurrentBrand } from "@goauthentik/api"; | ||
|
|
||
| export function brandSetFavicon(brand: CurrentBrand) { |
There was a problem hiding this comment.
I can't find anyplace we actually use this function.
$ rg 'brandSetFavicon'
web/src/common/api/config.ts: * @file brandSetFavicon() and AndNext(), which is used for redirects and flow steps
web/src/common/api/config.ts:export function brandSetFavicon(brand: CurrentBrand) {
$
# Conflicts: # web/src/flow/FlowExecutor.ts
emilburzo
left a comment
There was a problem hiding this comment.
backend part only seems to be a test?
|
|
django templates as well i think |
…on-2026.8) (#25992) * Cherry-pick #25103 to version-2026.8 (with conflicts) This cherry-pick has conflicts that need manual resolution. Original PR: #25103 Original commit: 6283e48 * web: resolve themed icon cherry-pick conflicts --------- Co-authored-by: Dominic Roy <[email protected]>
Icons using the %(theme)s placeholder rendered the literal placeholder in several places:
All web icon rendering now goes through a shared helper, and the server-rendered templates pick the light/dark variant via
data-theme and prefers-color-scheme.
Closes #25101
Closes #25255