GithubHelp home page GithubHelp logo

Search options about harmonic-hn HOT 4 OPEN

simonhalvdansson avatar simonhalvdansson commented on July 30, 2024
Search options

from harmonic-hn.

Comments (4)

mchowdhury avatar mchowdhury commented on July 30, 2024

Take a look at implementing search using https://github.com/material-components/material-components-android/blob/master/docs/components/Search.md#usage

They should have support for filtering in SearchView

from harmonic-hn.

AppearamidGuy avatar AppearamidGuy commented on July 30, 2024

I like Gmail's search ui which uses chips for filtering*:
Screenshot from 2023-08-24 20-43-16

There are actually two slightly different UIs for search. The first one is when you start searching and it shows quick results. In this mode the search field with chips is part of a fixed toolbar** that doesn't move when you scroll quick results. After confirming search, the search field transforms back into search bar. It is still part of a toolbar with chips, but now it can scroll away and reappears on scroll in opposite direction. This UX might need to be adjusted for Harmonic as it doesn't display search bar by default, but there is some guidance for this***.

Clicking the options opens bottom sheet dialog, but they can also display menu or date picker directly. Between BS and menu I prefer bottom sheets for consistency, because we need numeric inputs for points and number of comments filters.


* A few other search UI approaches I saw had a button that opens a separate dialog/screen with all the filtering options. And one more used slidable view (like nav drawer) for the options
** Probably combination of search view and chips in the container area
*** Also UI on tablets is different

from harmonic-hn.

SimonHalvdansson avatar SimonHalvdansson commented on July 30, 2024

I agree Gmails implementation is rather ideal with their chips instead of dropdowns. Also the whole Material 3 concept of having the search interface be a modal (which is not necessarily fullscreen on tablets) is certainly preferable to what is implemented now.

The Google Photos example you linked in the guidelines for the UX is certainly nice and plays nice with the current UI outside of "search mode".

I think the way to implement the search bar atleast is to have the search button start an animation which introduces an SearchBar with a focused SearchView. Then how this whole modal thing comes into play is still unclear to me - reusing the same RecyclerView as the main screen as is done now has it's advantages (less need to reimplement things) but it would certainly be preferable to introduce a new RecyclerView for the search results and "disentangle" the UI's a bit.

from harmonic-hn.

AppearamidGuy avatar AppearamidGuy commented on July 30, 2024

After experimenting a bit with search components, I've found some problems. Material design library actually doesn't support tablet search UI yet: material-components/material-components-android#3190.

Also there is no built in way to animate to/from a button. It can either slide in from the bottom or animate from SearchBar. The best workaround I've found is to have an invisible SearchBar at the same position as search button and animate from it. It looks pretty good, but not perfect.

Then how this whole modal thing comes into play is still unclear to me - reusing the same RecyclerView as the main screen as is done now has it's advantages (less need to reimplement things) but it would certainly be preferable to introduce a new RecyclerView for the search results and "disentangle" the UI's a bit.

I'd suggest separating headers from content adapter, so the same adapter implementation can be used by both main screen and search modal. This can be done by either moving headers to a Toolbar, or if you want to keep them part of recycler - by moving to a separate adapter and using ConcatAdapter to display it in the same recycler as content.

from harmonic-hn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.