Skip to content

fix(label): add status variants#6227

Merged
mcoker merged 7 commits into
patternfly:v6from
mcoker:issue-6226
Jan 25, 2024
Merged

fix(label): add status variants#6227
mcoker merged 7 commits into
patternfly:v6from
mcoker:issue-6226

Conversation

@mcoker

@mcoker mcoker commented Jan 13, 2024

Copy link
Copy Markdown
Contributor

fixes #6226

  • Adds status variants
  • Renames label--isRemovable to label--IsRemovable
  • Adds an id to the label text element when a label is removable, since the close button currently references a non-existent id in aria-labelledby via something like <button id="close-btn" arial-label="Remove" aria-labelledby="close-btn label-text">
  • Moves all of the color hbs blocks used between the filled and outline examples into a single hbs file.

1/23/24

  • Adds .pf-m-filled for the filled styling, which gives us a modifier for filled-specific styling'.
    • We'll need to use .pf-m-filled or .pf-m-outline for the variant on all labels except for the add and overflow labels as those are structured a bit differently currently.
  • Updates non-status labels to use a generic (cube) icon for the label icon since the old info icon is now uses specifically for info labels.

@patternfly-build

patternfly-build commented Jan 13, 2024

Copy link
Copy Markdown
Collaborator

@andrew-ronaldson andrew-ronaldson left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Apologies if I missed a conversation. Should the status lables have the status color on the icon or is it just inheriting the colour from the text? In Figma the icons all have the status color.

From a design guidelines perspective I think we should recommend using a status label with the icons so they stand out from the non status versions. @lboehling do you have any thoughts here?

@thatblindgeye thatblindgeye left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Unless it'd be better as a followup, can we update the status labels to use appropriate icons? Right now they're all using the info icon, when success should have a checkmark, warning the triangle !, etc.


{{> label
label--id=(concat label--variants--id '-icon')
label-icon--value="info-circle"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just a nit: since we're showing status labels that would use this icon, we might want to avoid using a "statusy" icon outside a status context. WdYT?

@thatblindgeye thatblindgeye left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ As a followup we could add screen reader text to the status labels, but it might be worth evaluating where else we may want to do that in other components and/or if it makes sense to always render it vs rendering it only if the visible text doesn't convey that status well.

@andrew-ronaldson andrew-ronaldson left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Rockstar. LGTM

@wise-king-sullyman wise-king-sullyman linked an issue Jan 24, 2024 that may be closed by this pull request

@srambach srambach left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Kind of a bummer to have to require .pf-m-filled but makes sense. 🏷️

@lboehling lboehling left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

looks good! I am noticing that the filled background color for the status labels are referencing a border color token instead of the global/color/status/[success/danger/warning/etc.] tokens

@mcoker

mcoker commented Jan 24, 2024

Copy link
Copy Markdown
Contributor Author

@lboehling great catch!! Looks like all of the filled background color tokens were wrong 🤦‍♂️ Updated, you can see the tokens changed here - ea51c90

FWIW I just did a search/replace for --BackgroundColor: var(--pf-t--global--border--color with --BackgroundColor: var(--pf-t--global--color

@mcoker mcoker requested a review from lboehling January 24, 2024 20:20
@lboehling

Copy link
Copy Markdown

perfect! thanks @mcoker!!

@mcoker mcoker merged commit 60d9bd9 into patternfly:v6 Jan 25, 2024
@patternfly-build

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 6.0.0-alpha.69 🎉

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Label - add status variants

6 participants