-
Notifications
You must be signed in to change notification settings - Fork 63
Move getting localized search path to the search store #2045
Conversation
Storybook and Tailwind configuration previews: Ready Storybook: https://wordpress.github.io/openverse-frontend/_preview/2045 Please note that GitHub pages takes a little time to deploy newly pushed code, if the links above don't work or you see old versions, wait 5 minutes and try again. You can check the GitHub pages deployment action list to see the current status of the deployments. |
e0f5b90
to
1b582a0
Compare
Size Change: -7.61 kB (-1%) Total Size: 864 kB
ℹ️ View Unchanged
|
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.
Nice abstraction, I made one potential suggestion which is non-blocking.
1c24ca4
to
01afe7b
Compare
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 two new functions on the search
store look great and reduce a ton of code! 🫶
Merging to see the Slack notification of the deployment 🚀 |
Fixes
Fixes #2044 by @obulat
Description
This PR adds two methods that return a localized search path to the search store:
updateSearchPath
- can update the search state (search term and search type) and return the updated path.getSearchPath
- can return a path for a search type that's different from the current search type to use, for example, in the content links.Testing Instructions
Try searching for something, updating the search type, changing the search term: the search path should always be updated correctly. Also, if you select some filters on the "All media" search view and click on the Content links (See all images/audio), the new page should have correct URL.
It should work both with the old header and the new one, and for all languages.
Checklist
Update index.md
).main
) or a parent feature branch.Developer Certificate of Origin
Developer Certificate of Origin