Repository navigation
[TS migration] Migrate G14 stories from storybook to Typescript - #38056
Conversation
…opdownMenu stories to typescript
|
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
| AddressSearch.displayName = 'AddressSearchWithRef'; | ||
|
|
||
| export default forwardRef(AddressSearch); | ||
| export type {AddressSearchProps}; |
There was a problem hiding this comment.
| export type {AddressSearchProps}; | |
| export type {AddressSearchProps}; |
| Banner.displayName = 'Banner'; | ||
|
|
||
| export default memo(Banner); | ||
| export type {BannerProps} |
There was a problem hiding this comment.
| export type {BannerProps} | |
| export type {BannerProps} |
| Button.displayName = 'Button'; | ||
|
|
||
| export default withNavigationFallback(React.forwardRef(Button)); | ||
| export type {ButtonProps}; |
There was a problem hiding this comment.
| export type {ButtonProps}; | |
| export type {ButtonProps}; |
| <AddressSearch | ||
| value={value} | ||
| onInputChange={({street}) => setValue(street)} | ||
| value={value as string} |
There was a problem hiding this comment.
why do we need this assertion here ?
There was a problem hiding this comment.
This is needed because value can only be string but InputChange has multiple types that can be used.
| options: [ | ||
| {value: 'One', text: 'One'}, | ||
| {value: 'Two', text: 'Two'}, | ||
| {value: 'One', text: 'One', icon: Expensicons.Wallet}, |
There was a problem hiding this comment.
why it is added here ?
There was a problem hiding this comment.
Options has the mandatory icon param.
|
|
||
| function Template(args) { | ||
| const [value, setValue] = useState(''); | ||
| function Template(args: AddressSearchProps) { |
There was a problem hiding this comment.
| function Template(args: AddressSearchProps) { | |
| function Template(props: AddressSearchProps) { |
| }; | ||
|
|
||
| function Template(args) { | ||
| function Template(args: BannerProps) { |
There was a problem hiding this comment.
| function Template(args: BannerProps) { | |
| function Template(props: BannerProps) { |
| }; | ||
|
|
||
| function Template(args) { | ||
| function Template(args: ButtonProps) { |
There was a problem hiding this comment.
| function Template(args: ButtonProps) { | |
| function Template(props: ButtonProps) { |
| }; | ||
|
|
||
| function Template(args) { | ||
| function Template(args: ButtonWithDropdownMenuProps<unknown>) { |
There was a problem hiding this comment.
| function Template(args: ButtonWithDropdownMenuProps<unknown>) { | |
| function Template(props: ButtonWithDropdownMenuProps<unknown>) { |
|
@DylanDylann Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
@ruben-rebelo Could you help to merge the latest main? |
| const Default: ButtonWithDropdownMenuStory = Template.bind({}); | ||
| Default.args = { | ||
| buttonText: 'Pay using Expensify', | ||
| customText: 'Pay using Expensify', |
There was a problem hiding this comment.
@DylanDylann This was changed because the actual prop which sets the text of the button is now customText instead of buttonText.
Reviewer Checklist
Only post video on web Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2024-03-22.at.17.36.54.movMacOS: Desktop |
|
@ruben-rebelo Bump on this one |
|
@ruben-rebelo let's merge with |
|
@DylanDylann I've merged main and answered the comment above |
|
@ruben-rebelo While testing, I see that ButtonWithDropdownMenu is lost in storybook after applying your change Latest main:
After applying your change
|
|
@DylanDylann You are correct, I've fixed the issue and updated the PR. |
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #25345 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
|
@francoisl Please also help to assign me to corresponding issues |
|
@francoisl looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
Tests were passing 😕 |


Details
[TS migration] Migrate AddressSearch, Banner, Button and ButtonWithDropdownMenu stories to typescript
Fixed Issues
$ #25345
$ #25346
$ #25347
$ #25348
PROPOSAL: N/A
Tests
Verify that no errors appear in the JS console
Run storybook
The above mention stories are working as previously
Offline tests
N/A
QA Steps
N/A
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel so the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
N/a
Android: mWeb Chrome
N/a
iOS: Native
N/a
iOS: mWeb Safari
N/a
MacOS: Chrome / Safari
N/a
MacOS: Desktop
N/a