Skip to content
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

feat(components): update Badge design #633

Merged
merged 5 commits into from
Jul 9, 2020
Merged

Conversation

connor-baer
Copy link
Member

@connor-baer connor-baer commented Jul 6, 2020

Purpose

The badges received a design refresh on mobile to make them more accessible and refine their purpose. This PR applies the same changes to the web.

Approach and changes

  • Update design of the Badge according to the new design specs:

Before

Screen Shot 2020-07-06 at 12 27 53

After

Screen Shot 2020-07-04 at 18 39 43

  • Use dynamic width for long circular Badge: This prevents the content from overflowing the background:

Before

Screen Shot 2020-07-06 at 12 28 43

After

Screen Shot 2020-07-04 at 18 50 04

  • Deprecate the Badge's onClick prop: Badges are not meant to be interactive and should only communicate the status of an element. Use the Tag component instead.
  • Deprecate the primary Badge color: It conflicts with the color of the primary Button variant. Use the "neutral" variant instead.
  • Rename the Badge's color prop to variant: This makes the prop consistent with the Button and List components.

BREAKING CHANGE:
The Badge component's color prop has been renamed to variant (🤖 badge-variant-enum)

Definition of done

  • Development completed
  • Reviewers assigned
  • Unit and integration tests
  • Meets minimum browser support
  • Meets accessibility requirements

Badges are not meant to be interactive and should only communicate the status of an element.

feature/badge-design
It conflicts with the color of the primary Button variant. Use the "neutral" variant instead.

feature/badge-design
This makes the prop consistent with the Button and List components

BREAKING CHANGE:
The **Badge** component's `color` prop has been renamed to `variant` (🤖 _badge-variant-enum_)

feature/badge-design
@connor-baer connor-baer added feature A new feature or enhancement 🎨 design Requires input from designers labels Jul 6, 2020
@connor-baer connor-baer added this to the v2.0 milestone Jul 6, 2020
@vercel
Copy link

vercel bot commented Jul 6, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/sumup-oss/circuit-ui/jvny00h7z
✅ Preview: https://circuit-ui-git-feature-badge-design.sumup-oss.vercel.app

This prevents the content from overflowing the background.

feature/badge-design

feature/badge-design

feature/badge-design
@codecov
Copy link

codecov bot commented Jul 6, 2020

Codecov Report

Merging #633 into beta will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             beta     #633      +/-   ##
==========================================
+ Coverage   93.67%   93.70%   +0.03%     
==========================================
  Files         133      133              
  Lines        2197     2208      +11     
  Branches      606      611       +5     
==========================================
+ Hits         2058     2069      +11     
  Misses        117      117              
  Partials       22       22              
Impacted Files Coverage Δ
src/components/Badge/Badge.tsx 97.36% <100.00%> (+1.07%) ⬆️

Copy link
Contributor

@hleote hleote left a comment

Choose a reason for hiding this comment

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

LGTM 👍 💯
Just left a couple of questions 🙂

@connor-baer connor-baer merged commit 105fe1b into beta Jul 9, 2020
@connor-baer connor-baer deleted the feature/badge-design branch July 9, 2020 14:34
@github-actions
Copy link
Contributor

github-actions bot commented Jul 9, 2020

🎉 This PR is included in version 2.0.0-beta.14 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link
Contributor

🎉 This PR is included in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎨 design Requires input from designers feature A new feature or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants