Repository navigation
web/elements: rebuild ak-checkbox-group as a form-associated element - #27048
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 #27048 +/- ##
==========================================
- Coverage 92.42% 92.41% -0.01%
==========================================
Files 1192 1192
Lines 80462 80462
Branches 4351 4351
==========================================
- Hits 74363 74359 -4
- Misses 6033 6037 +4
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 40453507219 -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-828fea28e4c9b09ddf30265b07f4463f11c2b5d9
# Distroless image: AUTHENTIK_TAG=gh-828fea28e4c9b09ddf30265b07f4463f11c2b5d9-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-828fea28e4c9b09ddf30265b07f4463f11c2b5d9
# Distroless image: tag: gh-828fea28e4c9b09ddf30265b07f4463f11c2b5d9-distrolessAfterwards, run the upgrade commands from the latest release notes. |
287ca44 to
d680d0c
Compare
kensternberg-authentik
left a comment
There was a problem hiding this comment.
One suggestion, but otherwise straightforward.
52c94a6 to
5b64969
Compare
ak-checkbox-group now extends FormAssociatedElement instead of the deprecated AKControlElement, and is form-associated whether or not it has a name. `value` is the host's selection and `values` holds the user's choices. A custom hasChanged compares the two selections as sets of names. Most call sites compute `value` with map/filter on every render, so a new array with the same names keeps the user's choices and different names replace them. This replaces the "apply value on first update only" flag and drops the write-back into `value`. The change and input events now reach the host's ancestors. The old connectedCallback stopped every change and input event on the element, including its own, and re-added those listeners on each reconnect. Native input events stop at the checkbox instead. Form association brings form.elements membership, one FormData entry per chosen option, formResetCallback restoring the host's value, and a missing value reported on the first checkbox when `required`. Checkboxes bind `.checked`, so a reset updates boxes the user already toggled.
5b64969 to
828fea2
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) ...
Details
This PR moves
ak-checkbox-groupoffAKControlElementontoFormAssociatedElement.form.elements, create one FormData entry per option, reseting to the host'svalue, and anchorrequiredvalidation to the first checkbox.valueas the selection; store user choices in state.value.changeandinputevents—including ones dispatched by the group—can reach ancestors.