fix: keep Select dimension filter from auto-switching to In List on commas#9589
Open
rohithreddykota wants to merge 1 commit into
Open
fix: keep Select dimension filter from auto-switching to In List on commas#9589rohithreddykota wants to merge 1 commit into
rohithreddykota wants to merge 1 commit into
Conversation
Collaborator
|
This changes the behaviour as seen from test failure. Pasting a large comma separated list will not work anymore. Is this intended? |
Collaborator
|
Auto switching is a good UX, is there an escaping that a user can do to not elect fr switching ? |
Contributor
There was a problem hiding this comment.
Pull request overview
Prevents Select-mode dimension filters from silently switching to In List when the user types/pastes text containing commas, allowing searches for dimension values that legitimately include commas.
Changes:
- Updated
checkSearchTextto only parse/split comma/newline bulk input when the current mode is alreadyInList. - Removed the auto-switch-to-
InListbehavior when multiple values are detected from the search text.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+243
to
247
| // Include both existing selected values and new search values so the | ||
| // below-fold query can find existing selected values that might not be | ||
| // in the top 250. | ||
| searchedBulkValues = [...new Set([...selectedValues, ...values])]; | ||
| inListTooLong = isUrlTooLongAfterInListFilter(values); |
Comment on lines
+231
to
+234
| // Only parse bulk values / auto-recalc when already in InList mode. | ||
| // Select and Contains modes should treat the input as plain search text | ||
| // and never auto-switch based on the presence of commas. | ||
| if (curMode !== DimensionFilterMode.InList) return; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In a Select-mode dimension filter, typing or pasting values containing commas (e.g.
val1, val2) was silently switching the filter mode to In List. This made it impossible to search for dimension values that legitimately contain commas, and surprised users who picked Select on purpose.checkSearchTextnow early-returns unless the filter is already inInListmode, so Select and Contains treat the input as plain search text.splitDimensionSearchText.Checklist: