-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Conversation
This is ready, but I want to add the tests. |
Sounds good, I added a work in progress label for now |
87ec18a
to
e0de7b7
Compare
b207c73
to
81f3590
Compare
Now must be ready to review |
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.
Really good changes overall, just a few comments
} | ||
}); | ||
} | ||
this.props.actions.setEditingPost('', 0, '', ''); |
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.
0/5, maybe set defaults on the action so you can just do this.props.actions.setEditingPost()
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.
Yes, I agree, the default values could be no-post.
const refocusId = this.props.editingPost.refocusId; | ||
if (refocusId !== '') { | ||
setTimeout(() => { | ||
const element = $(refocusId).get(0); |
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.
Can we use document.getElementById()
instead of jquery? That we can remove jquery from this entire file
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.
Sure! 😄
@@ -1,55 +1,43 @@ | |||
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved. |
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 assume this file is kept around because other components depend on it?
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, exactly the CreatePost and CreateComment components. After migrate that components this file can be removed.
@jespino This is huge! Looks good to me. Could you add more tests to increase test coverage? Right now it's a bit low at ~30%. |
88328e0
to
763a734
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.
Great work on this 👍
Thank you! I'm still working on improving the coverage 😄 |
5641f79
to
0666ffb
Compare
Now have a better coverage. @saturninoabril if you find any bad pattern in the tests, let me know and I can change it 😃 (and learn from it). |
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.
Honestly, it's impressive, such a great unit test pattern!
Thank you! 😊 |
Github issue: mattermost/mattermost#7236
Checklist