Repository navigation
web/elements: expansion visual hierarchy - #27562
Conversation
## Description The lack of visual separation between BoundPoliciesList, TaskList, and ScheduleList in expansion rows has always irritated me. It’s hard to make out what I’m looking at, at any given time. This commit creates a new visual primitive to make that easier, and wraps expansion row targets in it. ### SectionCard This commit provides a new visual primitive element, `ak-section-card`, that exists strictly to provide that visual separation: a strong label, a consistent location for the description, a visual separation using both whitespace and a border to create visual distinctiveness between components in an expansion row. ### Table The table CSS is updated to say that if the table has an `ak-section-card` in it, it’s a flex display with objects in top-to-bottom order, and it has off-the-inline-start spacing so that each “depth” of the hierarchy is clear and apparent. The table itself is updated to get rid of the leftmost column. It wasn’t used by default, and its spacing was quite wide compared to the design provided by this change. ### Tasks and Schedules The tasks and schedules lists have been wrapped in SectionCard and properly annotated with labels (“Tasks” or “Schedules”) as appropriate. Cleanup: Rather than create a new SectionCard for the task list associated with a schedule, I just read in the taskList functional renderer from `TaskList`. ### BoundPoliciesList While I was replacing the BoundPoliciesList with SectionCard-wrapped equivalents, I noticed that they all had a set pattern, so I extracted the pattern and created a `renderBoundPoliciesExpansion()` function that handles all the details. That both cleaned up a number of call locations and affirmed their types, and it let me only have to write one new SectionCard wrapper. Cleanup: In order to avoid duplicating the default `allowedTypes` from BoundPoliciesList in `renderBoundPoliciesExpansion()`, I extracted the default list into a top-level `const` and exported it; now both can use it safely. Cleanup: The description of the bound policies for ApplicationEntitlements is now in the correct place. ## Status I haven’t figured out what to do with the `F#$!%!^!#` `Path:` field in the BlueprintsList page.
✅ 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 #27562 +/- ##
=======================================
Coverage 93.01% 93.01%
=======================================
Files 1230 1230
Lines 85771 85771
Branches 4894 4894
=======================================
+ Hits 79777 79779 +2
+ Misses 5907 5905 -2
Partials 87 87
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
…take anything, so I provided a capacity to pass it a 'TemplateResult'. I don't know, maybe someone will want to pass text wrapped in a tooltip or something someday.
| } | ||
|
|
||
| protected override renderExpanded(item: NotificationRule): TemplateResult { | ||
| return html`<p> |
There was a problem hiding this comment.
I suggest "View file" for this one. It's just annoying how Github displays diffs. Also, this is the only "description" field where the description is wrapped in a <p>, which has no visual effect. I've placed into the BoundPoliciesList description instead.
| return html`${label}`; | ||
| } | ||
|
|
||
| export const defaultAllowedTypes = [ |
There was a problem hiding this comment.
In order to avoid duplicating the default allowedTypes from BoundPoliciesList in renderBoundPoliciesExpansion(), I extracted the default list into a top-level const and exported it; now both can use it safely.
| } | ||
|
|
||
| renderExpanded(item: Schedule): TemplateResult { | ||
| const [appLabel, modelName] = ModelEnum.AuthentikTasksSchedulesSchedule.split("."); |
There was a problem hiding this comment.
Rather than create a new SectionCard for the task list associated with a schedule, I just
read in the taskList functional renderer from TaskList.
Playwright e2eDownload this run's HTML report and traces, then open the report: gh run download 42071227518 -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-8c518b62f5bdabfef982402ef1f2c9234b88a05b
# Distroless image: AUTHENTIK_TAG=gh-8c518b62f5bdabfef982402ef1f2c9234b88a05b-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-8c518b62f5bdabfef982402ef1f2c9234b88a05b
# Distroless image: tag: gh-8c518b62f5bdabfef982402ef1f2c9234b88a05b-distrolessAfterwards, run the upgrade commands from the latest release notes. |
* main: flows: format titles correct on first render if possible (#27589) common/saml: Add ability to select nameid unspecified (#27027) core: bump cachetools from 7.2.7 to 7.2.8 (#27575) core: bump pytest from 9.1.1 to 9.2.0 (#27573) core: bump django from 5.2.18 to 5.2.19 (#27574) core: bump pydantic from 2.14.1 to 2.14.2 (#27576) ci: bump taiki-e/install-action from 2.88.1 to 2.89.0 in /.github/actions/setup (#27577) common/saml: skip Ed25519 tests when FIPS is enabled (#27583) outposts/proxy: verify ML-DSA signed tokens (#27171) web: bump js-yaml from 4.3.0 to 4.3.2 (#27522)
…he extra CSS or its override.
…Lists in DataExport.
✅ Deploy Preview for authentik-storybook 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. |
| return html` ${renderBoundPoliciesExpansion({ | ||
| target: item.pk, | ||
| description: msg( | ||
| `These bindings control upon which events this rule triggers. | ||
| Bindings to groups/users are checked against the user of the event.`, | ||
| )} | ||
| </p> | ||
| <ak-bound-policies-list .target=${item.pk}> </ak-bound-policies-list> | ||
| ${taskCard(NOTIFICATION_MODEL, item.pk)}`; | ||
| ), | ||
| })} | ||
| ${taskCard(NOTIFICATION_MODEL, item.pk)}`; |
There was a problem hiding this comment.
| return html` ${renderBoundPoliciesExpansion({ | |
| target: item.pk, | |
| description: msg( | |
| `These bindings control upon which events this rule triggers. | |
| Bindings to groups/users are checked against the user of the event.`, | |
| )} | |
| </p> | |
| <ak-bound-policies-list .target=${item.pk}> </ak-bound-policies-list> | |
| ${taskCard(NOTIFICATION_MODEL, item.pk)}`; | |
| ), | |
| })} | |
| ${taskCard(NOTIFICATION_MODEL, item.pk)}`; | |
| return [ | |
| renderBoundPoliciesExpansion({ | |
| target: item.pk, | |
| description: msg( | |
| `These bindings control upon which events this rule triggers. | |
| Bindings to groups/users are checked against the user of the event.`, | |
| ), | |
| }), | |
| taskCard(NOTIFICATION_MODEL, item.pk), | |
| ]; |
There was a problem hiding this comment.
src/admin/events/RuleListPage.ts:128:9 - error TS2739: Type 'TemplateResult<1>[]' is missing the following properties from type 'TemplateResult': ['_$litType$'], strings
This is why I don't want us putting return types on methods. Let the inference engine do its job!
| export function renderBoundPoliciesExpansion(props: PolicyBindingProps) { | ||
| const { label, description, allowed, target, mode, notices } = props; |
There was a problem hiding this comment.
| export function renderBoundPoliciesExpansion(props: PolicyBindingProps) { | |
| const { label, description, allowed, target, mode, notices } = props; | |
| export const BoundPoliciesExpansion: LitFC<PolicyBindingProps> = ({ label, description, allowed, target, mode, notices }) { |
There was a problem hiding this comment.
Return type is not consistent with usage. LitFC<> requires that null be a valid return type, even if the client code rejects null as a possibility. Can't use it here.
| @property({ type: String }) | ||
| public label: string | null = null; | ||
|
|
||
| public override render() { |
There was a problem hiding this comment.
| public override render() { | |
| protected override render(): SlottedTemplateResult { |
* main: (28 commits) events: bundle DB-IP Lite GeoIP databases instead of MaxMind GeoLite2 (#27102) web/admin: fix ldap source parent group form (#26421) stages/prompt: preserve empty initial values (#25148) core: batch expired cache and channel record cleanup (#27587) web: bump mermaid from 11.16.0 to 12.3.0 in /website (#27598) ci: bump taiki-e/install-action from 2.89.0 to 2.89.1 in /.github/actions/setup (#27630) core: bump goauthentik/fips-python from `d4c46c4` to `69e7058` in /lifecycle/container (#27626) ci: bump AndreKurait/docker-cache from 0.7.0 to 0.7.1 in /.github/actions/setup (#27628) ci: bump actions-rust-lang/setup-rust-toolchain from 2.0.0 to 2.0.1 in /.github/actions/setup (#27629) ci: bump actions-rust-lang/setup-rust-toolchain from 2.0.0 to 2.0.1 (#27627) providers/oauth2: sign tokens with ML-DSA keys (#27172) sources/oauth: verify ML-DSA signed tokens (#27170) web: bump postcss from 8.5.18 to 8.5.32 in /website (#27602) web: bump postcss from 8.5.16 to 8.5.32 in /web (#27604) web/element: fix missing line break between elapsed time and displayed time. (#27624) web/elements: rename ak-codemirror to ak-code-editor (#27406) website/integrations: add Google Cloud Workforce Identity Federation guide (#27571) root: test that FIPS mode refuses non-approved algorithms (#27536) web: bump nanoid from 3.3.16 to 3.3.20 in /website (#27599) web: bump baseline-browser-mapping from 2.10.43 to 2.11.35 in /website (#27600) ...
Co-authored-by: Teffen Ellis <[email protected]> Signed-off-by: Ken Sternberg <[email protected]>
Co-authored-by: Teffen Ellis <[email protected]> Signed-off-by: Ken Sternberg <[email protected]>
Co-authored-by: Teffen Ellis <[email protected]> Signed-off-by: Ken Sternberg <[email protected]>
…ion-visual-hierarchy' into web/elements/expansion-visual-hierarchy * refs/remotes/origin/web/elements/expansion-visual-hierarchy: Update web/src/admin/requests/BoundRequestRulesTable.ts Update web/src/admin/policies/renderPolicyBindings.ts Update web/src/admin/policies/renderPolicyBindings.ts
…b-controller' into web/admin/breadcrumb-controller * refs/remotes/origin/web/admin/breadcrumb-controller: (214 commits) The updated format for crumbs required an update to the unit tests. web/admin: Add a Breadcrumb context manager to the navigation suite Adding the Breadcrumbs visual component. Revised naming code to track certain features. web/elements: vendor sidebar and add icons (#27289) providers/oauth2: don't set state in responses if not supplied (#9735) web/elements: expansion visual hierarchy (#27562) providers/oauth2: accept ML-DSA keys for DPoP (#27174) website/docs: draft 2026.11 release notes (#26814) sources/ldap: store the directory date when resetting a password (#27578) events: bundle DB-IP Lite GeoIP databases instead of MaxMind GeoLite2 (#27102) web/admin: fix ldap source parent group form (#26421) stages/prompt: preserve empty initial values (#25148) core: batch expired cache and channel record cleanup (#27587) web: bump mermaid from 11.16.0 to 12.3.0 in /website (#27598) ci: bump taiki-e/install-action from 2.89.0 to 2.89.1 in /.github/actions/setup (#27630) core: bump goauthentik/fips-python from `d4c46c4` to `69e7058` in /lifecycle/container (#27626) ci: bump AndreKurait/docker-cache from 0.7.0 to 0.7.1 in /.github/actions/setup (#27628) ci: bump actions-rust-lang/setup-rust-toolchain from 2.0.0 to 2.0.1 in /.github/actions/setup (#27629) ci: bump actions-rust-lang/setup-rust-toolchain from 2.0.0 to 2.0.1 (#27627) ...
…k-controller * web/admin/breadcrumb-controller: (215 commits) Changes requested by reviewer (@GirlBossRush). The updated format for crumbs required an update to the unit tests. web/admin: Add a Breadcrumb context manager to the navigation suite Adding the Breadcrumbs visual component. Revised naming code to track certain features. web/elements: vendor sidebar and add icons (#27289) providers/oauth2: don't set state in responses if not supplied (#9735) web/elements: expansion visual hierarchy (#27562) providers/oauth2: accept ML-DSA keys for DPoP (#27174) website/docs: draft 2026.11 release notes (#26814) sources/ldap: store the directory date when resetting a password (#27578) events: bundle DB-IP Lite GeoIP databases instead of MaxMind GeoLite2 (#27102) web/admin: fix ldap source parent group form (#26421) stages/prompt: preserve empty initial values (#25148) core: batch expired cache and channel record cleanup (#27587) web: bump mermaid from 11.16.0 to 12.3.0 in /website (#27598) ci: bump taiki-e/install-action from 2.89.0 to 2.89.1 in /.github/actions/setup (#27630) core: bump goauthentik/fips-python from `d4c46c4` to `69e7058` in /lifecycle/container (#27626) ci: bump AndreKurait/docker-cache from 0.7.0 to 0.7.1 in /.github/actions/setup (#27628) ci: bump actions-rust-lang/setup-rust-toolchain from 2.0.0 to 2.0.1 in /.github/actions/setup (#27629) ...
web/admin: Provide a stronger visual hierarchy for expansion rows.
Description
The lack of visual separation between BoundPoliciesList, TaskList, and ScheduleList in expansion rows has always irritated me. It’s hard to make out what I’m looking at, at any given time. This commit creates a new visual primitive to make that easier, and wraps expansion row targets in it.
SectionCard
This commit provides a new visual primitive element,
ak-section-card, that exists strictly to provide that visual separation: a strong label, a consistent location for the description, a visual separation using both whitespace and a border to create visual distinctiveness between components in an expansion row.Table
The table CSS is updated to say that if the table has an
ak-section-cardin it, it’s a flex display with objects in top-to-bottom order, and it has off-the-inline-start spacing so that each “depth” of the hierarchy is clear and apparent.The table itself is updated to get rid of the leftmost column. It wasn’t used by default, and its spacing was quite wide compared to the design provided by this change.
Tasks and Schedules
The tasks and schedules lists have been wrapped in SectionCard and properly annotated with labels (“Tasks” or “Schedules”) as appropriate.
Cleanup: Rather than create a new SectionCard for the task list associated with a schedule, I just read in the taskList functional renderer from
TaskList.BoundPoliciesList
While I was replacing the BoundPoliciesList with SectionCard-wrapped equivalents, I noticed that they all had a set pattern, so I extracted the pattern and created a
renderBoundPoliciesExpansion()function that handles all the details. That both cleaned up a number of call locations and affirmed their types, and it let me only have to write one new SectionCard wrapper.Cleanup: In order to avoid duplicating the default
allowedTypesfrom BoundPoliciesList inrenderBoundPoliciesExpansion(), I extracted the default list into a top-levelconstand exported it; now both can use it safely.Cleanup: The description of the bound policies for ApplicationEntitlements is now in the correct place.
Status
I haven’t figured out what to do with the
F#$!%!^!#Path:field in the BlueprintsList page.Checklist
make all)make docs)