Skip to content

Refactor value + unit renderings to use unified layout#3277

Open
charliepark wants to merge 1 commit into
mainfrom
refactor_value_unit_rendering
Open

Refactor value + unit renderings to use unified layout#3277
charliepark wants to merge 1 commit into
mainfrom
refactor_value_unit_rendering

Conversation

@charliepark

@charliepark charliepark commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

DRAFT

When I was working on #3214, I came across a number of occasions where we rendered a value and a unit, like 6 vCPUs or 128 GiB. We had a few different ways of rendering those. This PR creates a new component, <ValueUnit>, which renders the value, formatted, and the unit, also formatted. It also adds a <Size> component, built on top of <ValueUnit>.

Currently, the files changed in this branch do NOT step on the toes of main...standardize-unit-helpers, which is addressing some of the notes in https://gist.github.com/david-crespo/5fe725886475d18afa6cc459daf1acc3. Nevertheless, it might be best for that one to get wrapped up and merged first.

One thing to note is that the value/units in SiloQuotasTab (not addressed in this PR) currently use text-secondary, rather than text-tertiary, so we might want to fold that one in as well to using the new ValueUnit component.

Closes #3276

@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
console Ready Ready Preview Jul 2, 2026 5:29pm

Request Review

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.

refactor to use existing sizeCellInner function more

1 participant