Skip to content

Conversation

AllanOXDi
Copy link
Member

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.

@github-actions github-actions bot added APP: Coach Re: Coach App (lessons, quizzes, groups, reports, etc.) DEV: frontend labels Mar 31, 2025
@AllanOXDi AllanOXDi requested a review from marcellamaki March 31, 2025 14:21
Copy link
Member

@rtibbles rtibbles left a 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"
Copy link
Member

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.

Copy link
Member Author

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

Copy link
Contributor

github-actions bot commented Mar 31, 2025

@AllanOXDi AllanOXDi requested a review from rtibbles March 31, 2025 16:05
@rtibbles
Copy link
Member

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 hideSearch prop already, so it seems like it would be easy to conditionalize display of that too.

Can you test reproducing this issue for quiz resource selection as well, and if it reproduces we should add the same handling here.

@AllanOXDi
Copy link
Member Author

AllanOXDi commented Mar 31, 2025

Yes I saw the prop too ! But I am not sure if I can reproduce it quiz .

Screenshot 2025-03-31 at 19 52 19

@rtibbles
Copy link
Member

If you edit the quiz and then try to add questions would it not appear?

@pcenov
Copy link
Member

pcenov commented Apr 1, 2025

Hi @AllanOXDi - I confirm that the Search button is now hidden in Lessons > Manage resources when there aren't any resources.
As for the Quizzes, this can only be replicated if you have already created some quizzes, then deleted some or all of the resources and after that when you attempt to edit a quiz you will see the following:

quiz.mp4

So it seems that this should be a follow-up issue as the Search button is not the only thing that should be handled better.

Copy link
Member

@rtibbles rtibbles left a 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.

@AllanOXDi AllanOXDi merged commit c3c32dd into learningequality:develop Apr 1, 2025
51 checks passed
@rtibbles
Copy link
Member

rtibbles commented Apr 1, 2025

Opened a follow up issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APP: Coach Re: Coach App (lessons, quizzes, groups, reports, etc.) DEV: frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Coach > Lessons > Manage resources - The "Search" button is active when there are no available resources
3 participants