question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Consumer UI Refresh] Implement the Search view

See original GitHub issue

If you haven’t already, check out our contributing guidelines for onboarding!


We need to replace the ChatSwitcherView entirely with a “Search page” which is an even simpler version of the “New Chat” page. There is a method that should already calculate the correct options to display called OptionsListUtils.getSearchOptions(). The difference here between the “New Chat” page will be that:

  • No headers will be shown
  • No personalDetails will be shown
  • No headers will be shown for the sections
  • Users can not be invited via this flow
  • Chats with multiple participants should be shown

Deliverables:

  • Implement the Search page and replace the ChatSwitcherView in the Sidebar.
  • The ChatSwitcherView and anything related to it (that is no longer used) must be deleted from the codebase.

Search Desktop Search

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
lucas-neuhaus-devcommented, Feb 8, 2021

Ohhhhh ok! That took me a while to figure out. Needed to stop and understand the getOptions function better.

Added a new entry in the object prop of the getOptions function, called showEmptyRecentReports, defaulted it to false. Set to true in the getSearchOptions call.

PR coming soon.

1reaction
lucas-neuhaus-devcommented, Feb 8, 2021

I thought it would be more stuff, but it’s extremely simple. I just needed to change:

alternateText: showChatPreviewLine ? lastMessageText : personalDetail.login

to

alternateText: (showChatPreviewLine && lastMessageText) ? lastMessageText : personalDetail.login

on the createOption function.

Alright I think I got all information I needed, going to finish testing on the platforms and create the PR. We can discuss better with the code in hands.

Proposal

  1. Create a SearchView component which looks a lot like NewChatPage. It uses the OptionsListUtils.getSearchOptions function to fetch both personalDetails and recentReports.
  2. Replace it with the ChatSwitcherView, and delete everything related to it from the code.
  3. On the list, show either the last message if it is a recentReport, or the email if it personalDetail.
  4. For showing the text unread style and hide the pin and draft icons on the list, I will break down the current OptionRow’s hideAdditionalOptionStates prop in two: hideAdditionalOptionStates and forceTextUnreadStyle.

The forceTextUnreadStyle will be used on NewChatPage and NewGroupPage.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Implementing Search View in Android - Section.io
This tutorial will take the reader through creating and implementing search views in Android. A SearchView is an Android widget that ...
Read more >
Android SearchView Example Tutorial using DataBinding
In this tutorial we'll use SearchView.OnQueryTextListener and Filterable interfaces. The Filterable interface filters the queried text over a ...
Read more >
SAP CRM activity search refreshed page.
When I search in activity and select one of it. If i make any change and go back to the search page i...
Read more >
SearchView - Android Developers
A widget that provides a user interface for the user to enter a search query and submit a request to a search provider....
Read more >
Configuring search in Next Experience
Administrators can customize Next Experience search settings. ... Use the client GlideList API in the Workspace Experience UI.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found