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

fix(avatars): suppress statusLabel useText warning when there is no configured status #1540

Merged
merged 2 commits into from
May 4, 2023

Conversation

geotrev
Copy link
Contributor

@geotrev geotrev commented Apr 24, 2023

Description

Prevents an unnecessary console warning when Avatar's statusLabel prop isn't provided, despite no status/badge being configured by a consumer.

Fixes #1537

Detail

Adds a conditional to Avatar's implementation of useText to suppress the validation until a status can be displayed.

Checklist

  • πŸ‘Œ design updates will be Garden Designer approved (add the designer as a reviewer)
  • 🌐 demo is up-to-date (yarn start)
  • ⬅️ renders as expected with reversed (RTL) direction
  • 🀘 renders as expected with Bedrock CSS (?bedrock)
  • πŸ’‚β€β™‚οΈ includes new unit tests. Maintain existing coverage (always >= 96%)
  • β™Ώ tested for WCAG 2.1 AA accessibility compliance
  • πŸ“ tested in Chrome, Firefox, Safari, and Edge

@coveralls
Copy link

coveralls commented Apr 24, 2023

Coverage Status

Coverage: 96.18% (+0.0003%) from 96.179% when pulling 21b3f60 on george/avatar-text-warning into 6733c1d on main.

@geotrev geotrev marked this pull request as ready for review May 4, 2023 19:39
@geotrev geotrev requested a review from a team as a code owner May 4, 2023 19:39
@geotrev geotrev merged commit 425ee9b into main May 4, 2023
@geotrev geotrev deleted the george/avatar-text-warning branch May 4, 2023 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Avatar: extraneous console.warn about missing statusLabel
5 participants