Skip to content

chore: Button Style API refactor #3752

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 6 commits into from
Aug 14, 2025
Merged

Conversation

teodoranemes
Copy link
Member

Description

Added style file for the Button component to maintain consistency across all Style API Components.

How has this been tested?

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@teodoranemes teodoranemes changed the title chore: Button style api refactor chore: Button Style AP refactor Aug 13, 2025
Copy link

codecov bot commented Aug 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.01%. Comparing base (eeb11db) to head (fb954cb).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3752   +/-   ##
=======================================
  Coverage   97.01%   97.01%           
=======================================
  Files         825      826    +1     
  Lines       23963    23965    +2     
  Branches     8427     8357   -70     
=======================================
+ Hits        23248    23250    +2     
  Misses        666      666           
  Partials       49       49           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@teodoranemes teodoranemes changed the title chore: Button Style AP refactor chore: Button Style API refactor Aug 13, 2025
@teodoranemes teodoranemes marked this pull request as ready for review August 13, 2025 14:05
@teodoranemes teodoranemes requested a review from a team as a code owner August 13, 2025 14:05
@teodoranemes teodoranemes requested review from avinashbot and removed request for a team August 13, 2025 14:05
Copy link
Member

@avinashbot avinashbot left a comment

Choose a reason for hiding this comment

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

Just a minor style comment about the usages of ?. (approving anyway since it's just a style thing). Other comment is just for me.

import { ButtonProps } from './interfaces';

export function getButtonStyles(style: ButtonProps['style']) {
if (SYSTEM !== 'core' || !style?.root) {
Copy link
Member

Choose a reason for hiding this comment

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

Minor: just out of curiosity, I know we have this for bundlers/minifiers to remove, but I don't know how complex this is allowed to be. For example, are you allowed to combine it with other conditionals like this?

Do you know if there's a way to test this? Got curious, did some research:

Oh well, probably need to come up with something smarter eventually. But that's for later, this isn't a valid reason to block this PR.

@teodoranemes teodoranemes added this pull request to the merge queue Aug 14, 2025
Merged via the queue into main with commit d76de1a Aug 14, 2025
38 checks passed
@teodoranemes teodoranemes deleted the button-style-api-refactor branch August 14, 2025 14:11
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.

2 participants