From bac97cea7b9c35a3cd6bce1a0b20d8132112e467 Mon Sep 17 00:00:00 2001 From: Jacob Shandling <61553566+jacobshandling@users.noreply.github.com> Date: Thu, 23 Mar 2023 09:32:46 -0700 Subject: [PATCH] UI: Ensure TextCell is always greyed when no value passed in (#10696) # Addresses #10038 - Add logic to ensure consistent light-grey coloring of text cells using DEFAULT_EMPTY_VALUE Screenshot 2023-03-22 at 4 06 30 PM # Checklist for submitter If some of the following don't apply, delete the relevant line. - [x] Changes file added for user-visible changes in `changes/` - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling --- changes/10038-consistent-empty-cell-coloring | 1 + .../components/TableContainer/DataTable/TextCell/TextCell.tsx | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 changes/10038-consistent-empty-cell-coloring diff --git a/changes/10038-consistent-empty-cell-coloring b/changes/10038-consistent-empty-cell-coloring new file mode 100644 index 0000000000..9691f1817a --- /dev/null +++ b/changes/10038-consistent-empty-cell-coloring @@ -0,0 +1 @@ +- Fixed a bug where some empty table cells were slightly different colors diff --git a/frontend/components/TableContainer/DataTable/TextCell/TextCell.tsx b/frontend/components/TableContainer/DataTable/TextCell/TextCell.tsx index b098526c62..403ab3188c 100644 --- a/frontend/components/TableContainer/DataTable/TextCell/TextCell.tsx +++ b/frontend/components/TableContainer/DataTable/TextCell/TextCell.tsx @@ -19,6 +19,9 @@ const TextCell = ({ if (typeof value === "boolean") { val = value.toString(); } + if (!val) { + greyed = true; + } return ( {formatter(val) || DEFAULT_EMPTY_CELL_VALUE}