-
Notifications
You must be signed in to change notification settings - Fork 803
Hide the 'Search' button when there's nothing to search for #13277
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
Hide the 'Search' button when there's nothing to search for #13277
Conversation
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 of the conditions needs to be corrected.
@@ -23,6 +23,7 @@ | |||
{{ selectFromBookmarks$() }} | |||
</div> | |||
<KButton | |||
v-if="bookmarksCount > 0" |
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 will hide the search button unless the user has bookmarks. I am unsure how this is fixing the issue?
I think you probably intended to do the same if statement here as below, conditionalised on channels.length.
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.
Ohh my bad , I see the point. Fixed now I think
Build Artifacts
|
It looks like there's also a search button nested inside the QuizResourceSelectionHeader component here as well: https://github.com/learningequality/kolibri/blob/develop/kolibri/plugins/coach/assets/src/views/common/resourceSelection/QuizResourceSelectionHeader.vue#L21 I know the original issue that was raised by @pcenov was just for lessons, but it looks like quizzes would also be affected. I see this component has a Can you test reproducing this issue for quiz resource selection as well, and if it reproduces we should add the same handling here. |
If you edit the quiz and then try to add questions would it not appear? |
Hi @AllanOXDi - I confirm that the Search button is now hidden in Lessons > Manage resources when there aren't any resources. quiz.mp4So it seems that this should be a follow-up issue as the Search button is not the only thing that should be handled better. |
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.
Manual QA passes, we can punt the quiz changes to a follow up issue.
Opened a follow up issue. |
Summary
This PR hides the 's the 'Search' button at all when there's nothing to search for
References
closes #13261
Reviewer guidance
Navigate to Coach > Lessons > Manage resources - See if the "Search" button is active with resources in devices Vs without it.