Skip to content

fix: DH-21616: Databar overrides text color when using format prop#1323

Merged
mofojed merged 4 commits intodeephaven:mainfrom
gzh2003:DH-21616-databar-overrides-text-color-when-using-format-prop
Apr 2, 2026
Merged

fix: DH-21616: Databar overrides text color when using format prop#1323
mofojed merged 4 commits intodeephaven:mainfrom
gzh2003:DH-21616-databar-overrides-text-color-when-using-format-prop

Conversation

@gzh2003
Copy link
Copy Markdown
Contributor

@gzh2003 gzh2003 commented Mar 23, 2026

For DH-21616. Databar cells were using the databar bar color for both the bar and the text, ignoring any explicit text color set via formatting.

Companion PR: deephaven/web-client-ui#2640

TODO:

  • bump web version
  • regenerate erroneous databar snapshots
  • add e2e tests for databars + explicit color
  • Should also include e2e tests with databars in the heatmaps pr

@gzh2003 gzh2003 self-assigned this Mar 23, 2026
@gzh2003 gzh2003 marked this pull request as draft March 23, 2026 13:44
@github-actions
Copy link
Copy Markdown

ui docs preview (Available for 14 days)

@github-actions
Copy link
Copy Markdown

ui docs preview (Available for 14 days)

@gzh2003 gzh2003 changed the title Add formatColorForCell to model fix: DH-21616: Databar overrides text color when using format prop Mar 23, 2026
@gzh2003 gzh2003 requested a review from mofojed March 23, 2026 19:44
@gzh2003 gzh2003 marked this pull request as ready for review March 24, 2026 14:25
@github-actions
Copy link
Copy Markdown

ui docs preview (Available for 14 days)

1 similar comment
@github-actions
Copy link
Copy Markdown

ui docs preview (Available for 14 days)

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes DH-21616 by ensuring databar cell text color respects explicit formatting rather than inheriting the bar color.

Changes:

  • Introduces textColor resolution that prefers formatted text color when present.
  • Refactors databar color selection into barColor and derives a default text color for gradients/non-gradients.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread plugins/ui/src/js/src/elements/UITable/UITableModel.ts
Comment thread plugins/ui/src/js/src/elements/UITable/UITableModel.ts
mofojed
mofojed previously approved these changes Mar 26, 2026
mofojed pushed a commit to deephaven/web-client-ui that referenced this pull request Mar 31, 2026
…2640)

For DH-21616. Databar cells were using the databar bar color for both
the bar and the text, ignoring any explicit text color set via
formatting.

Companion PR: deephaven/deephaven-plugins#1323
@gzh2003 gzh2003 force-pushed the DH-21616-databar-overrides-text-color-when-using-format-prop branch from d4f14d4 to a9b8866 Compare April 2, 2026 18:00
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

ui docs preview (Available for 14 days)

@gzh2003 gzh2003 requested a review from mofojed April 2, 2026 19:16
Comment on lines +427 to +428
// @ts-expect-error TODO: bump web version
textColor,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should bump the web version for this... I'll merge it for now though

@mofojed mofojed merged commit af9b1e1 into deephaven:main Apr 2, 2026
19 checks passed
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.

3 participants