-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Refactor DatePicker component for ios #24528
Refactor DatePicker component for ios #24528
Conversation
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
import {Button, View, Keyboard} from 'react-native'; | ||
import RNDatePicker from '@react-native-community/datetimepicker'; | ||
import moment from 'moment'; | ||
import _ from 'underscore'; | ||
import isFunction from 'lodash/isFunction'; |
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.
I am curious about usage lodash
instead of underscore
at Expensify. I don't mind, but AFAIK we use only get
from lodash
.
cc @fabioh8010 @gedu
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.
As I see we have various functions exported from lodash (lodashFindLast, lodashMerge, lodashIntersection, lodashOrderBy, lodashUnset, lodashCloneDeep and 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.
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.
@rezkiy37 Sorry for the late response, just noticed this one today. Yes, right now the usage of lodash
/ underscore
is a bit confusing but we are going to fix this during the TS migration. We will remove underscore
usage to only keep lodash
, and also restrict lodash
usage in favor of vanilla JS solutions when possible. More info here.
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.
BTW, @waterim, since you are working with moment
, I guess we should not use raw moment
here to improve this logic and simplify your work.
20c9567
to
58211d5
Compare
58211d5
to
855fd50
Compare
@mananjadhav 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] |
I missed this because I thought this was reviewed others. @pasyukevich can you please merge the latest main, and then I can start reviewing this. |
855fd50
to
c270234
Compare
@mananjadhav rebased to latest main |
@mananjadhav Did you have a chance to take a look? |
This got completely missed out of my radar. @pasyukevich can you merge the latest main and I will try to finish this today itself. Apologies for the delay. |
Signed-off-by: Yauheni Pasiukevich <[email protected]>
c270234
to
9bd1046
Compare
@mananjadhav rebased to latest main |
Thanks @pasyukevich. I'll review and try to finish the checklist today itself. |
Reviewer Checklist
Screenshots/VideosWebweb-date-picker.movMobile Web - Chromemweb-chrome-date-picker.movMobile Web - Safarimweb-safari-date-picker.movDesktopdesktop-date-picker.moviOSios-date-picker.movAndroidandroid-date-picker.mov |
✋ 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/marcaaron in version: 1.3.85-0 🚀
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.3.85-4 🚀
|
🚀 Deployed to staging by https://github.com/marcaaron in version: 1.3.86-0 🚀
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.3.86-5 🚀
|
Details
Refactored DatePicker component for ios from class to function
Fixed Issues
$ #16137
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)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)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
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
ios.datepicker.mp4
Android