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

msglist: Handle UserTopicEvent, hiding/showing messages as needed #822

Merged
merged 5 commits into from
Aug 13, 2024

Conversation

gnprice
Copy link
Member

@gnprice gnprice commented Jul 17, 2024

In particular this will allow us to start offering UI for muting
and unmuting topics, and have the message list the user is looking at
update appropriately when they do so.

Fixes: #421


The first two commits are taken from #787 (/cc @PIG208):
aef0ab1 test [nfc]: Allow overriding original stream and add checks.
9c50ba5 message: Handle moved messages from UpdateMessageEvent.

So they can be ignored in reviewing this PR, and we'll plan to merge #787 before this one.

@gnprice gnprice requested review from chrisbobbe and PIG208 July 17, 2024 23:24
@gnprice gnprice added the maintainer review PR ready for review by Zulip maintainers label Jul 22, 2024
@chrisbobbe
Copy link
Collaborator

This has gathered some conflicts; could you resolve those please?

@gnprice gnprice force-pushed the pr-msglist-muting branch from 888ec02 to ce08cfe Compare July 24, 2024 23:11
@gnprice
Copy link
Member Author

gnprice commented Jul 24, 2024

Sure — done.

@chrisbobbe
Copy link
Collaborator

Thanks! LGTM, but I think we intend to wait for #787 before merging this.

Copy link
Member

@PIG208 PIG208 left a comment

Choose a reason for hiding this comment

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

Went through the PR. Looks good to me too! Just one nit question.

// thorough unit tests. So these tests focus on the rest of the logic.

final stream = eg.stream();
const String topic = 'foo';
Copy link
Member

Choose a reason for hiding this comment

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

nit: Is it intentional that topic is only used in setVisibility? It might be helpful to reuse it to indicate elsewhere in the tests that this particular topic is affected by the helper.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, thanks — that would be clearer.

@gnprice
Copy link
Member Author

gnprice commented Aug 9, 2024

Thanks for the reviews!

Now that #787 is merged, I've rebased this and addressed the comment above; PTAL.

@chrisbobbe
Copy link
Collaborator

Thanks, LGTM! Just awaiting @PIG208, then.

@PIG208
Copy link
Member

PIG208 commented Aug 12, 2024

Other than the example_data conflict, this looks good to me!

I just hit one of these in a new test I was writing, and wanted
more information to debug: which of the two conditions failed?

I seem to recall hearing a report of this in a non-test context
recently, too, but I'm not finding it on a quick search of the
tracker or of Zulip.
In particular this means that repeated calls `eg.stream()` with
no arguments will get distinct names, as well as IDs, so that they
can all be added to the same store without collision.

Then also simplify away the various places where a test was passing
a stream name when the only thing about the name that mattered to
the test was being distinct from other names (or when nothing about
the name mattered to the test at all).
In particular this will allow us to start offering UI for muting
and unmuting topics, and have the message list the user is looking at
update appropriately when they do so.

Fixes: zulip#421
@gnprice
Copy link
Member Author

gnprice commented Aug 13, 2024

Thanks! Rebased; merging.

@gnprice gnprice force-pushed the pr-msglist-muting branch from 3d37653 to d37f0f7 Compare August 13, 2024 04:32
@gnprice gnprice merged commit d37f0f7 into zulip:main Aug 13, 2024
1 check passed
@gnprice gnprice deleted the pr-msglist-muting branch August 13, 2024 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintainer review PR ready for review by Zulip maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update message list on muting/unmuting a stream or topic
3 participants