zulip icon indicating copy to clipboard operation
zulip copied to clipboard

Add stream filter to Recent topics.

Open amanagr opened this issue 3 years ago • 15 comments

RT-stream_filter

amanagr avatar Nov 15 '21 17:11 amanagr

I'm excited to see this getting attention! @aryanshridhar FYI, since you were working on making a multi-select version of the dropdown widget that we'd eventually hope to use here.

timabbott avatar Nov 15 '21 19:11 timabbott

image

Super simple iteration of stream filter. Next iteration would be multi-select version of this. Then, add a function in backend to get last message of all topics in the stream and display them.

amanagr avatar Jan 28 '22 13:01 amanagr

I think the top option should be "Clear filter" if you've already selected a stream.

image

The other thing is I think we should probably decorate the stream name with its icon, perhaps using the same styling we use in the "Move topic" stream selection UI; as it is you just have a "Denmark" and it's not obvious what role that word has.

image

timabbott avatar Feb 26 '22 00:02 timabbott

Here are some thoughts from playing with the PR.

  1. I agree that we should remove the "Filter streams" option, but maybe we should just have an "x" rather than "Clear filter"? I don't think we use that text elsewhere.
  2. I agree that the pill is currently confusing once you have a stream selected, and it's worth trying adding stream decorators. I'm not sure that'll be sufficient, though, for making it not confusing... we can see.
  3. I found it distracting to have the pill resize each time I changed the selection, moving everything else around in the process. I wonder if we should leave some extra space around the word so that it doesn't have to adjust all the time?
  4. Long stream names are not handled well. Turns out we have the same issue in the "move message" UI, so let me know if you'd like me to file a separate issue for this. I guess we should just make the drop-down wider if needed in both places, like we do in the typeahead in the compose box, for example. Screen Shot 2022-03-01 at 1 28 29 PM

alya avatar Mar 01 '22 21:03 alya

I think this is one of the things I'll want to prioritize integrating once 5.0 is out the door.

timabbott avatar Mar 24 '22 22:03 timabbott

@amanagr would you be up for updating this PR based on the feedback above?

alya avatar Apr 13 '22 18:04 alya

Thanks for the reminder.

amanagr avatar Apr 20 '22 05:04 amanagr

@amanagr just wanted to bump this for your TODO list; I think once we've done https://github.com/zulip/zulip/pull/20256#issuecomment-1055886341, we can do a chat.zulip.org deployment on this. We may very well find that actually merging it is blocked by data plumbing issues around scrolling to the bottom, but it might be pretty valuable for figuring out what those need to be to run it for a week.

timabbott avatar Jul 28 '22 19:07 timabbott

Bumping this one again for @amanagr, in case that's helpful.

alya avatar Aug 29 '22 05:08 alya

Screenshot 2022-09-01 at 7 46 06 PM Screenshot 2022-09-01 at 7 46 33 PM Screenshot 2022-09-01 at 7 46 23 PM Screenshot 2022-09-01 at 7 46 11 PM

@alya updated based on your feedback!

amanagr avatar Sep 01 '22 14:09 amanagr

Let me push another update then this should be ready for review.

amanagr avatar Sep 01 '22 19:09 amanagr

Screenshot 2022-09-02 at 1 29 26 AM screenshot with the cross icon.

amanagr avatar Sep 01 '22 19:09 amanagr

Hmm, dark theme looks broken:

Screen Shot 2022-09-01 at 2 59 06 PM

alya avatar Sep 01 '22 22:09 alya

The other thing I noticed is that the term "All", which was already a bit of a misnomer regarding muted streams, becomes even more incorrect once this filter is added.

After chatting with @timabbott , let's just try deleting the "All" button. We can also consider adding a "reset" icon in the future if we feel the need (e.g. something along these lines).

Screen Shot 2022-09-01 at 3 11 06 PM

alya avatar Sep 01 '22 22:09 alya

Heads up @amanagr, 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 upstream/main branch and resolve your pull request's merge conflicts accordingly.

zulipbot avatar Sep 21 '22 00:09 zulipbot