-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
web: Defer table refresh, visibility checks. #19194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ 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 #19194 +/- ##
==========================================
+ Coverage 93.12% 93.39% +0.26%
==========================================
Files 949 949
Lines 52269 52269
==========================================
+ Hits 48678 48815 +137
+ Misses 3591 3454 -137
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
| } | ||
|
|
||
| :host { | ||
| display: block; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensures that the intersection observer can measure the threshold accurately.
| implements TableLike | ||
| { | ||
| static styles: CSSResult[] = [ | ||
| PFBase, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vestigial
| */ | ||
| protected emptyStateMessage = msg("No objects found."); | ||
|
|
||
| /** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-ordered to avoid "this.foobar used before assignment"
| if (changedProperties.has("visible") && this.hasUpdated) { | ||
| this.#synchronizeRefreshSchedule(); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Subtly different from the call in firstUpdated, only invoking here when visible changes.
|
authentik PR Installation instructions Instructions for docker-composeAdd the following block to your AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-361814abc7d34aa68fff345604f30803f169b723
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-361814abc7d34aa68fff345604f30803f169b723Afterwards, run the upgrade commands from the latest release notes. |
| } | ||
|
|
||
| render(): TemplateResult { | ||
| protected override render(): SlottedTemplateResult { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could hypothetically do something like this here:
if (this.visible) {
return nothing;
}However, the @intersectionObserver decorator doesn't handle this very well when combined with the <ak-tabs> element. We can achieve this with something like an <ak-tabpanel> element would handle visibility checks, plus all the attribute copy-pasting we do to make ARIA work.
| .ak-fade-in { | ||
| opacity: 0; | ||
| animation-fill-mode: forwards; | ||
| animation-name: ak-fade-in; | ||
| animation-duration: 150ms; | ||
| animation-iteration-count: 1; | ||
| animation-timing-function: linear; | ||
| animation-delay: 500ms; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoids UI flickering when quickly transitioning from loading state.
| */ | ||
| @state() | ||
| protected loading = false; | ||
| #deferredRefreshRequestAt: Date | null = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Timestamp vs boolean for future debug logging
10a256e to
ebfeb57
Compare
Fix types, args.
ebfeb57 to
361814a
Compare
kensternberg-authentik
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The useDefault issue is harmless, so let's go for it.
✅ Deploy Preview for authentik-integrations ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
|
…ersion-2025.12) (#19198) * web: Fix user library colors, modal z-indexes, table progress bars (#19152) * Fix progress bar fade out, positioning, labels. * Export parts. Fix z-index, colors. * Fix clickable area. * Ignore clickable icons. * web: Defer table refresh, visibility checks. (#19194) Fix types, args. --------- Co-authored-by: Teffen Ellis <[email protected]>
* main: outpost/proxyv2: reduce max number of postgres connections (#19211) web/maintenance: lint pass to add missing HTMLElementEventMap entries (#18953) translate: Updates for project authentik and language pt_BR (#19082) core: bump goauthentik.io/api/v3 from 3.2026020.6 to 3.2026020.7 (#19202) lifecycle/aws: bump aws-cdk from 2.1100.1 to 2.1100.2 in /lifecycle/aws (#19203) core: bump axllent/mailpit from v1.28.0 to v1.28.1 in /tests/e2e (#19204) web: bump knip from 5.79.0 to 5.80.0 in /web (#19207) website/integrations: glpi: add step (#19208) admin/files: support %(theme)s variable in media file paths (#19108) web: bump the eslint group across 1 directory with 3 updates (#19205) core: add last_login filter to users API (#18993) website/docs: rewrite section about users and perms (#19195) rbac: Add show all to roles tab, add role tab to groups (#19097) web: Defer table refresh, visibility checks. (#19194) Add docs for roles (#19196) web: Merge branch -- Stale notifications, synchronized context objects, rendering fixes (#19141) root: codespell: ignore Python virtual env, group patterns. (#19180)
Details
This PR defers table
fetchcalls after the element becomes visible, fixing excessive API requests on tabbed layouts.