Repository navigation
web/admin: maintenance: give dialogs default exports - #20397
Conversation
## What Provide dynamically imported dialogs and forms a default export. Some minor cleanup of types: `PropertyValues` -\> `PropertyValues<this>` provides stronger type guarantees. ## Why We define stages and other dynamic processes on the server side using a token, the server-side component name. Client-side elements are instantiated with a constructor and identified with an element tag name. Dynamically importing components automatically registered the element tag name with the constructor, enabling custom elements to work. Without the default export, the registration goes to the browser but the identity of the component’s underlying constructor is lost. Browsers provide a reverse lookup: given a component’s constructor it can provide the registration tag. By having default exports, we allow dynamic imports to record the constructor, retrieve the tag, and dynamically construct the templates without having to manually maintain the tag/constructor relationship (which is already complicated enough by that server-side component/client-side element relationship). ## Testing This is purely internal maintenance; it’s about hardening the build, not changing behavior. If it lints and builds cleanly, the only real test is that nothing is borken afterwards.
✅ 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 #20397 +/- ##
==========================================
- Coverage 93.30% 93.25% -0.05%
==========================================
Files 981 981
Lines 55161 55161
==========================================
- Hits 51466 51442 -24
- Misses 3695 3719 +24
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
authentik PR Installation instructions Instructions for docker-composeAdd the following block to your AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-9e77522d5dc9dfe022f82b529c15eb04d51d09cb
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-9e77522d5dc9dfe022f82b529c15eb04d51d09cbAfterwards, run the upgrade commands from the latest release notes. |
…to web/flow/tablize-token-component-relationship-v3-error-handling * web/flow/19999-tablize-token-component-relationship: (58 commits) web/admin: maintenance: centralize types that are used across stages (#20398) website/integrations: beszel: remove slug reference (#20393) web/admin: maintenance: give dialogs default exports (#20397) web: Fix element property names with custom attributes. (#20396) enterprise/providers/microsoft_entra: fix dangling comma (#20391) web/admin: bug: stage update forms not rendering, several modal form buttons missing (#20373) lifecycle: bump rac guacd base image (#20390) web: revert `tree-sitter` removal from lockfile (#20377) root: fix dependabot config for docker (#20380) website/docs: Fix broken link to flow executor (#20364) core: add cause to `ak_groups` deprecation event and logs (#20361) rbac: fix object permission request (#20304) enterprise/providers/ws_federation: fix incorrect metadata download URL (#20173) core, web: update translations (#20303) stages/authenticator_webauthn: Update FIDO MDS3 & Passkey aaguid blobs (#20305) core: bump django-countries from 7.6.1 to 8.2.0 (#19459) web: bump the storybook group across 1 directory with 5 updates (#20130) web: bump pino from 10.3.0 to 10.3.1 in /web (#20133) core: bump github.com/pires/go-proxyproto from 0.10.0 to 0.11.0 (#20182) web: bump @patternfly/elements from 4.2.0 to 4.3.1 in /web (#20185) ...
…to web/flow/20030-one-true-api * web/flow/19999-tablize-token-component-relationship: (58 commits) web: Flesh out stage mapping error handling. (#20292) web/admin: maintenance: centralize types that are used across stages (#20398) website/integrations: beszel: remove slug reference (#20393) web/admin: maintenance: give dialogs default exports (#20397) web: Fix element property names with custom attributes. (#20396) enterprise/providers/microsoft_entra: fix dangling comma (#20391) web/admin: bug: stage update forms not rendering, several modal form buttons missing (#20373) lifecycle: bump rac guacd base image (#20390) web: revert `tree-sitter` removal from lockfile (#20377) root: fix dependabot config for docker (#20380) website/docs: Fix broken link to flow executor (#20364) core: add cause to `ak_groups` deprecation event and logs (#20361) rbac: fix object permission request (#20304) enterprise/providers/ws_federation: fix incorrect metadata download URL (#20173) core, web: update translations (#20303) stages/authenticator_webauthn: Update FIDO MDS3 & Passkey aaguid blobs (#20305) core: bump django-countries from 7.6.1 to 8.2.0 (#19459) web: bump the storybook group across 1 directory with 5 updates (#20130) web: bump pino from 10.3.0 to 10.3.1 in /web (#20133) core: bump github.com/pires/go-proxyproto from 0.10.0 to 0.11.0 (#20182) ...
…t-flow-inspector * web/flow/20030-one-true-api: (58 commits) web: Flesh out stage mapping error handling. (#20292) web/admin: maintenance: centralize types that are used across stages (#20398) website/integrations: beszel: remove slug reference (#20393) web/admin: maintenance: give dialogs default exports (#20397) web: Fix element property names with custom attributes. (#20396) enterprise/providers/microsoft_entra: fix dangling comma (#20391) web/admin: bug: stage update forms not rendering, several modal form buttons missing (#20373) lifecycle: bump rac guacd base image (#20390) web: revert `tree-sitter` removal from lockfile (#20377) root: fix dependabot config for docker (#20380) website/docs: Fix broken link to flow executor (#20364) core: add cause to `ak_groups` deprecation event and logs (#20361) rbac: fix object permission request (#20304) enterprise/providers/ws_federation: fix incorrect metadata download URL (#20173) core, web: update translations (#20303) stages/authenticator_webauthn: Update FIDO MDS3 & Passkey aaguid blobs (#20305) core: bump django-countries from 7.6.1 to 8.2.0 (#19459) web: bump the storybook group across 1 directory with 5 updates (#20130) web: bump pino from 10.3.0 to 10.3.1 in /web (#20133) core: bump github.com/pires/go-proxyproto from 0.10.0 to 0.11.0 (#20182) ...
Picks up the non-PR-#21380 changes to captcha files that are already on main: `.style-scope` selector variants in CaptchaStage.css (from #20134) and `export default CaptchaStage` (from #20397). Both are functionally inert on this branch — no code applies the style-scope class to ak-stage-captcha, and no importer uses the default export — but including them keeps the cherry-pick zero-drift against main.
Picks up the non-PR-#21380 changes to captcha files that are already on main: `.style-scope` selector variants in CaptchaStage.css (from #20134) and `export default CaptchaStage` (from #20397). Both are functionally inert on this branch — no code applies the style-scope class to ak-stage-captcha, and no importer uses the default export — but including them keeps the cherry-pick zero-drift against main.
Picks up the non-PR-#21380 changes to captcha files that are already on main: `.style-scope` selector variants in CaptchaStage.css (from #20134) and `export default CaptchaStage` (from #20397). Both are functionally inert on this branch — no code applies the style-scope class to ak-stage-captcha, and no importer uses the default export — but including them keeps the cherry-pick zero-drift against main.
Picks up the non-PR-#21380 changes to captcha files that are already on main: `.style-scope` selector variants in CaptchaStage.css (from #20134) and `export default CaptchaStage` (from #20397). Both are functionally inert on this branch — no code applies the style-scope class to ak-stage-captcha, and no importer uses the default export — but including them keeps the cherry-pick zero-drift against main.
…#21380 to version-2025.12) (#21472) * web: Captcha Refinements, Part 2 (#19757) * Move inline styles into separate file. * Fix preferred order of captcha vendor discovery. * Clean up mutation and resize observer lifecycle. * Flesh out controllers. * Tidy refresh. * Fix incompatibilities with Storybook. * Flesh out captcha stories. * Bump package. * Flesh out stories. * Move inline styles into separate file. * Fix preferred order of captcha vendor discovery. * Clean up mutation and resize observer lifecycle. * Flesh out controllers. * Tidy refresh. * Remove unused. * Bump package. (cherry picked from commit 388f426) * web: Fix duplicate Turnstile widgets after extended idle (#21380) * Flesh out turnstile fixes. * format Signed-off-by: Jens Langhammer <[email protected]> --------- Signed-off-by: Jens Langhammer <[email protected]> Co-authored-by: Jens Langhammer <[email protected]> (cherry picked from commit 59ac8ba) * web: align captcha stage with post-21380 main drift Picks up the non-PR-#21380 changes to captcha files that are already on main: `.style-scope` selector variants in CaptchaStage.css (from #20134) and `export default CaptchaStage` (from #20397). Both are functionally inert on this branch — no code applies the style-scope class to ak-stage-captcha, and no importer uses the default export — but including them keeps the cherry-pick zero-drift against main. * bump. * Enforce strict tsconfig version. Format. * Fix linter warning. --------- Signed-off-by: Jens Langhammer <[email protected]> Co-authored-by: Teffen Ellis <[email protected]> Co-authored-by: Jens Langhammer <[email protected]>
What
Provide dynamically imported dialogs and forms a default export.
Some minor cleanup of types:
PropertyValues->PropertyValues<this>provides stronger type guarantees.Why
We define stages and other dynamic processes on the server side using a token, the server-side component name. Client-side elements are instantiated with a constructor and identified with an element tag name.
Dynamically importing components automatically registered the element tag name with the constructor, enabling custom elements to work. Without the default export, the registration goes to the browser but the identity of the component’s underlying constructor is lost. Browsers provide a reverse lookup: given a component’s constructor it can provide the registration tag. By having default exports, we allow dynamic imports to record the constructor, retrieve the tag, and dynamically construct the templates without having to manually maintain the tag/constructor relationship (which is already complicated enough by that server-side component/client-side element relationship).
Testing
This is purely internal maintenance; it’s about hardening the build, not changing behavior. If it lints and builds cleanly, the only real test is that nothing is borken afterwards.
make web)