[TS migration] Migrate 'Composer.stories.js', 'DragAndDrop.stories.js', 'Form.stories.js' and 'RadioButtonWithLabel.stories.js' stories to TypeScript#37820
Conversation
| multiline | ||
| onChangeText={setComment} | ||
| onPasteFile={setPastedFile} | ||
| style={[defaultStyles.textInputCompose, defaultStyles.w100, defaultStyles.verticalAlignTop]} | ||
| /> | ||
| </View> | ||
| <View style={[defaultStyles.flexRow, defaultStyles.mv5, defaultStyles.flexWrap, defaultStyles.w100]}> | ||
| <View | ||
| style={[defaultStyles.border, defaultStyles.noLeftBorderRadius, defaultStyles.noRightBorderRadius, defaultStyles.p5, defaultStyles.flex1]} | ||
| id={CONST.REPORT.DROP_NATIVE_ID} |
There was a problem hiding this comment.
DROP_NATIVE_ID doesn't exist in CONST.REPORT
src/stories/Form.stories.tsx
Outdated
| if (args.formState?.error) { | ||
| FormActions.setErrors(args.formID, {error: args.formState.error as MaybePhraseKey}); | ||
| } else { | ||
| FormActions.clearErrors(args.formID); | ||
| } |
There was a problem hiding this comment.
Before, this method FormActions.setErrors(args.formID, args.formState.error); was used for both setting and clearing error. But that approach wasn't aligned with our current typing.
src/stories/Form.stories.tsx
Outdated
| if (args.formState?.error) { | ||
| FormActions.setErrors(args.formID, {error: args.formState.error as MaybePhraseKey}); | ||
| } else { | ||
| FormActions.clearErrors(args.formID); | ||
| } |
|
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
|
This doesn't require QA, right? How about adding [No QA] to the title? |
|
|
||
| /** Indicate that users are dragging file or not */ | ||
| setIsDraggingOver: (value: boolean) => void; | ||
| setIsDraggingOver?: (value: boolean) => void; |
There was a problem hiding this comment.
Are you sure this should be optional?
There was a problem hiding this comment.
@blazejkustra Yep, it's already so on the main. Report screen uses DragAndDropProvider without setIsDraggingOver as well.
@blazejkustra It's possible to test it and I've specified test steps, but I'm okay to mark it as No QA if there is an agreement for stories as well 👌 |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #25355 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
|
@NikkiWines 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 definitely passing when I merged 🤔 |
|
🚀 Deployed to staging by https://github.com/NikkiWines in version: 1.4.52-0 🚀
|
|
🚀 Deployed to production by https://github.com/Beamanator in version: 1.4.52-6 🚀
|
Details
[TS migration] Migrate 'Composer.stories.js', 'DragAndDrop.stories.js', 'Form.stories.js' and 'RadioButtonWithLabel.stories.js' stories to TypeScript
Fixed Issues
$ #25355
$ #25356
$ #25357
$ #32036
PROPOSAL: N/A
Tests
DragAndDropstory. Drop an image to the drop area, make sure it works as before.RadioButtonWithLabelstory. Make sure checked/unchecked radio button looks ok.Composerstory. Make sure it looks the same way as before.Formstory. Looks through forms and make sure they look and works as before.5.1
Defaultform - mark Terms and Conditions checkbox and press Submit button. Popup with submitted info should appear in a couple of seconds.5.2
Input Error- press Submit button - whole form should be in different validation errors.5.3
Loading- loading indicator should be shown instead of Submit button.5.4
Server Error- error message should display above Submit button5.5
With Native Event Handler- input values, they also should display below inputOffline tests
N/A
QA Steps
Same as in the Tests section.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.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
Composer
DragAndDrop
DragAndDrop.mp4
Form
form.mp4
RadioButtonWithLabel