Skip to content

Fix/query dsl escape categorical values#5

Merged
Mnikley merged 4 commits into
mainfrom
fix/query-dsl-escape-categorical-values
Jun 19, 2026
Merged

Fix/query dsl escape categorical values#5
Mnikley merged 4 commits into
mainfrom
fix/query-dsl-escape-categorical-values

Conversation

@Mnikley

@Mnikley Mnikley commented Jun 19, 2026

Copy link
Copy Markdown
Member

No description provided.

Mnikley added 4 commits June 19, 2026 15:49
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.
@Mnikley Mnikley merged commit c4f75a9 into main Jun 19, 2026
2 checks passed
@Mnikley Mnikley deleted the fix/query-dsl-escape-categorical-values branch June 19, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant