Repository navigation
web: fix file search input interactions - #24609
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 #24609 +/- ##
=======================================
Coverage 91.30% 91.31%
=======================================
Files 1136 1136
Lines 71237 71237
Branches 3874 3874
=======================================
+ Hits 65045 65050 +5
+ Misses 6157 6152 -5
Partials 35 35
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
|
authentik PR Installation instructions Instructions for docker-composeAdd the following block to your AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-6b838765db0b124be9aa029ab8d77d2035298326
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-6b838765db0b124be9aa029ab8d77d2035298326Afterwards, run the upgrade commands from the latest release notes. |
16c65d2 to
1a897b4
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.
Suppressed comments (4)
web/src/components/ak-file-search-input.ts:140
- Lowercasing the search string with
toLocaleLowerCase()can change meaning in some locales (e.g. Turkish İ/i) and can prevent matches if the backend search is case-sensitive. Pass the raw query through and let the backend decide case-sensitivity.
protected refresh = async (query?: string): Promise<FileList[]> => {
const results = await aki(AdminApi).adminFileList({
usage: this.usage,
...(query ? { search: query.toLocaleLowerCase() } : {}),
});
web/src/components/ak-file-search-input.ts:187
action-labeluses the same localization id (file-picker.upload-link.label) asuploadLabel, but with different source text ("Upload a file" vs "Upload file"). This will collide in the localization catalog and can produce incorrect translations. ReuseuploadLabelhere so the id and text remain consistent.
action-label=${msg("Upload a file", { id: "file-picker.upload-link.label" })}
web/src/admin/files/FileListPage.ts:148
renderObjectCreate()now always renders the upload button, even when the user lacksCanSaveMedia. Previously this was gated, avoiding a misleading UI action that will fail. Gate the create button on the same capability check used elsewhere in this page.
protected override renderObjectCreate(): SlottedTemplateResult {
return ModalInvokerButton(FileUploadForm);
}
web/src/components/ak-file-search-input.ts:84
- The upload modal uses
FileUploadForm's defaultusage(Media). Since this component accepts ausageprop and uses it for listing files, the modal should receive the sameusageso uploaded files land in the correct backend usage bucket.
This issue also appears in the following locations of the same file:
- line 136
- line 187
const fileUploadForm = new FileUploadForm();
|
🍒 Cherry-pick to |
…n-2026.8) (#24811) web: fix file search input interactions (#24609) * web: fix file search input interactions * web: Tweak design * tweak ui * upload=true * Add missing attributes. * Fix ARIA issues, modal invokers, state. * Fix upload modal invoker, lifecycle. * Fix --------- Co-authored-by: Dominic Roy <[email protected]> Co-authored-by: Teffen Ellis <[email protected]>
This fixes several bugs in the file search input. To name a few:
It also adds a link to the existing Files page for uploading new files and closes a few miscellaneous tasks such as adding id's to translated strings
The menu positioning and scrolling logic was extracted into SearchSelectMenuController because the bugs crossed input state, selection, popover visibility, positioning, and scrolling.
After: