-
Notifications
You must be signed in to change notification settings - Fork 699
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quiz Creation Select Resources - Keyword search #11887
Quiz Creation Select Resources - Keyword search #11887
Conversation
@@ -105,7 +105,10 @@ | |||
}, | |||
methods: { | |||
handleClosePanel() { | |||
if (this.workingResourcePool.length > this.activeResourcePool.length) { | |||
if ( | |||
this.workingResourcePool && |
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.
For some reason there was a case where workingResourcePool
was undefined here and it didn't let me move forward
Build Artifacts
|
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.
This looks great @AlexVelezLl - I'm going to list a few thoughts here but won't approve or request changes quite yet.
- The changes I've made to the routing in Fix: Side panel closing confirmation & logic in child component #11862 fix most (if not all) of the bugs I'm seeing when testing this (ie, cannot save changes after adding search result, back button weirdness,
- One thing that we didn't consider while working on this was setting the local loading state whenever we're fetching search results. When we run this locally it's so fast that it's hard to see how bad the UX would be when the load takes a few seconds. That said, however, I think that this is an issue we can better handle in a follow-up as this is not solely a problem w/ the search loading but with all of the loading in the side panel right now.
Great work - I'm going to wait for review on my latest changes to the PR I noted above and if that goes through, I think I'll merge this PR and then fix conflicts any conflicts it creates in my PR before merging that.
update - I've added a link to the project tech debt tracker. Updating how the loading states are managed will jive well with a general follow-up in how we manage the loading states altogether which I will work on after wrapping up question replacement early next week.
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.
One thing that looks suspect to me - conditionalizing setup exports will not let the component be reactive to changes in searchQuery state.
@@ -292,7 +342,7 @@ | |||
loading, | |||
hasMore, | |||
loadingMore, | |||
fetchMoreQuizResources, | |||
fetchMoreQuizResources: searchQuery ? fetchMoreSearchResults : fetchMoreQuizResources, |
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.
Unless the component is being torn down and recreated when the searchQuery updates (which I think we are trying to avoid happen), this value will not recompute.
You may want to instead make the fetchMoreQuizResources function behave conditionally on the searchQuery instead.
Also, it should be searchQuery.value
I believe that we conditionalize on?
Thanks @rtibbles! I have updated it 👐 |
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.
Thanks for the updates and comments Alex & Richard.
Summary
This PR adds a search input in Quiz Creation Select resources Side Panel.
Preview
Compartir.pantalla.-.2024-02-15.16_13_05.mp4
References
closes #11786
Testing checklist
PR process
Reviewer checklist
yarn
andpip
)