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

feat(react-infobutton): Add initial implementation #25247

Conversation

sopranopillow
Copy link
Contributor

This PR adds the initial implementation of InfoButton. Styles and API are still open to change. The tests were modified to pass, more tests will be added in the future.

Related Issue(s)

Fixes #25060

@fabricteam
Copy link
Collaborator

fabricteam commented Oct 14, 2022

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-infobutton
InfoButton
7.742 kB
3.265 kB
112.443 kB
34.387 kB
104.701 kB
31.122 kB

🤖 This report was generated against ea1842baec1d31d0936665bdffedf5803049eb46

@size-auditor
Copy link

size-auditor bot commented Oct 14, 2022

Asset size changes

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

Baseline commit: ea1842baec1d31d0936665bdffedf5803049eb46 (build)

@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 14, 2022

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 eebe657:

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

content: resolveShorthand(props.content, {
required: true,
defaultProps: {
role: 'dialog',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Popover requires an aria-label, this will be added in the future.

@sopranopillow sopranopillow marked this pull request as draft October 18, 2022 22:04
@sopranopillow sopranopillow changed the title Info button/initial implementation feat(react-infobutton): Add intial implementation Oct 20, 2022
@sopranopillow sopranopillow marked this pull request as ready for review October 28, 2022 00:35
popover: resolveShorthand(props.popover, {
required: true,
defaultProps: {
children: <></>,
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason this needs to be set? I would expect if there are no children for children to be undefined.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, children cannot be undefined, so this is needed.

},

selected: {
color: tokens.colorNeutralForeground2BrandPressed,
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you also need to set backgroundColor?

    backgroundColor: tokens.colorTransparentBackgroundPressed,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not really, but button's spec asks for it, so I think it should stay.

@khmakoto khmakoto changed the title feat(react-infobutton): Add intial implementation feat(react-infobutton): Add initial implementation Oct 31, 2022
@sopranopillow sopranopillow merged commit d8e463e into microsoft:master Nov 2, 2022
@sopranopillow sopranopillow deleted the info-button/initial-implementation branch November 2, 2022 23:57
marcosmoura added a commit to marcosmoura/fluentui that referenced this pull request Nov 3, 2022
* master:
  feat(scripts): improve API violation reporting (microsoft#25356)
  applying package updates
  fix: Preventing blanket selectors from Fabric component from being applied via new preventBlanketFontInheritance prop (microsoft#25453)
  feat(react-infobutton): Add initial implementation (microsoft#25247)
  chore(react-avatar, avatar-context): migrate to new package structure (microsoft#25473)
  chore(react-portal, portal-compat, portal-compat-context): migrate to new package structure (microsoft#25481)
  docs(react-infobutton): Adding component's spec (microsoft#25251)
  fix(screener-build workflow): scope package to build for v9 VR tests to speed up perf (microsoft#25494)
  chore(vr-tests-v9): Convert Button VR tests to CSF (microsoft#25108)
@sopranopillow sopranopillow mentioned this pull request Nov 8, 2022
30 tasks
NotWoods pushed a commit to NotWoods/fluentui that referenced this pull request Nov 18, 2022
* adding initial implementation

* fixing syncpack error

* updating to remove v9 button

* updating implementation to new way

* typos

* removing missing story

* fixing syncpack error

* convert Popover to a slot

* cleaning up types

* adding requested chan geS:

* updating spread-radius to be a token

* adding requested changes

* fixing syncpack error
Hotell pushed a commit to Hotell/fluentui that referenced this pull request Feb 9, 2023
* adding initial implementation

* fixing syncpack error

* updating to remove v9 button

* updating implementation to new way

* typos

* removing missing story

* fixing syncpack error

* convert Popover to a slot

* cleaning up types

* adding requested chan geS:

* updating spread-radius to be a token

* adding requested changes

* fixing syncpack error
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.

InfoButton: Add initial implementation
5 participants