-
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
[TS migration] Migrate 'Header.js' component to TypeScript #30233
[TS migration] Migrate 'Header.js' component to TypeScript #30233
Conversation
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.
Header migration looks good to me! Unfortunately we mistyped Text component, I made some suggestion how to improve it 😄
# Conflicts: # src/components/Header.js # src/components/Text.tsx
@allroundexperts 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] |
Reviewer Checklist
Screenshots/Videos |
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.
Looks good. However, I'm not sure why the re-assurance tests are failing?
We did not find an internal engineer to review this PR, trying to assign a random engineer to #25016 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
re running the perf test based on this convo 🙏 https://expensify.slack.com/archives/C01GTK53T8Q/p1698952935068319 |
textStyles?: StyleProp<TextStyle>; | ||
}; | ||
|
||
function Header({title = '', subtitle = '', textStyles = [], shouldShowEnvironmentBadge = false}: HeaderProps) { |
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.
Hoping maybe to learn something here, what's the term (or what is it called) for what we're doing here {} : propTypes
?
is this a typescript thing or a newer JS language thing?
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.
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.
👍 ah thanks, I'd completely forgot about "object destructing" addition to JS
these keep failing 😭 maybe pull main and re-push and 🙏 that takes care of it? |
this is what it's failed with the past 3 attempts
I think initially it was 3 so i guess we've moved in a better direction but ya can you pull |
Waiting for this PR to be merged to resolve PR Author Checklist check failing. |
okay that a was merged |
@bondydaa I've merged the latest main, and now checks seem to pass. |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/bondydaa in version: 1.3.99-0 🚀
|
🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.99-0 🚀
|
🚀 Deployed to staging by https://github.com/bondydaa in version: 1.4.0-0 🚀
|
Details
[TS migration] Migrate 'Header.js' component to TypeScript
Fixed Issues
$ #25016
PROPOSAL: N/A
Tests
Look through the app and make sure the Header looks okay.
Open Storybook:
Offline tests
N/A
QA Steps
Look through the app and make sure the Header looks okay.
Open Storybook:
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
![safari3](https://github.com/Expen
sify/App/assets/23176449/064fbc81-bcf9-468b-aca1-e869f4d62aaf)
MacOS: Desktop
Storybook