Skip to content

Commit

Permalink
fix: minor layout fixes after data grid update (#1174)
Browse files Browse the repository at this point in the history
The new version of data grid stopped cells automatically being display:
"flex" for layout performance reasons. Enforce this for those cells that
need it.

Before:

<img width="1211" alt="Screenshot 2024-04-24 at 15 01 19"
src="https://github.com/brave/ads-ui/assets/51444/e19b47ba-dac1-4982-b788-7cda178c5b34">

After:

<img width="1211" alt="Screenshot 2024-04-24 at 15 02 50"
src="https://github.com/brave/ads-ui/assets/51444/65e1f872-287b-42bb-8a61-ec9054da5610">

Before:

<img width="1061" alt="Screenshot 2024-04-24 at 15 40 07"
src="https://github.com/brave/ads-ui/assets/51444/86665b29-e165-4e94-b307-dfb71bb39de1">

After:

<img width="1061" alt="Screenshot 2024-04-24 at 15 38 29"
src="https://github.com/brave/ads-ui/assets/51444/b78ce51f-bf63-4ab2-a667-6fc8950cbae3">
  • Loading branch information
tackley authored Apr 25, 2024
1 parent c47e897 commit ba18aa4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/Creatives/CreativeList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export function CreativeList() {
valueGetter: (_value, row) => creativeValuesGetter(row),
renderCell: ({ row }) => <CreativePayloadList creative={row} />,
flex: 1,
display: "flex",
sortable: false,
},
{
Expand Down
1 change: 1 addition & 0 deletions src/user/analytics/search/AdSetBreakdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ function getColumnDefinitionForMetric(metric: MetricDefinition): GridColDef {
type: "number",
align: "right",
headerAlign: "right",
display: "flex",
width: 100,
renderCell: ({ value }) => (
<RenderMetric type={metric.type} value={value} />
Expand Down

0 comments on commit ba18aa4

Please sign in to comment.