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

Bad behavior on top search bar #6260

Closed
SamuelHassine opened this issue Mar 4, 2024 · 5 comments · Fixed by #6262
Closed

Bad behavior on top search bar #6260

SamuelHassine opened this issue Mar 4, 2024 · 5 comments · Fixed by #6262
Assignees
Labels
bug use for describing something not working as expected solved use to identify issue that has been solved (must be linked to the solving PR)
Milestone

Comments

@SamuelHassine
Copy link
Member

SamuelHassine commented Mar 4, 2024

Description

  1. Click inside the top search bar
  2. Click elsewhere in the screen (not on a button or another link) => it redirects to advanced search

Expected Output

The search should only be triggered when clicking on the search icon or if the key "enter" is pressed

@SamuelHassine SamuelHassine added bug use for describing something not working as expected needs triage use to identify issue needing triage from Filigran Product team labels Mar 4, 2024
@SamuelHassine SamuelHassine added this to the Release 6.0.5 milestone Mar 4, 2024
@jborozco jborozco removed the needs triage use to identify issue needing triage from Filigran Product team label Mar 4, 2024
@jpkha jpkha self-assigned this Mar 4, 2024
@jpkha
Copy link
Member

jpkha commented Mar 4, 2024

We discussed we @Kedae, that we add a functionality where the search is triggered "onBlur" when leaving the input.
I can make a parameter to activate or deactivate this functionality depending on which case we are using.
For now, I have fixed the issue, we do not submit anything if the value in input did not change, but we still have the submit "onBlur".

@Kedae
Copy link
Member

Kedae commented Mar 4, 2024

Well I think we misunderstood each other.

My point was the following : we need the searchInput to be correctly cleared when clearing filters.
The bonus point was : if we are able to update the localStorage onBlur without triggering the query, we should do it to gain consistency.

That being said, I'm not really sure what is the problem here @SamuelHassine, lot of tools (Notion for example, or our own docs) search when typing, onBlur or stuff like that not depending on a "enter" click. If it allows us more consistency and simpler interaction why should we rollback ?

@Kedae
Copy link
Member

Kedae commented Mar 4, 2024

@jpkha additionnaly, the clear on search panel doesn't clear the input

@jpkha
Copy link
Member

jpkha commented Mar 4, 2024

My point here is simply that we add the onBlur capability to ensure consistency. @SamuelHassine may not have been aware of this. I believe it would be clearer to submit a query upon leaving the search input because, in my opinion, having a search within the input but not applied to the list can confuse the user.

But let me know if you prefer to update the localStorage without triggering the query, as it is also possible.

@Jipegien
Copy link
Member

Jipegien commented Mar 4, 2024

the onBlur should not trigger the query. (Seen with Adrien)

@Jipegien Jipegien modified the milestones: Release 6.0.5, Release 6.0.6 Mar 4, 2024
@SamuelHassine SamuelHassine added the solved use to identify issue that has been solved (must be linked to the solving PR) label Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug use for describing something not working as expected solved use to identify issue that has been solved (must be linked to the solving PR)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants