Repository navigation
web/admin: QOL: Add "Expiring in n days" and "Expiring today" notices to LicenseStatusCard - #24300
Conversation
## What
This commit updates ak-enterprise-status-card with the following improvements:
- `@state()` replaced with `@property({ attribute: false })`, which gets us better linting and typechecking for client code
- `renderSummaryBadge()` uses a map expression instead of switch statement. Removes some boilerplate and clutter
- Slightly adjusted some margins, cleaning up the card. It’s a little shorter now, too.
- Fixed some misconceptions around what `msg(str` actually does. The remaining `msg` strings are all that lit-localize actually uses.
- Duplicate progress bars replaced with a single function that does the percentage and severity in a new scope, creating a tighter and more visually appealing codebase.
- Includes a complete Storybook story file with multiple stories for Valid, Expiring, Exceeded, Unlicensed and Loading
## Why
This mostly started as a test-case for ak-progress-bar. I needed a case where I could see the progress bar in use, and we didn’t have many of them. I decided to add a Storybook story for the Enterprise Status card, because it was a standalone component that used two of them, so it would be a good place to see how they looked stacked one atop another.
While I was rigging the Storybook, the linter complained that `@state()` wasn’t appropriate for properties that were being passed to the component. So I cleaned those. While trying to balance the whitespace around the `∞` symbol, I got frustrated with all the repetition and unbalanced code, and, well, things sorta spiraled out from there.
Anyway, it’s nicer now.
…ally the progressBar expression uses 'allowed' for the number of licensed users, and 'licensed' for the overall state of the product.
* main: policies: filter policy engine (#24025) endpoints/connectors/agent: fix auth schema for device endpoints (#24164) core, web: update translations (#24137) packages/django-dramatiq-postgres/broker: use positive state filter for pending messages (#24074) events: fix typo (#24161) root: fix agents test instructions (#24119) enterprise: fix enterprise_test skipping tests when used as class decorator (#24138) core: bump library/nginx from `ec4ed8b` to `b5a9a3c` in /website (#24146) core: bump github.com/pires/go-proxyproto from 0.14.0 to 0.15.0 (#24139) core: bump library/node from `ffc7838` to `715e55e` in /lifecycle/container (#24142) core: bump pnpm/pnpm from 11.12.0 to 11.13.0 in /lifecycle/container (#24144) core: bump library/golang from `ee5a795` to `3f1e064` in /lifecycle/container (#24143) core: bump pnpm/pnpm from 11.12.0 to 11.13.0 in /website (#24147) core: bump kubernetes from 36.0.2 to 36.0.3 (#24145) core: bump docker from 7.1.0 to 7.2.0 (#24149) web: bump webcomponent-qr-code from 1.3.0 to 2.0.0 in /web (#24152) core: bump regex from 1.12.4 to 1.13.0 (#24150) core: bump rust-toolchain from 1.97.0 to 1.97.1 (#24148) website/docs: cleanup 07-12: refresh contributor guidance (#23969) packages/ak-common/db: ignore empty passwords (#24127)
…es to LicenseStatusCard This was pretty straightforward, and it’s a nice thing that people will notice. Updated the Storybook stories: for the sake of testability, the dates are stable with respect to the current date: “Expiring Soon” is always 14 days out and “Expiring Today” is always 12 hours out.
✅ Deploy Preview for authentik-integrations ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ 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. |
| const today = new Date(); | ||
| if (summary === LicenseSummaryStatusEnum.ExpirySoon && valid) { | ||
| const gap = differenceInSeconds(valid, today); | ||
| // prettier-ignore |
There was a problem hiding this comment.
Someday I'm gonna figure out why prettier hates the when/with syntax so damn much.
## What
This commit updates ak-enterprise-status-card with the following improvements:
- `@state()` replaced with `@property({ attribute: false })`, which gets us better linting and typechecking for client code
- `renderSummaryBadge()` uses a map expression instead of switch statement. Removes some boilerplate and clutter
- Slightly adjusted some margins, cleaning up the card. It’s a little shorter now, too.
- Fixed some misconceptions around what `msg(str` actually does. The remaining `msg` strings are all that lit-localize actually uses.
- Duplicate progress bars replaced with a single function that does the percentage and severity in a new scope, creating a tighter and more visually appealing codebase.
- Includes a complete Storybook story file with multiple stories for Valid, Expiring, Exceeded, Unlicensed and Loading
## Why
This mostly started as a test-case for ak-progress-bar. I needed a case where I could see the progress bar in use, and we didn’t have many of them. I decided to add a Storybook story for the Enterprise Status card, because it was a standalone component that used two of them, so it would be a good place to see how they looked stacked one atop another.
While I was rigging the Storybook, the linter complained that `@state()` wasn’t appropriate for properties that were being passed to the component. So I cleaned those. While trying to balance the whitespace around the `∞` symbol, I got frustrated with all the repetition and unbalanced code, and, well, things sorta spiraled out from there.
Anyway, it’s nicer now.
…ally the progressBar expression uses 'allowed' for the number of licensed users, and 'licensed' for the overall state of the product.
…es to LicenseStatusCard This was pretty straightforward, and it’s a nice thing that people will notice. Updated the Storybook stories: for the sake of testability, the dates are stable with respect to the current date: “Expiring Soon” is always 14 days out and “Expiring Today” is always 12 hours out.
629f716 to
eb026d0
Compare
|
authentik PR Installation instructions Instructions for docker-composeAdd the following block to your AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-5b5aa4f46f802127b03b70d7a2b949fdbcaf2a8b
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-5b5aa4f46f802127b03b70d7a2b949fdbcaf2a8bAfterwards, run the upgrade commands from the latest release notes. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #24300 +/- ##
==========================================
- Coverage 93.51% 93.50% -0.02%
==========================================
Files 1062 1063 +1
Lines 63854 64087 +233
Branches 424 424
==========================================
+ Hits 59716 59924 +208
- Misses 4138 4163 +25
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
…ration-date' into web/qol/better-expiration-date * refs/remotes/origin/web/qol/better-expiration-date: (104 commits) web/admin: QOL: Add “Expiring in `n` days” and “Expiring today” notices to LicenseStatusCard Adding the '@file' comment. The language between licensed and isLicensed was confusing, so internally the progressBar expression uses 'allowed' for the number of licensed users, and 'licensed' for the overall state of the product. The severities ought to be in order, otherwise it's a mental pause. Another typo. Noticed a typo; prettier had an opinion. web/maint: clean-up ak-enterprise-status-card Some revisions to the enterprise status card. web: exclude dependabot-materialized link deps from workspace glob (#24297) core: fix object attributes not setting allow_blank (#24298) web: add build start/end log to build script (#24296) root: fix CODEOWNERS paths (#24259) core: object attributes - minor fixes (#24292) core: bump thiserror from 2.0.18 to 2.0.19 (#24281) core: bump serde from 1.0.228 to 1.0.229 (#24282) website/docs: update release notes for 2026.5.6 (#24293) ci: bump actions/setup-python from 6.3.0 to 7.0.0 in /.github/actions/setup (#24286) core, web: update translations (#24276) core: bump github.com/getsentry/sentry-go from 0.47.0 to 0.48.0 (#24277) core: bump pnpm/pnpm from 11.14.0 to 11.15.0 in /lifecycle/container (#24278) ...
* main: web/admin: enterprise status card properties (#24170) web/elements: update the progress bar (#24134) web/maint: upgrade ak-divider (#24082) web/bug: harmonize and make routine the display of tasks (part 6: sch… (#23859) web/maint: upgrade ak-toggle-group (#24038) web/bug: harmonize and make routine the display of schedules, part 2: Description lists (#23856)
* main: (172 commits) web/admin: QOL: Add "Expiring in `n` days" and "Expiring today" notices to LicenseStatusCard (#24300) stages/authenticator: protect devices from stage deletion (#24324) core: prompt securely when hashing passwords (#24126) events: show account changes in user event history (#24323) website/integrations: The Lounge: cleanup (#23628) ci: bump taiki-e/install-action from 2.83.4 to 2.84.0 in /.github/actions/setup (#24312) ci: add working dir prefix to file paths (#24319) core, web: update translations (#24304) packages/ak-common/tracing: make console subscriber optional (#24219) website: bump the build group in /website with 6 updates (#24305) core: bump pnpm/pnpm from 11.15.0 to 11.15.1 in /lifecycle/container (#24308) core: bump pnpm/pnpm from 11.15.0 to 11.15.1 in /website (#24309) core: bump constructs from 10.6.0 to 10.7.0 (#24310) core: bump uuid from 1.23.5 to 1.24.0 (#24311) enterprise/providers/ws_fed: add SAML 1.1 support (#23851) web/admin: enterprise status card properties (#24170) web/elements: update the progress bar (#24134) web/maint: upgrade ak-divider (#24082) web/bug: harmonize and make routine the display of tasks (part 6: sch… (#23859) web/maint: upgrade ak-toggle-group (#24038) ...
web/admin: QOL: Add “Expiring in
ndays” and “Expiring today” notices to LicenseStatusCardThis was pretty straightforward, and it’s a nice thing that people will notice.
Updated the Storybook stories: for the sake of testability, the dates are stable with respect to the current date: “Expiring Soon” is always 14 days out and “Expiring Today” is always 12 hours out.
Checklist
make all)make docs)