Skip to content

refactor: [M3-9656] - [Akamai Design System] Label Component #12224

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
May 21, 2025

Conversation

carrillo-erik
Copy link
Contributor

@carrillo-erik carrillo-erik commented May 15, 2025

Description 📝

This PR refactors the Label component to the new Akamai Design System. Since we do not have an actual <Label /> component, the work in this PR addresses instances in which we utilize the <TextField /> component and take advantage of the label prop to assign a label for the form control.

Changes 🔄

  • Label component supports two size variants:
    1. Typography.Label.Bold.L
    2. Typography.Label.Bold.S
  • Labels can display optional icons positioned either to the left or right of the text.
  • Large label (L) uses 20x20px icons.
  • Small label (S) uses 16x16px icons.
  • Introduces two (2) new props which will grant the developer more flexibility.
    • labelTooltipIconPosition allows developers to set where the <TooltipIcon /> is positioned relative to its label.
      • right is the default value.
    • labelTooltipIconSize allows developers to set the size of the <TooltipIcon />, it also sets the font size for the label.
      • small is the default value.
  • Replaces theme.palette.primary.main with icon token styles for the various states.

Preview 📷

Before After
before-changes-light after-changes-light
before-changes-dark after-changes-dark

How to test 🧪

Verification steps

  • Play with passing different values for labelTooltipIconPosition and labelTooltipIconSize
  • Verify that elements are aligned properly within surrounding elements.
  • There might be some minor spacing inconsistencies, these should be expected given that new sizes are introduced for the icon component and its label.
  • Verify that no visual regressions are observed in both light and dark mode styles.
Author Checklists

As an Author, to speed up the review process, I considered 🤔

👀 Doing a self review
❔ Our contribution guidelines
🤏 Splitting feature into small PRs
➕ Adding a changeset
🧪 Providing/improving test coverage
🔐 Removing all sensitive information from the code and PR description
🚩 Using a feature flag to protect the release
👣 Providing comprehensive reproduction steps
📑 Providing or updating our documentation
🕛 Scheduling a pair reviewing session
📱 Providing mobile support
♿ Providing accessibility support


  • I have read and considered all applicable items listed above.

As an Author, before moving this PR from Draft to Open, I confirmed ✅

  • All unit tests are passing
  • TypeScript compilation succeeded without errors
  • Code passes all linting rules

@carrillo-erik carrillo-erik self-assigned this May 15, 2025
@carrillo-erik carrillo-erik requested a review from a team as a code owner May 15, 2025 07:29
@carrillo-erik carrillo-erik requested review from abailly-akamai and harsh-akamai and removed request for a team May 15, 2025 07:29
@carrillo-erik carrillo-erik added the Design Tokens Laying the groundwork for Design Tokens label May 15, 2025
Copy link
Contributor

@abailly-akamai abailly-akamai left a comment

Choose a reason for hiding this comment

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

Thanks this seems to work as expected where tested and no regressions spotted on overall styles ✅

Approving pending addressing the token specificity comment

':hover': {
color: theme.palette.primary.main,
fill: theme.palette.primary.main,
stroke: theme.palette.primary.main,
Copy link
Contributor

Choose a reason for hiding this comment

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

use icon tokens for the various states

@carrillo-erik carrillo-erik changed the title refactor: [M3-9652] - [Akamai Design System] Label Component refactor: [M3-9656] - [Akamai Design System] Label Component May 19, 2025
@carrillo-erik carrillo-erik added the Add'tl Approval Needed Waiting on another approval! label May 20, 2025
@carrillo-erik carrillo-erik requested a review from bill-akamai May 21, 2025 19:51
Copy link
Contributor

@bill-akamai bill-akamai left a comment

Choose a reason for hiding this comment

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

Looks good, Erik - didn't observe any regressions.

@github-project-automation github-project-automation bot moved this from Review to Approved in Cloud Manager May 21, 2025
@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🎉 605 passing tests on test run #10 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
0 Failing605 Passing4 Skipped114m 38s

@carrillo-erik carrillo-erik merged commit 017bb88 into linode:develop May 21, 2025
35 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Merged in Cloud Manager May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Add'tl Approval Needed Waiting on another approval! Design Tokens Laying the groundwork for Design Tokens Ready for Review
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

4 participants