Skip to content
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

Search - 'Clear all' is not resetting the dropdowns #12821

Closed
pcenov opened this issue Nov 12, 2024 · 5 comments
Closed

Search - 'Clear all' is not resetting the dropdowns #12821

pcenov opened this issue Nov 12, 2024 · 5 comments
Assignees
Labels
APP: Learn Re: Learn App (content, quizzes, lessons, etc.) P1 - important Priority: High impact on UX

Comments

@pcenov
Copy link
Member

pcenov commented Nov 12, 2024

@nucleogenesis I did notice one thing while testing over the weekend, and I wanted to investigate more but then the ⛈️ happened: Clear all button does clear the displayed search results and the filter applied for the search actions performed using Keywords, Categories, Activities and the Show resources options.

However, it does not clear the applied filters for any of the dropdown options (Language, Level, Channel, Accessibility). Search results are cleared, but the previously applied filter apparently stays visible, but not actually applied anymore, and the user needs to clear them manually. This can be confusing and we should force them cleared as for the other filtering options in the sidebar.

clear-dropdown.mp4

Originally posted by @radinamatic in #12745 (comment)

@pcenov
Copy link
Member Author

pcenov commented Nov 12, 2024

@radinamatic - opening a follow-up issue for that comment, so that we can keep track of it.

@marcellamaki marcellamaki added P1 - important Priority: High impact on UX APP: Learn Re: Learn App (content, quizzes, lessons, etc.) labels Nov 12, 2024
@SukhvirKooner
Copy link

SukhvirKooner commented Nov 12, 2024

I'd like to take on this issue. Please assign it to me.

Proposed Solution:

Extend the State Reset Logic:

I will ensure that when the 'Clear All' button is clicked, all state variables associated with the dropdown filters (Language, Level, Channel, and Accessibility) are explicitly reset to their default values (e.g., null or default options). This can be achieved by enhancing the existing state management logic, potentially in the useState .

Trigger Dropdown Re-rendering:

I will make sure to trigger a re-render for all affected dropdown components when the state is reset to guarantee that the visual state of the dropdowns reflects the cleared state. This will prevent any stale UI behavior and align with the behavior for other filters.

UI Consistency Check:

I plan to introduce a unit test or an automated UI test to verify that when the 'Clear All' button is pressed, all dropdowns are effectively reset, alongside any search results or other filters, maintaining a consistent user experience.

@MisRob
Copy link
Member

MisRob commented Nov 13, 2024

Hi @SukhvirKooner, thanks for volunteering! This issue is not open for contribution.

There are contributing opportunities in three repositories. See the contributing guidelines including links to issues suitable for contribution for each repository here:

You can also see the list of unassigned "help wanted" or "good first issue" issues across all repositories.

@AllanOXDi
Copy link
Member

Hi @pcenov could you confirm if this issue still persist. There was a big internal refactor in KSelect for v5 that broke it and it should be fix now.

@radinamatic
Copy link
Member

radinamatic commented Dec 13, 2024

Great news: the original issue is not replicable on the latest assets from the develop branch! 👍🏽 💯 🥳

All previously applied filters in the Library search are now properly cleared by the Clear all.

Closing as not extant anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APP: Learn Re: Learn App (content, quizzes, lessons, etc.) P1 - important Priority: High impact on UX
Projects
None yet
Development

No branches or pull requests

7 participants