immich
immich copied to clipboard
feat(web): focus search bar input when using explore shortcut "/"
This PR will focus the search bar when using the explore (actually search) shortcut as in Google Photos.
The code needs a serious review because I have little to no experience with Svelte - I started exploring it with Immich - and I don't know if this is the right approach. Mainly it's about communicating from asset-grid (which receives the keydown event) to search-bar which involves traversing the component tree in a weird way. Maybe there should be some refactoring, i.e. "global" shortcuts like this one should be handled in a proper parent (very high in the tree) component? If someone would point me to the right direction I'll be glad to implement this in a different way.
How was this tested?
- [x] clicking "Explore" link normally does not focus the search bar
- [x] typing "/" from an asset grid will focus the search bar after navigating into the explore page
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| immich | ⬜️ Ignored (Inspect) | Visit Preview | Sep 30, 2023 9:21am |
#8630