-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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(AILabel): Rename Slug
to AILabel
#16803
feat(AILabel): Rename Slug
to AILabel
#16803
Conversation
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for v11-carbon-react ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@@ -111,7 +111,7 @@ const DismissibleTag = <T extends React.ElementType>({ | |||
}; | |||
|
|||
let normalizedSlug; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
quick question before I fully review, should we rename these also? (slug, normalizedSlug, slugRef etc)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn’t planning on changing the prop names for each component, so I didn’t touch the internal variable names either 🤷♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could roll those changes up into a sub item of #15972? Since ideally it would need to ship with a codemod
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed the focus state on the mini
and 2sx
sizes are incorrect. They should be 2px thick (not 1) to have a visual distinction from the enabled state.
Also as an aside, @mbgower has pointed out that the |
Further to @aagonzales's comment, there is a provision for under-sized targets, but they are only allowed if they have sufficient space around them such that when assessing with a 24px diameter circle no other target is intersected. I realize this is not specific to the "rename" task, but since she raised it, I thought I'd add a bit more context. |
I’ve been reviewing the documentation for the “AI label” component, and I would like to advocate rebranding this as “AI indicator” or some other alternative (I have a number of other options). The problem with calling it a label is that it isn’t a label, it’s a button. I don’t think it has to be called a button (hence my suggestion of ‘indicator’), but a label is an intrinsic part of almost every UI component, and there are knock-on effects from using it as part of a component name. |
@alisonjoseph Moved all @aagonzales fixed the focus states 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as long as the name issue is resolved.
@tw15egan @alisonjoseph @tay1orjones Do you think we should also go ahead and update the click target size of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aagonzales, Whoops, I just pushed up a fix for that! Also increased the click target to |
@tay1orjones @alisonjoseph I also added a new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those changes look good to me now!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! I added the prop rename task as a subitem of #15972
753e3a2
Closes #16762
Closes #16618
Closes #16756
Closes #16755
Renames the React component
Slug
,SlugContent
andSlugActions
toAILabel
,AILabelContent
, andAILabelActions
Changelog
New
AILabel
,AILabelContent
andAILabelActions
components. Should be identical to the existingSlug
named componentsAiSkeleton
components renamed toAISkeleton
Changed
aiTextLabel
andSlugLabel
and replaced them withtextLabel
andaria-label
Slug
stories to live under their individual components or under theAILabel
sectionSlug
references renamed toAILabel
throughout.mdx
files and documentationRemoved
Testing / Reviewing
No style classes or prop names for other components were changed. All changes should be scoped to move from
src/components/Slug
to/src/components/AILabel
and update associated tests/file imports. Same with theAiSkeleton
toAISkeleton
changes.unstable__Slug
and co. is still being exported and can still be used.