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

BREAKING(react-tags-preview): use JSX children instead of slots for InteractionTag's buttons #28739

Merged
merged 34 commits into from
Aug 15, 2023

Conversation

YuanboXue-Amber
Copy link
Contributor

@YuanboXue-Amber YuanboXue-Amber commented Aug 4, 2023

Use JSX children for interactionTag's two buttons instead of slots.

Previous Behavior

image
{/* second button is `dismissButton` slot and it is shown when `dismissible` is true */}
<InteractionTag appearance="outline" icon={<CalendarMonth />} dismissible> 
  outlined {/* first button is `content` slot */}
</InteractionTag>

New Behavior

<InteractionTag appearance="outline">
  <InteractionTagPrimary icon={<CalendarMonth />}>outline</InteractionTagPrimary>  {/* first button */}
  <InteractionTagSecondary /> {/* second button */}
</InteractionTag>
image image image

JSX children provides an easier way to attach popover/tooltip to the primary/secondary button of InteractionTag. And this is one of the main use case we're targeting.

@fabricteam
Copy link
Collaborator

fabricteam commented Aug 4, 2023

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-tags-preview
InteractionTag
33.653 kB
9.14 kB
10.895 kB
4.494 kB
-22.758 kB
-4.646 kB
react-tags-preview
Tag
25.292 kB
8.36 kB
25.264 kB
8.352 kB
-28 B
-8 B
react-tags-preview
TagGroup
69.523 kB
20.462 kB
69.471 kB
20.443 kB
-52 B
-19 B

🤖 This report was generated against d1a32c704b6901ceb3f976ad2148d8bbffc7628a

@codesandbox-ci
Copy link

codesandbox-ci bot commented Aug 4, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit ae5b24e:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration

@YuanboXue-Amber YuanboXue-Amber changed the title Tag jsx BREAKING(react-tags-preview): use JSX children instead of slots for InteractionTag's buttons Aug 4, 2023
@YuanboXue-Amber YuanboXue-Amber marked this pull request as ready for review August 4, 2023 14:36
@YuanboXue-Amber YuanboXue-Amber requested review from a team as code owners August 4, 2023 14:36
@YuanboXue-Amber YuanboXue-Amber marked this pull request as draft August 4, 2023 14:39
@size-auditor
Copy link

size-auditor bot commented Aug 4, 2023

Asset size changes

Size Auditor did not detect a change in bundle size for any component!

Baseline commit: d1a32c704b6901ceb3f976ad2148d8bbffc7628a (build)

@YuanboXue-Amber YuanboXue-Amber marked this pull request as ready for review August 4, 2023 15:53
@YuanboXue-Amber YuanboXue-Amber marked this pull request as draft August 4, 2023 15:56
@fabricteam
Copy link
Collaborator

fabricteam commented Aug 4, 2023

🕵 fluentuiv9 No visual regressions between this PR and main

@YuanboXue-Amber YuanboXue-Amber marked this pull request as ready for review August 4, 2023 18:27
YuanboXue-Amber and others added 3 commits August 7, 2023 15:02
…condary/Secondary.types.ts

Co-authored-by: Bernardo Sunderhus <bernardo.sunderhus@gmail.com>
@YuanboXue-Amber YuanboXue-Amber merged commit a0cf865 into microsoft:master Aug 15, 2023
20 checks passed
@YuanboXue-Amber YuanboXue-Amber deleted the tag-jsx branch August 15, 2023 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants