Fix/query dsl escape categorical values#5
Merged
Conversation
Categorical values containing the query-DSL grammar characters [ ] , ( ) and \ broke the auto-generated query: the IN [...] encoder stopped at the first bracket/comma, producing a garbage category set that matched nothing, so every node and edge was filtered out (Shown: 0/N). Free-text cells such as 'Relations detail' (protects [B,12]; ...) and prose 'Evidence sample' triggered this on import. Add escapeQueryValue/unescapeQueryValue/splitQueryList to StaticUtilities, escape categories at all three IN [...] build sites, teach the categorical encode regex to span escaped brackets, split on unescaped commas only, and unescape category tokens on decode. Values now round-trip exactly. Covered by static-utilities unit tests and a jsdom encode->decode test.
Categorical filter dropdowns near the bottom of the filtering panel only ever opened downward, collapsing to a few unusable scrollable pixels. Add StaticUtilities.computeDropdownPlacement (pure, unit-tested) that flips the panel above the anchor when there is more room above than below, and caps height with scroll only when even the chosen side is too small.
When a very long category list opened upward and was height-capped, the panel rendered taller than the computed available space (content-box added padding+border on top of max-height), so its bottom edge overlapped the anchor. box-sizing: border-box makes the cap include padding+border, so the panel fits exactly between the window edge and the anchor.
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.
No description provided.