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

fix(ui): projects filter ui #3771

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mirrajabi
Copy link

@mirrajabi mirrajabi commented Apr 2, 2025

Two issues with project filter input are fixed. (You may also see it as one issue and a feature)

1. The hidden search bar

In the case that the filter result was returned empty, the search bar would disappear, blocking the user from resetting the search. The only fix in this situation was to remove the projects-filter cookie to get the search bar back.

The image below shows how it would like before, if you would search for a non-existing project name:
ne

2. Hitting the enter button wouldn't change the projects-filter

This one was more of an annoying thing because previously you had to manually click on the search button to change the search filter. Now just hitting enter will do that.

I've checked the other interactions with the search bar like selecting different items and all still work as expected.

P.S. I've uploaded a screen recording of how it looks with this PR in this comment below.

Signed-off-by: Mad Mirrajabi <[email protected]>
@mirrajabi mirrajabi requested a review from a team as a code owner April 2, 2025 19:47
Copy link

netlify bot commented Apr 2, 2025

Deploy Preview for docs-kargo-io ready!

Name Link
🔨 Latest commit f4d0517
🔍 Latest deploy log https://app.netlify.com/sites/docs-kargo-io/deploys/67fbebb63f61f200089d40e0
😎 Deploy Preview https://deploy-preview-3771.docs.kargo.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mirrajabi
Copy link
Author

This is how it looks after the improvements:

after.mov

@krancour
Copy link
Member

krancour commented Apr 9, 2025

@mirrajabi thanks for this! I agree this can be improved.

I test drove this and found the keypress on enter sometimes behaving in surprising ways.

In this example, I search for "foo", which does not exist. Everything works great. Then I highlight and delete "foo" thinking I'm completely clearing the filter and I hit enter, expecting to once again see all Projects, but I end up being taken directly into my Project's page, even though it does not appear that I've highlighted it in the dynamic results beneath the search box.

Screen.Recording.2025-04-09.at.2.25.12.PM.mov

@mirrajabi
Copy link
Author

mirrajabi commented Apr 13, 2025

@krancour Thanks for testing!

There was indeed an issue there. If the search returned exactly one result, hitting enter would open the details page for that exact result, regardless of the search input. In this case there was only one project, so an empty search returned exactly that.
I've fixed this in f4d0517.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants