Skip to content

Comments

Fix Badge text transformation for service tier labels#247

Merged
mirhamasala merged 3 commits intomainfrom
mm/fix-badge-text-transform
Feb 18, 2026
Merged

Fix Badge text transformation for service tier labels#247
mirhamasala merged 3 commits intomainfrom
mm/fix-badge-text-transform

Conversation

@mirhamasala
Copy link
Collaborator

@mirhamasala mirhamasala commented Feb 17, 2026

📝 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.

  • Type: Bug fix

🛠️ Key Changes

  • Set textTransform: 'none' on Badge components in ServiceOffered.tsx to disable automatic text transformation
  • Updated service tier labels to use sentence case ('Warm storage', 'PDP storage') in service-tier.ts
  • Bumped @filecoin-foundation/ui-filecoin from 0.7.5 to 0.8.0

📌 To-Do Before Merging

  • Verify badge styling looks correct in all contexts

🧪 How to Test

  • Setup: Run npm install && npm run dev
  • Steps to Test:
    1. Navigate to pages displaying service tier badges
    2. Verify badges show 'Warm storage' and 'PDP storage' with correct casing
  • Expected Results: Labels should display in sentence case without uppercase transformation

📸 Screenshots

BEFORE

CleanShot 2026-02-17 at 10 58 59@2x CleanShot 2026-02-17 at 11 18 51@2x

AFTER

CleanShot 2026-02-17 at 11 05 13@2x CleanShot 2026-02-17 at 11 18 35@2x

@vercel
Copy link

vercel bot commented Feb 17, 2026

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

Project Deployment Actions Updated (UTC)
filecoin-cloud Ready Ready Preview, Comment Feb 17, 2026 11:19am

Request Review

Copy link
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

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.

Copy link
Collaborator

@barbaraperic barbaraperic left a comment

Choose a reason for hiding this comment

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

🚀

Comment on lines +15 to +16
[ServiceTier.WARM_AND_PDP]: 'Warm storage',
[ServiceTier.PDP_ONLY]: 'PDP storage',
Copy link
Collaborator

Choose a reason for hiding this comment

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

In Figma designs it's Warm Storage and PDP Storage?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

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. 🙏🏼

@github-project-automation github-project-automation bot moved this from 📌 Triage to ✔️ Approved by reviewer in FOC Feb 18, 2026
@mirhamasala mirhamasala merged commit 455fe48 into main Feb 18, 2026
6 checks passed
@mirhamasala mirhamasala deleted the mm/fix-badge-text-transform branch February 18, 2026 12:08
@github-project-automation github-project-automation bot moved this from ✔️ Approved by reviewer to 🎉 Done in FOC Feb 18, 2026
@github-actions github-actions bot added size/M and removed size/M labels Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

2 participants