This repository has been archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 63
Convert media
store to an options store
#1260
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
obulat
commented
Apr 12, 2022
obulat
commented
Apr 12, 2022
sarayourfriend
approved these changes
Apr 13, 2022
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.
Seems to work well! I tested thoroughly and am still just running into the same bugs I found earlier today. Once these are all merged it'll be easier to tell what needs to be fixed still.
zackkrida
approved these changes
Apr 13, 2022
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.
LGTM.
This branch appears to fix the load more crashing the SSR audio results page as well 🙂 http://localhost:8443/search/audio?q=galah on this branch does not crash. |
1 task
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
💻 aspect: code
Concerns the software code in the repository
🧰 goal: internal improvement
Improvement that benefits maintainers, not users
🟧 priority: high
Stalls work on the project or its dependents
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes
Related to #1254 by @obulat
Fixes #1235 by @sarayourfriend
Description
This PR does two main things:
media-item
state (for single image/audio pages).The extraction of the
media-item
makes it possible to re-use the media item information from the search results on the single media detail page, instead of fetching it every time, even when we already have this data in the store.It also refactors the single image detail page to get the media data in the
asyncData
.Testing Instructions
The media store is the backbone of the app state, so all of these critical paths could be affected, and should not have any problems after this PR:
Searching for audio/image from homepage, search page and content pages on server-rendered (opened URL directly) and client-rendered (opened by following an internal link) pages.
Server-rendered search pages (All Content, image and audio) with no results, with fewer than 20 results and with more than 20 results should be interactive (at the minimum, you should be able to click on the content switcher and change the search type.
Clicking on "Load more".
Selecting a filter and deselecting it, or going back using the browser back button.
Checklist
Update index.md
).main
) or a parent feature branch.Developer Certificate of Origin
Developer Certificate of Origin