Skip to content

web/elements: rebuild ak-checkbox-group as a form-associated element - #27048

Merged
GirlBossRush merged 2 commits into
mainfrom
web/checkbox-group-form-associated
Oct 27, 2026
Merged

GirlBossRush merged 2 commits into
mainfrom
web/checkbox-group-form-associated

Conversation

@GirlBossRush

@GirlBossRush GirlBossRush commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Details

This PR moves ak-checkbox-group off AKControlElement onto FormAssociatedElement.

  • Added form support: include it in form.elements, create one FormData entry per option, reseting to the host's value, and anchor required validation to the first checkbox.
  • Keep the host's value as the selection; store user choices in state.
  • Compare selections by option name. Rebuilt arrays with the same names keep their checked state; different names replace it.
  • Remove the apply-on-first-update flag and stop writing user choices back to value.
  • Fix event handling so change and input events—including ones dispatched by the group—can reach ancestors.

@GirlBossRush
GirlBossRush requested a review from a team as a code owner October 20, 2026 05:23
@GirlBossRush
GirlBossRush added this pull request to stack #27047 October 20, 2026 05:24
@GirlBossRush GirlBossRush added a11y Features or issues related to accessibility area:frontend Features or issues related to the browser, TypeScript, Node.js, etc labels Oct 20, 2026
@netlify

netlify Bot commented Oct 20, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 287ca44
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6ad6fadd26f9b3b14ae10fa5
😎 Deploy Preview https://deploy-preview-27048--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.41%. Comparing base (7dc50d2) to head (828fea2).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

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              
Flag Coverage Δ
conformance 32.30% <ø> (+<0.01%) ⬆️
e2e 36.97% <ø> (-0.01%) ⬇️
integration 29.19% <ø> (+<0.01%) ⬆️
rust 44.42% <ø> (ø)
unit 94.06% <ø> (+<0.01%) ⬆️
unit-migrate 94.06% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Playwright e2e

Download 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-report

Installation instructions

Instructions for docker-compose

Add the following block to your .env file:

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)s

Afterwards, run the upgrade commands from the latest release notes.

Instructions for Kubernetes

Add the following block to your values.yml file:

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-distroless

Afterwards, run the upgrade commands from the latest release notes.

@BeryJu
BeryJu force-pushed the web/checkbox-group-form-associated branch from 287ca44 to d680d0c Compare October 20, 2026 11:26

@kensternberg-authentik kensternberg-authentik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One suggestion, but otherwise straightforward.

@github-project-automation github-project-automation Bot moved this from Todo to In Progress in authentik Core Oct 26, 2026
@GirlBossRush
GirlBossRush force-pushed the web/checkbox-group-form-associated branch 2 times, most recently from 52c94a6 to 5b64969 Compare October 27, 2026 02:43
@GirlBossRush
GirlBossRush enabled stacked auto-merge (squash) October 27, 2026 02:46
@GirlBossRush
GirlBossRush disabled stacked auto-merge October 27, 2026 05:07
Base automatically changed from web/array-input-form-associated to main October 27, 2026 05:07
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.
@GirlBossRush
GirlBossRush force-pushed the web/checkbox-group-form-associated branch from 5b64969 to 828fea2 Compare October 27, 2026 05:07
@GirlBossRush
GirlBossRush enabled stacked auto-merge (squash) October 27, 2026 05:25
@GirlBossRush
GirlBossRush merged commit ec66a3a into main Oct 27, 2026
170 checks passed
@GirlBossRush
GirlBossRush deleted the web/checkbox-group-form-associated branch October 27, 2026 05:26
@github-project-automation github-project-automation Bot moved this from In Progress to Done in authentik Core Oct 27, 2026
kensternberg-authentik added a commit that referenced this pull request Oct 30, 2026
…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)
  ...
kensternberg-authentik added a commit that referenced this pull request Oct 30, 2026
…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)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a11y Features or issues related to accessibility area:frontend Features or issues related to the browser, TypeScript, Node.js, etc

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants