Repository navigation
[IGNORE] Table: test that the column unit is kept with conditional formatting - #924
Open
souvik-biswas-dev wants to merge 2 commits into
Open
souvik-biswas-dev wants to merge 2 commits into
souvik-biswas-dev wants to merge 2 commits into
Conversation
…rmatting Add tests for a column with format.unit set to bytes and conditional cellSettings, defined at the column level and globally, to make sure the unit is still applied when a condition matches. This covers the behaviour fixed by the cell format change in the table plugin. Signed-off-by: Souvik Biswas <souvikbiswas.dev@gmail.com>
souvik-biswas-dev
requested review from
shahrokni
and removed request for
a team
November 10, 2026 05:11
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The regression test does not verify that conditional formatting remains active, because its unit-text assertions could pass even when the conditional cell configuration is missing.
1 open issue
What changed in this PR
Adds regression tests for preserving Table byte-unit formatting when conditional cell settings are applied at the column or table level. The underlying behavior was fixed previously, and this pull request contains test-only changes.
Changes:
- Added reusable time-series fixtures with values exercising Value and Range conditions.
- Added coverage for unconditioned, column-level, and global conditional formatting.
- Verified that formatted byte values render as MiB and GiB instead of raw numbers.
| File | Description |
|---|---|
| table/src/components/TablePanel.test.tsx | Adds fixtures and regression tests covering byte-unit formatting with column-level and global conditional cell settings. |
Review effort: Lite
Comment on lines
+659
to
+663
| const BYTES_CELL_CONDITIONS: NonNullable<TableOptions['cellSettings']> = [ | ||
| { condition: { kind: 'Value', spec: { value: '0' } }, textColor: '#12470c' }, | ||
| { condition: { kind: 'Range', spec: { min: 1, max: 300000000 } }, textColor: '#FFCC00' }, | ||
| { condition: { kind: 'Range', spec: { min: 300000000, max: 100000000000000 } }, textColor: '#C4162a' }, | ||
| ]; |
The unit assertions alone would also pass when no condition matches, so also check the text color of the cells for 0, 150000000 and 27487790694, and that the unconditioned column has no condition color. Signed-off-by: Souvik Biswas <souvikbiswas.dev@gmail.com>
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
Adds regression tests for a Table column with
format.unit: bytesand conditionalcellSettings(Value and Range conditions), defined both at the column level and globally. The tests check that the unit is still applied when a condition matches.The behaviour itself was fixed by #881 (table cell format), so this PR changes tests only and adds no code changes.
Related to perses/perses#4705.
Checklist