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

refactor(Slug): refactor Slug callout into composable components #15036

Merged
merged 31 commits into from
Oct 31, 2023

Conversation

tw15egan
Copy link
Collaborator

@tw15egan tw15egan commented Oct 26, 2023

Closes #15051

Refs #14947

This is a continuation of the initial Slug PR that adds in the action bar to the Slug callout.

Changelog

New

  • Styles added for the Slug action bar
  • Slug is now composed similarly to Toggletip, with a SlugContent component mapping to ToggletipContent and SlugActions mapping to ToggletipActions.
<Slug>
  <SlugContent>
    Main callout content goes here
    <SlugActions>
      <IconButton kind="ghost" label="View">
        <View />
      </IconButton>
      <IconButton kind="ghost" label="Open Folder">
        <FolderOpen />
       </IconButton>
       <IconButton kind="ghost" label="Folders">
         <Folders />
       </IconButton>
       <Button>View literature</Button>
     </SlugActions>
  </SlugContent>
</Slug>

Testing / Reviewing

Ensure that all hollow Slug's only render the default callout, and all others render the new callout styles. Ensure there are no visual regressions.

@netlify
Copy link

netlify bot commented Oct 26, 2023

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit edec893
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/65414ba9b40a230009824723
😎 Deploy Preview https://deploy-preview-15036--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Oct 26, 2023

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit edec893
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/65414ba9e6931a0008526429
😎 Deploy Preview https://deploy-preview-15036--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@tw15egan tw15egan requested a review from a team as a code owner October 26, 2023 20:13
@aagonzales
Copy link
Member

@tw15egan Can we had a control in the storybook playground to turn on and off the action bar?

@tw15egan
Copy link
Collaborator Author

@aagonzales Yeah definitely, I can add something to turn it off. For now, the first two normal slugs (mini and 2xs) in the default story don't have the toolbar.

@tw15egan
Copy link
Collaborator Author

@aagonzales updated 👍🏻

Copy link
Member

@aagonzales aagonzales left a comment

Choose a reason for hiding this comment

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

The action group looks good!

This is just a side note for me, in the dark themes the gradient and toolbar kind of blend together. So I may tweak that later for visuals but everything looks to spec here. The gradient also isn't blending out as nicely at top so I'm going to look into that too.

image

@mattrosno
Copy link
Member

@tw15egan so we can track this on the project board and give visibility, here's an issue for this PR:

#15051

@github-actions github-actions bot added this pull request to the merge queue Oct 30, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Oct 30, 2023
@tw15egan tw15egan added this pull request to the merge queue Oct 30, 2023
@tay1orjones tay1orjones removed this pull request from the merge queue due to the queue being cleared Oct 31, 2023
@tay1orjones tay1orjones merged commit e5b8fc6 into carbon-design-system:main Oct 31, 2023
14 checks passed
tay1orjones added a commit to tay1orjones/carbon that referenced this pull request Nov 1, 2023
…bon-design-system#15036)

* feat(Slug): scaffold out AI Slug component

* feat(slug): add gradient tokens to themes, hover styles

* feat(slug): add focus styles, cleanup storybook

* fix(Theme): adjust small slug hover tokens

* feat(Slug): add hollow slug

* feat(Slug): initial inline styles

* chore(snapshot): update snapshots

* feat(Slug): add inline styles

* fix(Slug): refactor inline variant

* style(Slug): tweak inline styles

* style(Slug): add hover styles to inline variant

* style(Slug): add initial callout styles

* style(Slug): tokenize gradients

* style(Slug): adjust padding

* chore: udpate snapshots

* style(Slug): adjust padding with hollow dot, fix text colors

* fix(Slug): fix hover styles when focused

* refactor(Slug): remove ai from prefix

* refactor(Slug): break Slug callout into composable components

* style(Slug): add styles for action bar

* chore(storybook): update stories to use SlugContent, SlugToolbar

* refactor(Slug): rename SlugToolbar to SlugActions

* chore(storybook): remove console.log

* chore(storybook): add storybook toggle to show / hide action bar

---------

Co-authored-by: Andrea N. Cardona <[email protected]>
Co-authored-by: Taylor Jones <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: AI Used to filter issues in the Carbon for AI project. status: ready to merge 🎉
Projects
None yet
Development

Successfully merging this pull request may close these issues.

C4AI Slug: Implement action bar styles and React components
6 participants