Repository navigation
web/admin: Simplify sidebar entries handling - #27112
Conversation
✅ 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 #27112 +/- ##
==========================================
- Coverage 92.41% 92.41% -0.01%
==========================================
Files 1192 1192
Lines 80462 80462
Branches 4351 4351
==========================================
- Hits 74358 74356 -2
- Misses 6038 6040 +2
Partials 66 66
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
Playwright e2eDownload this run's HTML report and traces, then open the report: gh run download 40443675205 -D playwright-artifacts
npx playwright show-report playwright-artifacts/playwright-reportInstallation instructionsInstructions for docker-composeAdd the following block to your AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-0204744023a8b7ccafd6227f83b17ff64cba3249
# Distroless image: AUTHENTIK_TAG=gh-0204744023a8b7ccafd6227f83b17ff64cba3249-distroless
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-0204744023a8b7ccafd6227f83b17ff64cba3249
# Distroless image: tag: gh-0204744023a8b7ccafd6227f83b17ff64cba3249-distrolessAfterwards, run the upgrade commands from the latest release notes. |
✅ Deploy Preview for authentik-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
f8d45af to
e3f821b
Compare
This commit streamlines how sidebar entries are generated and validated. The `entries` field was only being used as a signal to `requestUpdate()`; the actual entries were being generated on the fly in `get navigateEntries()`. We already had functions to generate the base entries and the enterprise entries, and putting the “just base or base + enterprise” function into the `sidebar.ts` file reduced the `navigateEntries` to two lines, and separates the “canEnterprise” from “what does that mean for sidebar” nicely. @GirlBossRush, there’s a `validateRoutes` function in `./src/admin/navigation/sidebar.ts` that I tried to make into a unit test, but I could not get to run under Vitest, mostly because `Routes.ts` has exactly one side-effect import and Vitest cannot handle that. I didn’t want to make it a browser test, however. Any suggestions?
…is to have the dashboard as live as possible as early as possible. Putting into Routes made Routes into a browser-only feature, and it could not be unit tested without this move.
e3f821b to
7114599
Compare
…estamp' into web/elements/ak-timestamp * refs/remotes/origin/web/elements/ak-timestamp: (119 commits) Potential fix for pull request finding 'Implicit operand conversion' Move constant to be, y'know, a constant. web/elements: formalize the timestamp display web/elements: rebuild ak-checkbox-group as a form-associated element (#27048) web/elements: re-arrange sidebar footer dependency (#27033) web/elements: rebuild ak-array-input as a form-associated element (#27046) web/admin: Simplify sidebar entries handling (#27112) revert: core: bump paramiko from 5.0.1 to 5.1.0 (#27258) web: Flow overlays cleanup (#27028) website/integrations: add agent-claude code doc (#27195) providers/oauth2: support saml token exchange (#27135) root: bump rust deps (#27190) root: bump Go to 1.27.3 (#27151) website/docs: update ha and LDAP provider docs (#27119) website/docs: events: change sidebar title and ordering (#27130) core: bump library/golang from `1896654` to `fbb7ae4` in /lifecycle/container (#27157) core: bump library/node from `1653c74` to `36793bc` in /lifecycle/container (#27158) core: bump library/node from `62314d9` to `a98e6fd` in /website (#27159) core: bump library/nginx from 1.31.6-trixie to 1.31.8-trixie in /website (#27160) ci: bump the codeql group across 1 directory with 3 updates (#27165) ...
…ntab' into web/elements/ak-crontab * refs/remotes/origin/web/elements/ak-crontab: (221 commits) web/elements: introduce the crontab component Potential fix for pull request finding 'Implicit operand conversion' Move constant to be, y'know, a constant. web/elements: formalize the timestamp display web/elements: rebuild ak-checkbox-group as a form-associated element (#27048) web/elements: re-arrange sidebar footer dependency (#27033) web/elements: rebuild ak-array-input as a form-associated element (#27046) web/admin: Simplify sidebar entries handling (#27112) revert: core: bump paramiko from 5.0.1 to 5.1.0 (#27258) web: Flow overlays cleanup (#27028) website/integrations: add agent-claude code doc (#27195) providers/oauth2: support saml token exchange (#27135) root: bump rust deps (#27190) root: bump Go to 1.27.3 (#27151) website/docs: update ha and LDAP provider docs (#27119) website/docs: events: change sidebar title and ordering (#27130) core: bump library/golang from `1896654` to `fbb7ae4` in /lifecycle/container (#27157) core: bump library/node from `1653c74` to `36793bc` in /lifecycle/container (#27158) core: bump library/node from `62314d9` to `a98e6fd` in /website (#27159) core: bump library/nginx from 1.31.6-trixie to 1.31.8-trixie in /website (#27160) ...
This commit streamlines how sidebar entries are generated and validated. The
entriesfield was only being used as a signal torequestUpdate(); the actual entries were being generated on the fly inget navigateEntries().We already had functions to generate the base entries and the enterprise entries, and putting the “just base or base + enterprise” function into the
sidebar.tsfile reduced thenavigateEntriesto two lines, and separates the “canEnterprise” from “what does that mean for sidebar” nicely.@GirlBossRush, there’s a
validateRoutesfunction in./src/admin/navigation/sidebar.tsthat I tried to make into a unit test, but I could not get to run under Vitest, mostly becauseRoutes.tshas exactly one side-effect import and Vitest cannot handle that. I didn’t want to make it a browser test, however. Any suggestions?Checklist
make all)make docs)