-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 'ThumbnailImage.js' component to TypeScript #31269
[TS migration] Migrate 'ThumbnailImage.js' component to TypeScript #31269
Conversation
865687e
to
0bbf83a
Compare
*/ | ||
|
||
function calculateThumbnailImageSize(width, height, windowHeight) { | ||
function calculateThumbnailImageSize(width: number, height: number, windowHeight: number) { | ||
if (!width || !height) { |
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.
Do you know if we need this check? Is it for 0 width/height?
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.
Yes, this check is for 0, to prevent all calculations in this case I think
0bbf83a
to
fb4f11d
Compare
fb4f11d
to
991999e
Compare
Before making this PR ready for review please add QA steps! |
@blazejkustra I've already added them. Do you mean to add more of them? |
@pasyukevich Ah sorry, I looked at Tests section, you can update it with what's in QA steps |
@narefyev91 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] |
@pasyukevich i see this TS error. Can we fix that? i think that we can move default values for imageWidth and imageHeight inside calculateThumbnailImageSize function. Because both 2 props only used inside it. Which will make TS checks correct.
|
Reviewer Checklist
Screenshots/VideosWebweb.mp4Mobile Web - Chromeandroid-web.movMobile Web - Safari8mb.video-Fsp-qcGhSJiC.mp4Desktop8mb.video-VT4-6lAuuelt.mp4iOS8mb.video-cyJ-ByfAJHPK.mp4Android8mb.video-jUQ-pwbLx2mN.mp4 |
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.
LGTM! Feel free to ignore my comment above - if you think that default values should be placed at the top level function
🎀 👀 🎀 C+ reviewed
We did not find an internal engineer to review this PR, trying to assign a random engineer to #25036 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
✋ 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/madmax330 in version: 1.4.2-0 🚀
|
🚀 Deployed to production by https://github.com/luacmartins in version: 1.4.2-3 🚀
|
Details
Fixed Issues
$ #25036
PROPOSAL:
Tests
Offline tests
QA Steps
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)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-native-converted.webm
Android: mWeb Chrome
android-web-converted.webm
iOS: Native
ios-native-converted.mp4
iOS: mWeb Safari
ios-web-converted.mp4
MacOS: Chrome / Safari
desktop-web-converted.mov
MacOS: Desktop
desktop-native-converted.mov