Repository navigation
web: add grid/list view toggle to user application library - #22132
GirlBossRush merged 3 commits into
Conversation
✅ 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. |
6150a36 to
b66ded0
Compare
✅ Deploy Preview for authentik-docs 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 #22132 +/- ##
==========================================
+ Coverage 93.15% 93.26% +0.10%
==========================================
Files 1037 1037
Lines 60658 60658
Branches 400 400
==========================================
+ Hits 56505 56570 +65
+ Misses 4153 4088 -65
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
b66ded0 to
b29d1e0
Compare
…ik#22126) Implements the long-requested list view for the user-facing application library so customers with naturally long application names (e.g. AWS accounts of the form `<account-name> (<account-id>)`) can scan their apps without name truncation. - New icon button in the page header swaps between grid (default) and list mode; preference persisted per-browser via StorageAccessor.local ("ak-library-view-mode") to mirror the RememberMe pattern. - List mode renders each app as a wide row using a CSS subgrid so icon, name+meta, and action menu line up consistently across rows. The full application name is shown without clamp; description, publisher, and slug appear inline as supplementary metadata. - The kebab action menu (CardMenu) is shared with the grid card, re-anchored to the kebab's right edge in list mode so the popover stays inside the viewport. - Demo blueprint `blueprints/example/long-named-aws-applications.yaml` ships 25 fixture applications with title-cased Greek-prefixed names spread across five groups, ~19 with brand image icons and the rest using letter insignias. Marked `instantiate: "false"` so it stays out of fresh dev environments unless explicitly applied. Co-Authored-By: Agent (authentik-i22126-animated-specific-xanthous) <[email protected]>
b29d1e0 to
898ae63
Compare
kensternberg-authentik
left a comment
There was a problem hiding this comment.
I made three comments, all of which are about the maintainability of this beast. None of them are broken, so I've approved, but do consider them.
| height: 1.5rem; | ||
| } | ||
|
|
||
| @container (width < 800px) { |
There was a problem hiding this comment.
Can we invert this? "When the width is greater than or equal to?" Especially in the User app, the "mobile first" approach is really going to be valuable going forward.
| <path | ||
| d="M10 6h18v2H10zM10 24h18v2H10zM10 15h18v2H10zM4 15h2v2H4zM4 6h2v2H4zM4 24h2v2H4z" | ||
| /> | ||
| </svg>`, |
There was a problem hiding this comment.
[Strokes chin] Hmm, ze storage of ze icons in ze app precludes letting ze user choose zir own icons, which is a project we hope to integrate in ze near future, no?
| }); | ||
| }, | ||
| )} | ||
| ${isList |
There was a problem hiding this comment.
Ah, I figured out what was bugging me about this. You have two different renderers here kinda intertwingled, which is why you have to ask isList? twice. If you separate them out into different units chosen with a ternary, you would probably have an easier time reading this in the future.
Summary
Closes #22126.
Adds a grid ↔ list view toggle to the user-facing application library so customers with naturally long application names (e.g. AWS accounts displayed as
<account-name> (<account-id>)) can scan their apps without name truncation.StorageAccessor.local(ak-library-view-mode), mirroring the existingRememberMepattern.CardMenu) is shared with the grid card and re-anchored to the kebab's right edge in list mode so the popover stays inside the viewport.Screenshots
Files
web/src/user/LibraryPage/ak-library-impl.ts— toggle button, view-mode state, persistenceweb/src/user/LibraryPage/ak-library-impl.css— header layout for the toggle controlweb/src/user/LibraryPage/ApplicationList.ts/.css— list-mode container stylesweb/src/user/LibraryPage/LibraryAppRow.ts— new list-row componentweb/src/user/LibraryPage/types.ts— view-mode typeblueprints/example/long-named-aws-applications.yaml— 25-app fixture blueprint