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

Update search result tile to open thread view when clicked #19196

Closed
2 of 5 tasks
germain-gg opened this issue Sep 28, 2021 · 4 comments · Fixed by matrix-org/matrix-react-sdk#7525
Closed
2 of 5 tasks
Assignees
Labels

Comments

@germain-gg
Copy link
Contributor

germain-gg commented Sep 28, 2021

Design

→ Figma Search Results

Requirements

  • Follows design explorations
  • A search result tile need to clearly stand out as part of a thread or not
  • Do not allow threads to be started for thread replies in search results (remove the "Reply in thread" contextual action for them, displaying it only for search results from the main timeline).
  • Clicking on it should open the thread view and highlight the corresponding event (waiting on Make matrix.to links open the thread view #18954)
@germain-gg
Copy link
Contributor Author

Need to make sure that the MessageActionBar hides the "Thread" button if the tiles shows an event that is already part of a thread

@germain-gg
Copy link
Contributor Author

@janogarcia Could you link to the design when it's ready please?

@janogarcia
Copy link

@gsouquet @daniellekirkwood

I put together some mockups for dealing with this specific issue. You can find my notes on the relevant section on Figma:

Search Results.

I'm copying below a snapshot of those notes for convenience.

Please also note that, as pointed out on Figma, we need to open the thread panel in the matching room for the specific search result. The current implementation is broken when searching "All Rooms", as it fails in multiple ways when trying to display a thread from a different room than the one you used to initiate the search:

  • It only shows the root message but none of its replies in the the thread panel.
  • The back button takes you back to the thread list for the room where the search was initiated in, instead of the room containing the thread you were viewing.
  • If you are viewing a thread from another room and then close the search interface, the thread panel will keep showing it (in the wrong room context).

Until we have proper support for a global thread panel, that can access all rooms, we're better off displaying the thread always in the context of the original room. It's way less convenient than always opening the thread directly in the right panel without leaving the search result list, but doing so introduces multiple edge cases that can't be elegantly addressed without support for a a global thread panel.

So, in short:

  • If search result is in the same room where the search was initiated from, then open the thread panel directly, without leaving the search results page.
  • If the search result is not in the same room where the search was initiated from, then open the thread panel in the room containing that thread, effectively leaving the search results page.

Note: Today's a national holiday in Spain, and then I'll be on vacation the next two days. I won't be able to follow up on this until next week.


Copied from Figma:

Search Results

  • Keyword match in root message
: Clicking on the root message shows it in room timeline. Clicking on the thread summary opens the thread panel for the matching room — exits search results if keyword match is from a different room.
  • Keyword match in thread reply: 
Clicking anywhere opens the thread panel for the matching room, scrolls down to the reply and highlights it.

@daniellekirkwood
Copy link
Contributor

Removing Needs Design and Jano's assignment on this issue as he's answered the question.
@gsouquet let us know what you think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants