Skip to content

UX: category-id-input: allows no-category selection #377

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

Merged
merged 8 commits into from
Jun 4, 2025

Conversation

yuriyaran
Copy link
Contributor

Fixes an issue logged in https://meta.discourse.org/t/category-id-dropdowns-in-data-explorer-cannot-be-cleared/362370/.

Implementation Details

The category_id parameter now includes the (no category) option, which allows clearing a previously selected category.

The (no category) option is selected by default.

NOTE:
It is important to include null prefix when defining a nullable category_id query parameter. Detailed instructions are defined in https://meta.discourse.org/t/utilizing-parameters-in-data-explorer-queries/277934#p-1361177-null-parameters-11.

@yuriyaran yuriyaran requested a review from jjaffeux June 2, 2025 16:17
@yuriyaran yuriyaran self-assigned this Jun 2, 2025
@yuriyaran yuriyaran marked this pull request as ready for review June 3, 2025 13:07
Copy link
Contributor

@jjaffeux jjaffeux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where do we test it's actually nullable? I dont see a test using "no category"

This commit includes DRY update: by adding getSearchParam func
@yuriyaran
Copy link
Contributor Author

yuriyaran commented Jun 4, 2025

Where do we test it's actually nullable? I dont see a test using "no category"

Good observation, thanks! I added the assert in 257f603

@yuriyaran yuriyaran merged commit 5a2bfce into main Jun 4, 2025
6 checks passed
@yuriyaran yuriyaran deleted the ux/category-selection-cannot-be-cleared branch June 4, 2025 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants