-
Notifications
You must be signed in to change notification settings - Fork 2.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
Button: Migrate react-button to new DX #18607
Button: Migrate react-button to new DX #18607
Conversation
packages/react-button/src/components/CompoundButton/useCompoundButtonStyles.ts
Show resolved
Hide resolved
import { Playground } from '../Playground'; | ||
import { PlaygroundProps, PropDefinition } from '../Playground.types'; | ||
import { ToggleButton, ToggleButtonProps } from './components/ToggleButton'; | ||
import { Playground } from './Playground'; |
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.
suggestion: I assume Playground
component is solely for storybook purposes? If yes please add to it stories
suffix - this is current approach to distinguish what files are implementation related (thus being shipped to consumers) and which are not (stories/test/others...)
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.
few questions/comments. thanks!
7de543f
to
32389fc
Compare
@@ -1,7 +1,7 @@ | |||
import * as React from 'react'; | |||
import { Checkbox, Dropdown, IDropdownOption, Stack, TextField } from '@fluentui/react'; |
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.
you won't be able to use here anything from v7/v8 , so this would need a bit more refactoring
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.
Agreed, we should probably change this for native select + input + style overrides.
📊 Bundle size reportUnchanged fixtures
|
08bfaca
to
010ca9d
Compare
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.
"one small step for man, one giant leap for THE button ! 😅"
awesome work @TristanWatanabe 🙌
Hello @TristanWatanabe! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
🎉 Handy links: |
#### Pull request checklist - [x] Addresses an existing issue: Fixes part of microsoft#18579 - [x] Include a change request file using `$ yarn change` #### Description of changes - migrates `react-button` package using `yarn nx workspace-generator migrate-converged-pkg` - moved `Playground.tsx` and `Playground.types.tsx` to `react-button` package as they were deleted by migration script. - updates `useCompountButtonStyles` to explicitly declare `marginTop` value to fix babel-loader error. - extracted `buttonBaseProps` from `Button` story to its own file. - updated import paths for all Button stories.
Pull request checklist
$ yarn change
Description of changes
react-button
package usingyarn nx workspace-generator migrate-converged-pkg
Playground.tsx
andPlayground.types.tsx
toreact-button
package as they were deleted by migration script.useCompountButtonStyles
to explicitly declaremarginTop
value to fix babel-loader error.buttonBaseProps
fromButton
story to its own file.