Repository navigation
Conversation
Signed-off-by: Yash Lunawat <yash.lunawat@rtp.vc>
Yash121l
force-pushed
the
fix/table-filter-cell-text
branch
from
October 12, 2026 15:53
0f90492 to
a5414a0
Compare
There was a problem hiding this comment.
🟢 Approval recommended
The change is localized and covers the reported bug; the remaining feedback is an optional test for duplicate labels.
1 open finding
What changed in this PR
This PR updates the table filter dropdown to show the same cell-settings text as table cells while continuing to filter by raw value.
Changes:
- Reuses cell-settings resolution for filter labels.
- Adds a regression test for mapped labels, rule precedence, and raw-value filtering.
| File | Description |
|---|---|
table/src/components/TablePanel.tsx |
Applies cell-settings text to filter labels. |
table/src/components/TablePanel.test.tsx |
Tests mapped labels and filtering behavior. |
🧠 Review effort: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| expect(screen.getByRole('cell', { name: 'true' })).toBeInTheDocument(); | ||
| }, | ||
| TEST_TIMEOUT, | ||
| ); |
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.

Description
Fixes perses/perses#4551
When a Table column has a cell settings rule that maps a value to text (for example 1 to "true"), the cells show the text but the column filter dropdown still listed the raw values (0, 1).
The filter values in
TablePanelonly went through the column's number format. I moved the existing "global cell settings, then column cell settings override" lookup out ofresolveGaugeFillColorintoresolveCellConfigand use it for the filter labels too, so the dropdown shows the same text as the cells. Filtering still matches on the raw value, so selecting "true" keeps the rows whose value is 1. If two raw values map to the same text, each stays its own entry in the list.A new test in
TablePanel.test.tsxuses a global rule and a column rule. It checks that the dropdown shows the mapped text, that the column rule wins, and that selecting an entry filters to the right rows. It fails on main. Table tests, lint, type-check and format check pass.Screenshots
No screenshot yet: I verified it through the component test rather than a running Perses instance. I can add one if you'd like.
Checklist
[<catalog_entry>] <commit message>naming convention using one of thefollowing
catalog_entryvalues:FEATURE,ENHANCEMENT,BUGFIX,BREAKINGCHANGE,DOC,IGNORE.UI Changes