-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Fixes #12467 : Migrate 'components/get_post_link_modal' module and associated tests to TypeScript #4110
Fixes #12467 : Migrate 'components/get_post_link_modal' module and associated tests to TypeScript #4110
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.
Some changes required, but is looking good. Thanks @M-ZubairAhmed
@jespino changes made, please take a look |
super(props); | ||
|
||
this.state = { | ||
show: false, | ||
post: {}, | ||
postId: 'undefined', |
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.
This is an arbitrary value here the undefined
string, probably makes more sense to have an optional postId?
attribute in the state, and don't set it here, and check it before is used. Actually, I think it makes no sense to be able to show the link if you don't have the postId, so probably we can check it in the render and return null
instead of the modal if the postId is not set.
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.
More changes needed around the postId
state attribute. Otherwise, looks good to me. Thanks @M-ZubairAhmed
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.
Now looks good to me. Thanks @M-ZubairAhmed! 🎉
Your welcome |
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! Thanks @M-ZubairAhmed!
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. Tested on the PR instance and there were no issues found.
Test server destroyed |
Hi @M-ZubairAhmed |
… fixes-issue-12467
@srkgupta yes done |
Summary
Migrated following javascript files to Typescript
components/widgets/settings/
-Ticket Link
Fixes mattermost/mattermost#12467