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

Search bar is behaving weird #366

Closed
2 tasks done
sleidig opened this issue Nov 25, 2019 · 6 comments
Closed
2 tasks done

Search bar is behaving weird #366

sleidig opened this issue Nov 25, 2019 · 6 comments
Assignees
Labels
Status: Community Help Wanted (good first issue) simple tasks that don't require understanding every last detail of our platform Type: Bug
Milestone

Comments

@sleidig
Copy link
Member

sleidig commented Nov 25, 2019

Describe the bug
The search box (top right) is not working smoothly:

  • searching for something into the search box and then deleting it again doesn't reset the result. Previous results remain visible in the dropdown even after clicking somewhere else and clicking back into the empty searchbox.
  • It takes a very long time to load search results (at least on the first search query). A loading animation would be helpful user feedback to signal the status to the user.

Additional context
Search depends on pouchdb indices so this can only be debugged when setting useTemporaryDatabase to false in the config.json

@sleidig sleidig added Type: Bug Status: Community Help Wanted (good first issue) simple tasks that don't require understanding every last detail of our platform labels Nov 25, 2019
@sleidig sleidig modified the milestones: Next Release: [v2.10], CURRENT Milestone Feb 18, 2020
@Lorsbyjm Lorsbyjm self-assigned this Mar 24, 2020
@Lorsbyjm
Copy link
Contributor

fixed the first point in the pull request by removing a failure in one of the called functions. Furthermore I check the input before sending the query to the database to contain at least a char or a number. Otherwise even an space would be searched and that takes long.
Here, we could also use harder restrictions as a minimum of three letters before going to the database ??

Did not work on the second point yet and the searching is still to long. Animation needed

sleidig added a commit that referenced this issue Mar 30, 2020
Merge pull request #424 from Aam-Digital/search-panel-fix
see issue #366
@Lorsbyjm
Copy link
Contributor

@sleidig For the second problem, the long loading. Instead of using a loading icon we could add an information block to autolaod alias the search result and display there a text like: "please wait". Furthermore you could display other texts like "please be more specific, there are to many items matching your search" . What do you think? Good idear or too much overhead?

@sleidig
Copy link
Member Author

sleidig commented Mar 30, 2020

Showing a text to give explanation is a smart idea, especially for the cases when we are not triggering search yet ("Please enter more specific search term, there are too many items matching your search.") and when there are no results ("Sorry, no results are matching your search.").

I didn't completely understand your other suggestion with the alias but "please wait" might stop people while they are still typing, which is not really the intention, is it?

Do you know if the delay is mostly due to preparing result items or the initial search request?

@tomwwinter
Copy link
Contributor

tomwwinter commented Jun 26, 2020

The search is now only carried out from three characters upwards.

However, a search like "M Mu" will also trigger a search. Here we should perhaps check whether the first word has at least three characters?

Besides, now:

  • The current status of the search is displayed
  • The system waits a short time before an entry triggers a search
  • An already running search is cancelled (technically only ignored) and replaced with the new search query (switchMap)

EDIT: Note to me: rearranging the code is not very helpful for comparing changes.

@sleidig
Copy link
Member Author

sleidig commented Jun 27, 2020

However, a search like "M Mu" will also trigger a search. Here we should perhaps check whether the first word has at least three characters?

I don't see this as a big problem. The goal is to limit the number of results displayed (and loaded - for performance). At least the first goal is still reached.

sleidig pushed a commit that referenced this issue Jun 27, 2020
# [2.14.0](2.13.2...2.14.0) (2020-06-27)

### Bug Fixes

* prevent error log message about serviceworker not available ([a2eebf9](a2eebf9))
* **dashboard:** improve styling of recent-notes dashboard widgets ([4355ea4](4355ea4))
* **note:** prevent disappearing of children linked in notes ([4aba52b](4aba52b))
* **notes:** add full width to notes table ([7eef007](7eef007)), closes [#457](#457) [#458](#458)
* **search:** improve search: loading indication and other hints ([6995476](6995476)), closes [#366](#366) [#456](#456)

### Features

* add pagination to tables ([87cddde](87cddde)), closes [#381](#381) [#445](#445)
* **conflict-resolution:** view and resolve pouchdb document conflicts ([2a84025](2a84025)), closes [#79](#79) [#393](#393)
* **latest-changes:** display changelog based on GitHub Release information ([7226f08](7226f08)), closes [#238](#238)
@sleidig
Copy link
Member Author

sleidig commented Jun 27, 2020

🎉 This issue has been resolved in version 2.14.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Community Help Wanted (good first issue) simple tasks that don't require understanding every last detail of our platform Type: Bug
Projects
None yet
Development

No branches or pull requests

3 participants