Mattermost-server: Sort "Jump to" results on mobile to prioritize recently viewed channels

Created on 25 Mar 2020  路  16Comments  路  Source: mattermost/mattermost-server

Observed failure case: Type "Jason ". Notice that old unused GMs with Jason are prioritized over his DM channel, even though i talk with Jason in a DM quite often

Expected:

  1. When I tap on "jump to", before anything is typed:
  • Show a list of channels you are a member of sorted by Recency (last_viewed_at)
  • Cap the number of channels shown here in the default state to maximum of 20
  1. When a user types to start searching, show a maximum of 20 results that match the search criteria. We can reuse the logic for this as done for webapp in this PR. The expected user experience based on that logic is as follows:

First show, local results (not requested from the server, ie channels in your sidebar or users that authored posts loaded in your cache from other channels)

  • Show channels, DMs (including only GM's that are in your sidebar) that start with the search term sorted by last_viewed_at time, sort most recently viewed channels first in the list.
  • Next, Show channels, DMs, GMs (including only GM's that are in your sidebar) that match the search term sorted by last_viewed_at time, sort most recently viewed channels first in the list.
  • Note: last_viewed_at is stored on the client-side based on clicks by the user as the user visits channels. When refreshed, last_viewed_at time from the client is blown away and fetched from the server, however the server will never store a last_viewed at time that's greater than the last post time/last edited time in a channel. Meaning after a refresh, if the channel is not visited on the client, the last_viewed_at time = last post time/last edited time.

Then show API returned results (requested from server because you don't have them locally):

  • Show channels, DMs (including GM's that are not in your sidebar) that start with the search term sorted by last post time, sort most recently posted channels first in the list.
  • Next, show channels, DMs (including GM's that are not in your sidebar) that match the search term sorted by last post time, sort most recently viewed channels first in the list.
  • Next, show other users you have not started a DM/GM's with, sort the users that start with the search term first, then the rest alphabetically (based on Teammate Display Name preference).
  • Next, show all other public channels that I have not joined yet, sort by the channel display names that start with the search term first, then the rest alphabetically.
  1. Remove the sections for "Unreads", "Favorites", "Direct Messages", "Channels", etc as the user is typing - just respect the sort order identified above, with all channels in one list without headings

  2. When no results are matching the search terms, show the following screen indicating that no results are found. See Figma working file:
    [https://www.figma.com/file/GeuEhwS7wA041C2kzsjejR/MM-23060-Mobile-Jump-To-Empty-State?node-id=0%3A1|https://www.figma.com/file/GeuEhwS7wA041C2kzsjejR/MM-23060-Mobile-Jump-To-Empty-State?node-id=0%3A1]

UI for empty state:

image


If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.

New contributors please see our Developer's Guide.

JIRA: https://mattermost.atlassian.net/browse/MM-23060

AreEnd User Feature Medium Help Wanted TecReact Native Up For Grabs

All 16 comments

I can work on this. 馃憤

Awesome, thank you very much @pradeepmurugesan :rocket:

I am still on it.. Haven't made much progress though. Will give it a try this week. 馃憤

Hi @pradeepmurugesan, feel free to reach out to us with any questions if you're still working on this ticket :)

Sorry for the delay.. Bit held up.. Yet to get familiarise with the mobile set up. Will try to spend sometime this week.

Hi.. I tried to take a look and found that it requires changes in the API. There is another ticket that also depend on the same api change.. https://github.com/mattermost/mattermost-server/issues/14198 . Will propose my changes in the community.mattermost.com for the api.

Once approved, will implement the same.

Thanks for the follow-up!

Hey @pradeepmurugesan, how's this going? Any questions?

Nope.. cleared with Elias via the community chat. No api changes needed. Working on it. No questions. Just not finding the time. Will try to wrap it this week..

Awesome, thanks @pradeepmurugesan! Looking forward to it!

@pradeepmurugesan any progress on this one?

This issue appears stale and I鈥檓 adding the Up For Grabs label. If work is ongoing, please remove the label. If there is an existing PR, please also link it to the issue. Thanks!

@pradeepmurugesan let us know if you are still working on it

Note to anyone picking this up, the logic for this has already been written for the webapp and can be utilized here as well: https://github.com/mattermost/mattermost-webapp/pull/6756

Hi @esethna. Can I work on this?

@a-c-sreedhar-reddy, actually I think @pradeepmurugesan was going to take this one. @pradeepmurugesan can you confirm if you're working on this per our conversation yesterday?

Was this page helpful?
0 / 5 - 0 ratings