-
Notifications
You must be signed in to change notification settings - Fork 350
internal_link: Generate new narrow links with "channel", not "stream" #1795
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -92,14 +92,14 @@ void main() { | |
|
|
||
| checkNarrow(const CombinedFeedNarrow().apiEncode(), jsonEncode([])); | ||
| checkNarrow(const ChannelNarrow(12).apiEncode(), jsonEncode([ | ||
| {'operator': 'stream', 'operand': 12}, | ||
| {'operator': 'channel', 'operand': 12}, | ||
| ])); | ||
| checkNarrow(eg.topicNarrow(12, 'stuff').apiEncode(), jsonEncode([ | ||
| {'operator': 'stream', 'operand': 12}, | ||
| {'operator': 'channel', 'operand': 12}, | ||
| {'operator': 'topic', 'operand': 'stuff'}, | ||
| ])); | ||
| checkNarrow(eg.topicNarrow(12, 'stuff', with_: 1).apiEncode(), jsonEncode([ | ||
| {'operator': 'stream', 'operand': 12}, | ||
| {'operator': 'channel', 'operand': 12}, | ||
| {'operator': 'topic', 'operand': 'stuff'}, | ||
| {'operator': 'with', 'operand': 1}, | ||
| ])); | ||
|
|
@@ -113,7 +113,7 @@ void main() { | |
|
|
||
| connection.zulipFeatureLevel = 270; | ||
| checkNarrow(eg.topicNarrow(12, 'stuff', with_: 1).apiEncode(), jsonEncode([ | ||
| {'operator': 'stream', 'operand': 12}, | ||
| {'operator': 'channel', 'operand': 12}, | ||
|
Comment on lines
115
to
+116
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test change shows that the effect of this commit is a bit broader than what the commit message says: It's also changing the get-messages requests we make to the server. I think it's fine for that to happen in the same commit; given the way ApiNarrow works, I think splitting those changes into separate commits would require complicating the logic. But the commit message should be adjusted to make that clear. |
||
| {'operator': 'topic', 'operand': 'stuff'}, | ||
| ])); | ||
| checkNarrow([ApiNarrowDm([123, 234])], jsonEncode([ | ||
|
|
@@ -123,6 +123,19 @@ void main() { | |
| {'operator': 'dm', 'operand': [123, 234]}, | ||
| ])); | ||
|
|
||
| connection.zulipFeatureLevel = 249; | ||
| checkNarrow(const ChannelNarrow(12).apiEncode(), jsonEncode([ | ||
| {'operator': 'stream', 'operand': 12}, | ||
| ])); | ||
| checkNarrow(eg.topicNarrow(12, 'stuff').apiEncode(), jsonEncode([ | ||
| {'operator': 'stream', 'operand': 12}, | ||
| {'operator': 'topic', 'operand': 'stuff'}, | ||
| ])); | ||
| checkNarrow(eg.topicNarrow(12, 'stuff', with_: 1).apiEncode(), jsonEncode([ | ||
| {'operator': 'stream', 'operand': 12}, | ||
| {'operator': 'topic', 'operand': 'stuff'}, | ||
| ])); | ||
|
|
||
| connection.zulipFeatureLevel = 176; | ||
| checkNarrow(eg.topicNarrow(12, 'stuff', with_: 1).apiEncode(), jsonEncode([ | ||
| {'operator': 'stream', 'operand': 12}, | ||
|
|
||
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.
nit:
s/few/a few/
Perhaps confusingly, the meaning of "few" and the meaning of "a few" point in opposite directions: "few" means the number is small, while "a few" means it's larger than one or two. So "affects few places" is a way of saying "don't worry, this doesn't affect much", which isn't the point you're aiming to make here.