-
Notifications
You must be signed in to change notification settings - Fork 2.7k
MM 20545 migrate components/user settings/display to type script #5988
MM 20545 migrate components/user settings/display to type script #5988
Conversation
9d13a02
to
3df8547
Compare
3df8547
to
255e4fb
Compare
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 really good @sridhar02, thanks for your work on this :)
I have a few comments for you to review.
255e4fb
to
26fd695
Compare
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.
One quick little fix to make, thanks for your work :)
55add01
to
023df8d
Compare
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.
Almost there!
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 now, thanks @sridhar02!
327f8ca
to
3d521c0
Compare
Hello @sridhar02 thanks for your contribution! I ran Cypress tests against this PR and it's failing to some user settings cases and looked like related to the changes here. Note that it's not failing on master. See https://mm-cypress-report.s3.amazonaws.com/709-webapp-pr-5988-327f8ca/mochawesome.html for reference. Could you please take a look at the failing tests? Let me know if you need help. |
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
3d521c0
to
5f7bb66
Compare
5f7bb66
to
b14043e
Compare
@devinbinnie can you help me here, while verifying the cypress test failing , i found that unit tests are also failing in two places is user_setting_display.tsx file, in which userAutomaticTimezone is one of them, observed that it is boolean used for the input element attribute which always a boolean but in redux it defined like this, I think I need to change the redux type which will solve the error here what are your thoughts? export type UserTimezone = {
useAutomaticTimezone: boolean | string;
automaticTimezone: string;
manualTimezone: string;
}; |
@sridhar02 I think the I think for your case, we can just force the type to be a boolean by wrapping it in a |
@saturninoabril @devinbinnie I have fixed all the errors and cypress tests are also rectified, can you review the PR? |
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.
Thanks @sridhar02! Tested and passed.
Summary
Ticket Link
Fixes mattermost/mattermost#13696
JIRA Ticket https://mattermost.atlassian.net/browse/MM-20545