Keep pinned filters above map groups - #2850
Draft
MikeShi42 wants to merge 10 commits into
Draft
Conversation
Co-authored-by: Mike Shi <mike@hyperdx.io>
🦋 Changeset detectedLatest commit: a0a5be4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: Mike Shi <mike@hyperdx.io>
Contributor
E2E Test Results✅ All tests passed • 276 passed • 1 skipped • 886s
Tests ran across 4 shards in parallel. |
Contributor
Greptile SummaryThis PR preserves the sorted priority of filter facets when scalar fields and grouped map fields are rendered together.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| packages/app/src/components/DBSearchPageFilters.tsx | Reorders grouped and scalar filter elements using the priority sequence produced from the sorted facets. |
| packages/app/src/components/DBSearchPageFilters/utils.ts | Extends facet grouping to retain the first-seen order of scalar facets and map groups. |
| packages/app/src/components/tests/DBSearchPageFilters.test.tsx | Adds a focused component regression test confirming that a pinned scalar facet renders above an active map group. |
| .changeset/calm-facets-order.md | Documents the filter-order correction as an application patch. |
Reviews (5): Last reviewed commit: "refactor: minimize filter ordering imple..." | Re-trigger Greptile
Co-authored-by: Mike Shi <mike@hyperdx.io>
Co-authored-by: Mike Shi <mike@hyperdx.io>
Co-authored-by: Mike Shi <mike@hyperdx.io>
Co-authored-by: Mike Shi <mike@hyperdx.io>
Co-authored-by: Mike Shi <mike@hyperdx.io>
Co-authored-by: Mike Shi <mike@hyperdx.io>
Co-authored-by: Mike Shi <mike@hyperdx.io>
Co-authored-by: Mike Shi <mike@hyperdx.io>
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.
Summary
Keep pinned filters above active fields and preserve the existing facet sort when map fields are grouped for display.
A sort-only change is insufficient because the renderer previously emitted every grouped map field before every scalar field. The implementation now adds only an ordered key list to the existing grouping result and reorders the already-rendered elements by those keys.
Screenshots or video
minimized_pinned_filter_fix_demo.mp4
How to test on Vercel preview
Preview routes: /search
Steps:
ServiceNameand a map field such asLogAttributes.Pin for me.Testing
yarn jest src/components/__tests__/DBSearchPageFilters.test.tsx src/components/DBSearchPageFilters/utils.test.ts --runInBand --coverage=false— 87 passedyarn app:lint— passedServiceNamemoves it above activeLogAttributes.test.casewithout clearing the selectionReferences
To show artifacts inline, enable in settings.