feat(react-infobutton): Add initial implementation#25247
feat(react-infobutton): Add initial implementation#25247sopranopillow merged 15 commits intomicrosoft:masterfrom
Conversation
…to info-button/initial-implementation
...es/react-components/react-infobutton/src/stories/Infobutton/InfoButtonCustomIcon.stories.tsx
Outdated
Show resolved
Hide resolved
📊 Bundle size report
🤖 This report was generated against ea1842baec1d31d0936665bdffedf5803049eb46 |
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: ea1842baec1d31d0936665bdffedf5803049eb46 (build) |
|
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:
|
| content: resolveShorthand(props.content, { | ||
| required: true, | ||
| defaultProps: { | ||
| role: 'dialog', |
There was a problem hiding this comment.
Popover requires an aria-label, this will be added in the future.
packages/react-components/react-infobutton/src/components/InfoButton/InfoButton.types.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-infobutton/src/components/InfoButton/InfoButton.test.tsx
Outdated
Show resolved
Hide resolved
packages/react-components/react-infobutton/src/components/InfoButton/InfoButton.test.tsx
Outdated
Show resolved
Hide resolved
packages/react-components/react-infobutton/src/components/InfoButton/useInfoButtonStyles.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-infobutton/src/components/InfoButton/useInfoButtonStyles.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-infobutton/src/components/InfoButton/useInfoButtonStyles.ts
Outdated
Show resolved
Hide resolved
...es/react-components/react-infobutton/src/stories/Infobutton/InfoButtonCustomIcon.stories.tsx
Outdated
Show resolved
Hide resolved
…to info-button/initial-implementation
packages/react-components/react-infobutton/src/components/InfoButton/useInfoButtonStyles.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-infobutton/src/components/InfoButton/useInfoButtonStyles.ts
Outdated
Show resolved
Hide resolved
| popover: resolveShorthand(props.popover, { | ||
| required: true, | ||
| defaultProps: { | ||
| children: <></>, |
There was a problem hiding this comment.
Is there a reason this needs to be set? I would expect if there are no children for children to be undefined.
There was a problem hiding this comment.
Yes, children cannot be undefined, so this is needed.
packages/react-components/react-infobutton/src/components/InfoButton/useInfoButtonStyles.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-infobutton/src/components/InfoButton/useInfoButtonStyles.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-infobutton/src/components/InfoButton/useInfoButtonStyles.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-infobutton/src/components/InfoButton/useInfoButtonStyles.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-infobutton/src/components/InfoButton/useInfoButtonStyles.ts
Show resolved
Hide resolved
packages/react-components/react-infobutton/src/components/InfoButton/useInfoButtonStyles.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-infobutton/src/components/InfoButton/useInfoButtonStyles.ts
Outdated
Show resolved
Hide resolved
| }, | ||
|
|
||
| selected: { | ||
| color: tokens.colorNeutralForeground2BrandPressed, |
There was a problem hiding this comment.
Do you also need to set backgroundColor?
backgroundColor: tokens.colorTransparentBackgroundPressed,
There was a problem hiding this comment.
Not really, but button's spec asks for it, so I think it should stay.
packages/react-components/react-infobutton/src/components/InfoButton/useInfoButton.tsx
Outdated
Show resolved
Hide resolved
packages/react-components/react-infobutton/src/components/InfoButton/useInfoButton.tsx
Outdated
Show resolved
Hide resolved
packages/react-components/react-infobutton/src/components/InfoButton/useInfoButtonStyles.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-infobutton/src/stories/Infobutton/InfoButtonDefault.stories.tsx
Outdated
Show resolved
Hide resolved
* 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)
* 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
* 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

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