In settings, emptying the box should cause to see the whole settings
How to reproduce:
- Open settings
- in the search bar, in the three dots, select "clear history"
- tap in the search bar
Actual result:
- "no results"
Expected result:
- still seeing the settings.
(Note that if there was some previous search result, it's fine to see it here. It's just pointless to have a "no results" when no search occurs
How to reproduce:
- Search any term
- Press the cross
Actual result:
- Still the "no results" while clearly we would not be expecting any result here
Expected result:
- The settings menu
This cross seems like a natural way to stop searching. Having it empty the text and nothing more seems counter intuitive.
For the sake of the consistency, the rule can be simply that if the search box is empty and there are no search history, we show the settings. If the history is non empty, then don't change anything
i am taking this issue.
Hi, could I take on this issue? It seems the current assignee is inactive on this bug and is working on other bugs.
@krishpdev nope it interconneted with my previous issue. i am working on it you can work on other issues sir.
I have been working on this issue for a week but have not reached a final conclusion because the search is handled by a library. I tried to override it, but the solution is not very effective and is affecting other functionality.
still looking for possible solution.
If it's not possible, never mind. Just write down you try so that we understand why it's impossible. Also, potentially, add a feature request to the library, and link it here. It seems like a natural feature to want. It's really a small improvement, and not worth spending time on it.
Anyway, please don't try to do any hacky thing, just use the library API. If one day they update the library, we don't want the code to break because we used it in a non normal way
I investigated the search functionality issue within the settings screen. After reviewing the code and the behavior of the PreferenceSearch library, I concluded that a direct fix is not possible without either modifying the library's source code or employing potentially unstable workarounds.
The library lacks a built-in API to manage the display when search history is cleared or a search is canceled. Consequently, it displays "no results" instead of returning to the settings screen.
As suggested, I explored the library's official API for methods to alter this behavior, but I found no suitable functions to address these specific scenarios. Implementing a custom solution would likely require accessing internal components in a manner not intended by the library's design, which could introduce future compatibility problems.
Therefore, I recommend submitting a feature request to the library maintainers, proposing an API that allows for control of the default view when no search is active or when the history is cleared. This would provide a more intuitive user experience while avoiding the potential for future crashes caused by precarious workarounds.
I noticed @Arthur-Milchior, that you already raised this issue. I've included a link for future reference:
https://github.com/ByteHamster/SearchPreference/issues/39."
@Arthur-Milchior Given the library author's response, is there a path forwards here?
Hello 👋, this issue has been opened for more than 3 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically