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

Sort leading emoji first in channel names to match web #1202

Open
gnprice opened this issue Dec 23, 2024 · 2 comments
Open

Sort leading emoji first in channel names to match web #1202

gnprice opened this issue Dec 23, 2024 · 2 comments
Assignees
Labels
a-home The home screens of the app; finding and starting conversations a-i18n Translation, localization, internationalization beta feedback Things beta users have specifically asked for
Milestone

Comments

@gnprice
Copy link
Member

gnprice commented Dec 23, 2024

On the subscriptions / channels page, a user reported that names starting with an emoji are being sorted to the end, while they appear at the beginning in Zulip web.

We should match web's behavior in this respect.

(Eventually we should agree with Zulip web on the full ordering of all channel names. That's #1165 and is out of scope for this issue.)

Implementation

The name isn't the only key that the subscriptions / channels list is sorted by; it's also sorted by the channel's status as pinned and/or muted. The role of pinning and muting should remain unchanged.

This issue applies to everywhere a list of channels appears. That means:

Related issues

This is a scoped-down version of:

The full issue will require work upstream before we have a reasonable way to implement it. This issue is a smaller version that we can do sooner and will help some use cases.

@gnprice gnprice added a-i18n Translation, localization, internationalization a-home The home screens of the app; finding and starting conversations beta feedback Things beta users have specifically asked for labels Dec 23, 2024
@gnprice gnprice added this to the M5: Launch milestone Dec 23, 2024
@lakshya1goel
Copy link

lakshya1goel commented Dec 24, 2024

Hello, I want to work on this issue.

Before After
WhatsApp Image 2024-12-24 at 12 09 46 PM WhatsApp Image 2024-12-24 at 12 09 47 PM

My approach sorts the list so that names starting with emojis appear first, followed by non-emoji names sorted alphabetically. To determine if a name starts with an emoji, it checks if the first character falls within specific Unicode ranges representing emoji characters.

Also want a clarification regarding the position of channel names start with some special character like in above example #new_stream_test. Its an inactive channel so in zulip web it appears below the active channels but in zulip-flutter there is no classification for active and inactive channels.

@chrisbobbe
Copy link
Collaborator

Thanks! That sounds like a good direction. Please open a PR when your work is ready for review.

in zulip-flutter there is no classification for active and inactive channels.

We can ignore this distinction until we get to #1101, which is planned for a later milestone than this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-home The home screens of the app; finding and starting conversations a-i18n Translation, localization, internationalization beta feedback Things beta users have specifically asked for
Projects
Status: No status
Development

No branches or pull requests

3 participants