Repository navigation
web/elements: extract mermaid runtime, modernize <ak-diagram> - #22980
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 #22980 +/- ##
=======================================
Coverage 93.25% 93.25%
=======================================
Files 1032 1032
Lines 60164 60164
Branches 400 400
=======================================
Hits 56105 56105
Misses 4059 4059
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-e7a98622bf6327a7bb4f07eaa0b0c97ecf8dbb65
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-e7a98622bf6327a7bb4f07eaa0b0c97ecf8dbb65Afterwards, run the upgrade commands from the latest release notes. |
| refreshHandler = (): void => { | ||
| this.diagram = undefined; | ||
| @observes("flowSlug") | ||
| protected refresh(): void { |
There was a problem hiding this comment.
Pretty! :-)
ad9c5ac to
ef0dc5b
Compare
0c76d6e to
312243f
Compare
✅ Deploy Preview for authentik-integrations ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for authentik-integrations ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
* main: (68 commits) root: bump pyo3 (#23036) websites/integrations: specify redirect uri of type authorization or post logout (#22981) website/integrations: Update nextcloud to support post logout redirect uri (#22989) stages/captcha: add Cap and JSON verification support (#22373) web: bump @goauthentik/tsconfig from 1.0.9 to 2.0.0 in /web/packages/core in the goauthentik group across 1 directory (#22996) website/integrations: add kavita (#23000) website/integrations: add post logout to audiobookshelf (#22999) website/docs: additional scim provider docs (#22135) translate: Updates for project authentik and language fr_FR (#22986) translate: Updates for project authentik and language hu_HU (#22987) translate: Updates for project authentik and language no_NO (#22988) lifecycle/aws: bump aws-cdk from 2.1125.0 to 2.1126.0 in /lifecycle/aws (#22990) core: bump astral-sh/uv from 0.11.19 to 0.11.20 in /lifecycle/container (#22991) core: bump goauthentik/fips-python from `ede0a00` to `94d8805` in /lifecycle/container (#22992) core: bump uvicorn[standard] from 0.48.0 to 0.49.0 (#22993) core: bump which from 8.0.2 to 8.0.3 (#22994) ci: bump taiki-e/install-action from 2.81.7 to 2.81.8 in /.github/actions/setup (#22995) web/elements: extract mermaid runtime, modernize `<ak-diagram>` (#22980) core, web: update translations (#22983) website/integrations: dokuwiki: add post logout and logout urls (#22984) ...
Splits the first commit of #21949 into its own PR per @kensternberg-authentik's review. Same commit, rebased onto current
main, with the twoFlowDiagramfollow-ups from the inline comments applied. #21949 gets rebased on top once this lands.What this changes
Diagraminto a new#common/mermaidmodule.loadMermaid(uiTheme)lazy-loads the library on first call and reinitialises it when the active UI theme changes, so the whole app shares one mermaid instance instead of each<ak-diagram>constructor callingmermaid.initializefor itself.<ak-diagram>switches to@listen(AKRefreshEvent, { target: window })for its sync hook and renders throughguard([diagram, activeTheme], () => until(this.renderMermaid(), loadingPlaceholder)). Inline styles move out toDiagram.css, and the SVG host selector is renamed frommermaid-svg-todiagramto match the new mermaid render id.FlowDiagramandOAuthSourceDiagramadopt the renamedsyncDiagramContenthook from the parent.Review feedback addressed
Two inline comments on
FlowDiagram.tsfrom the #21949 review:requestUpdate()-inside-a-guarded-method dance is replaced with pfe-core's@observes("flowSlug"). The decorator wires up aPropertyObserverControllerthat fires the callback duringhostUpdate, ahead ofshouldUpdate, so settingflowSlugschedules the API fetch without any manual update plumbing.new FlowsApi(DEFAULT_CONFIG)to theaki(FlowsApi)helper that landed onmainafter web: MDX without React #21949 was cut.Test plan
npm run lint-check: clean.npm run lint:types: only error isOAuthSourceViewPage.ts(34,63), which is also present on plainupstream/mainand unrelated to this change.npm run build: production bundle builds cleanly.web/test/browser/ak-mdx.test.tsbelongs to the MDX commits of web: MDX without React #21949 and is deliberately not part of this PR.Disclosure
Triaged and authored end-to-end by an agent running in a sandbox against
goauthentik/authentik@main. Reviewed and shipped by @GirlBossRush.