Fix Badge text transformation for service tier labels#247
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR fixes text transformation on Badge components to properly display service tier labels in sentence case. Previously, the Badge component was applying automatic text transformation that conflicted with the desired display format.
Changes:
- Added
textTransform: 'none'prop to all Badge components in ServiceOffered.tsx to disable automatic transformation - Updated service tier labels from title case ('Warm Storage', 'PDP Storage') to sentence case ('Warm storage', 'PDP storage')
- Bumped @filecoin-foundation/ui-filecoin from 0.7.5 to 0.8.0 to support the textTransform prop
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/utils/service-tier.ts | Updated SERVICE_TIER_LABELS to use sentence case for 'Warm storage' and 'PDP storage' |
| src/components/ServiceOffered.tsx | Added textTransform='none' prop to all three Badge components to preserve label casing |
| package.json | Bumped @filecoin-foundation/ui-filecoin from 0.7.5 to 0.8.0 |
| package-lock.json | Updated lock file with new dependency versions including ui-filecoin 0.8.0 and its transitive dependencies |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| [ServiceTier.WARM_AND_PDP]: 'Warm storage', | ||
| [ServiceTier.PDP_ONLY]: 'PDP storage', |
There was a problem hiding this comment.
In Figma designs it's Warm Storage and PDP Storage?
There was a problem hiding this comment.
Thank you for catching this! I think we decided to use only first-letter capitalization for our labels - so it would be an inconsistency in the design. 🙏🏼
📝 Description
Fixes the text transformation on Badge components to preserve the intended casing of service tier labels. Previously, labels were being transformed by the Badge component, which conflicted with the desired display format.
🛠️ Key Changes
textTransform: 'none'on Badge components inServiceOffered.tsxto disable automatic text transformationservice-tier.ts@filecoin-foundation/ui-filecoinfrom 0.7.5 to 0.8.0📌 To-Do Before Merging
🧪 How to Test
npm install && npm run dev📸 Screenshots
BEFORE
AFTER