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

Add status to search field #10826

Open
eszkadev opened this issue Dec 31, 2024 · 1 comment
Open

Add status to search field #10826

eszkadev opened this issue Dec 31, 2024 · 1 comment
Labels
bug Something isn't working unconfirmed

Comments

@eszkadev
Copy link
Contributor

Describe the Bug

We often fail on search tests as sometimes the result of the serach appears after some time. It would be good to have option to check current state of the field (inactive, searching, found, not-found).
Currently we only blink it with some class to show red color for a few miliseconds.

Actual Behavior

How it works in COOL (red blink works only one time after we type something wrong and before we were in "found" or "clear" state)
searchcool-2024-12-31_11.08.26.webm

Example how it works in browser's search field on a webpage, where red color is present until we blur/search again:
loremfirefox-2024-12-31_10.42.58.webm

I propose to add classes for all the mentioned states:

  • inactive-search (empty / out of focus)
  • searching (started, waiting for response form server)
  • found
  • not found

Change possible ony on user action, not after timeout. This will allow to check it's state in cypress to make tests more stable.
Also we can style all of these states if needed.

cc: @pedropintosilva @banobepascal what do you think?

@banobepascal
Copy link

@eszkadev Just reviewed and tested this. I agree that implementing state specific classes for the search field will be necessary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unconfirmed
Projects
Status: No status
Development

No branches or pull requests

2 participants