Skip to content
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

model/boxes: Allow users to post stream messages without a topic. #757

Closed
wants to merge 2 commits into from

Conversation

kaustubh-nair
Copy link
Member

@kaustubh-nair kaustubh-nair commented Jul 31, 2020

This follows the convention used by other Zulip clients to
automatically post a message without a topic, or a topic with only
whitespaces, to a topic named '(no topic)'.

Tests amended.

Fixes #754.

@zulipbot zulipbot added size: M [Automatic label added by zulipbot] enhancement New feature or request labels Jul 31, 2020
@kaustubh-nair kaustubh-nair added PR needs review PR requires feedback to proceed and removed PR needs review PR requires feedback to proceed labels Jul 31, 2020
@zulipbot zulipbot added size: XL [Automatic label added by zulipbot] and removed size: M [Automatic label added by zulipbot] labels Aug 4, 2020
@zulipbot zulipbot added size: M [Automatic label added by zulipbot] and removed size: XL [Automatic label added by zulipbot] labels Aug 4, 2020
@kaustubh-nair kaustubh-nair added the PR needs review PR requires feedback to proceed label Aug 4, 2020
@kaustubh-nair kaustubh-nair force-pushed the no-topic-messages branch 5 times, most recently from e5c60cb to 5ada285 Compare August 5, 2020 17:48
Copy link
Collaborator

@neiljp neiljp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kaustubh-nair This looks good functionally 👍 I left two minor points inline; otherwise my only thought is whether we should add a test for the UI, since we dropped them in the case where the functionality was elsewhere?

zulipterminal/ui_tools/boxes.py Show resolved Hide resolved
zulipterminal/ui_tools/boxes.py Outdated Show resolved Hide resolved
@neiljp neiljp removed the PR needs review PR requires feedback to proceed label Aug 6, 2020
@zulipbot zulipbot added size: L [Automatic label added by zulipbot] and removed size: M [Automatic label added by zulipbot] labels Aug 7, 2020
@kaustubh-nair kaustubh-nair force-pushed the no-topic-messages branch 2 times, most recently from bc6bfb4 to 8a5347a Compare August 7, 2020 18:13
@kaustubh-nair
Copy link
Member Author

@neiljp Thanks for the review! This is ready

@kaustubh-nair kaustubh-nair added the PR needs review PR requires feedback to proceed label Aug 7, 2020
@neiljp
Copy link
Collaborator

neiljp commented Aug 8, 2020

@kaustubh-nair Your first commit claims to have added a test, but there is only a test in the second commit. Did you mean to have a simple test in that first commit and then extend it in the second?

@neiljp neiljp removed the PR needs review PR requires feedback to proceed label Aug 8, 2020
This puts stream related function calls in the same block, thus making
changes to content/topic becomes easy.
This follows the convention used by other Zulip clients to
automatically post a message without a topic, or a topic with only
whitespaces, to a topic named '(no topic)'.

Test added.

Fixes zulip#754.
@kaustubh-nair
Copy link
Member Author

@neiljp That's what I had planned before, but the logic in the first commit is too simple to require a test, so I thought I'd just add one for topic matching in the second one. It would just involve checking if the model methods are called with mocked parameters.

@neiljp
Copy link
Collaborator

neiljp commented Aug 9, 2020

@kaustubh-nair Thanks - I just wanted clarification on the test before merging, though I also combined some test lines in the mocking before merging manually. In any case, another good merge! 🎉

@neiljp neiljp closed this Aug 9, 2020
@neiljp neiljp added this to the Next Release milestone Aug 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size: L [Automatic label added by zulipbot]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deal with no topic messages
3 participants