-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
Add warning banner if moving topic or multiple messages to a pre-existing conversation. #31151 #31279
base: main
Are you sure you want to change the base?
Conversation
e96f452
to
dbdf507
Compare
Manual test done:
|
Thanks for working on this @heyiming! Can you clean up the commit history following our guidelines? Check out our GitHub guide and commit guidelines for more details. |
0eede65
to
de4f17a
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.
Overall looks good to me. Just need some clean up and polishing. Would go over our commit guide and follow it to fix up your commit message. Your summary is too long; a max of 72 letters. Also remember to run a lint to fix up the lint issues :)
I think there's a chat.zulip.org thread related to this PR. Please link to it from the PR description. |
6c15600
to
a9c4b19
Compare
@evykassirer would it make sense for you to review this one? I haven't tested. |
e20c73d
to
f2e0aa9
Compare
@alya This pr is ready for another round of review. |
Please clean up your commit history and post again to request a review. See here for guidelines. |
Yeah, we also don't like to merge changes like that, it makes for a messy commit history. Check out git guide to fix up the commit history and use |
Only show the warning banner if submit button is enabled and the number of messages being moved are more than one. Fixes: zulip#31151
4434aff
to
55b6ecf
Compare
@alya commit history should be clean now. |
// target topic | ||
if (stream_widget_value !== undefined) { | ||
const {new_topic_name} = get_params_from_form(); | ||
if ( | ||
!stream_topic_history.stream_has_topic( | ||
Number.parseInt(stream_widget_value, 10), | ||
new_topic_name, | ||
) | ||
) { | ||
$("#move_topic_modal .move_topic_form_warning_container").html(""); | ||
return; | ||
} | ||
} |
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 wonder if we can simplify this nested if statement into two statements on the same level.
I would also like to see more in the commit description. It's very brief and you've stated what you've did in the commit, but I want to also know your motivation and reasoning behind this commit so that contributors like you can later come back to this commit and have a clear context of what happened. |
Heads up @heyiming, we just merged some commits that conflict with the changes you made in this pull request! You can review this repository's recent commits to see where the conflicts occur. Please rebase your feature branch against the |
Only show the warning banner if submit button is enabled and the number of messages being moved are more than one.
Fixes: #31151
CZO thread
Screenshots and screen captures:
Self-review checklist
NOTE: just want to get some quick feedback so no unit test yet.
(variable names, code reuse, readability, etc.).
Communicate decisions, questions, and potential concerns.
Individual commits are ready for review (see commit discipline).
Completed manual review and testing of the following: