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

change: [M3-8530] - Allow quoted strings in Search v2 and improve StackScript searching on Linode Create v2 #10894

Conversation

bnussman-akamai
Copy link
Member

@bnussman-akamai bnussman-akamai commented Sep 5, 2024

Description 📝

Allow spaces in search

  • Allows users to use quoted strings (therefore spaces) when searching using Search v2 🔍
    • For example, if you want to search for a StackScript with the label My StackScript, with this PR, you can search using a quoted string: label: "My StackScript"
      • ⚠️ Ideally, the user would be able to do label: My StackScript instead of label: "My StackScript", but I couldn't quite get that working. I think it would require a significant rework of our search parser. I think a quoted string is probably a good step forward for now, but let me know if you disagree!

Fix searching with and on StackScript tab of Linode Create

  • Makes the user's search to have priority over the default StackScript filter 💪
    • This fixes an issue where and queries would not work because they were overwritten by the default filter

Preview 📷

Before After
Search with string Screenshot 2024-09-05 at 12 02 09 PM Screenshot 2024-09-05 at 12 02 17 PM
Fix and queries Screenshot 2024-09-05 at 12 03 25 PM Screenshot 2024-09-05 at 12 03 15 PM

How to test 🧪

As an Author I have considered 🤔

  • 👀 Doing a self review
  • ❔ Our contribution guidelines
  • 🤏 Splitting feature into small PRs
  • ➕ Adding a changeset
  • 🧪 Providing/Improving test coverage
  • 🔐 Removing all sensitive information from the code and PR description
  • 🚩 Using a feature flag to protect the release
  • 👣 Providing comprehensive reproduction steps
  • 📑 Providing or updating our documentation
  • 🕛 Scheduling a pair reviewing session
  • 📱 Providing mobile support
  • ♿ Providing accessibility support

@bnussman-akamai bnussman-akamai added the Search Relates to Cloud Manager's search functionality label Sep 5, 2024
@bnussman-akamai bnussman-akamai self-assigned this Sep 5, 2024
@bnussman-akamai bnussman-akamai requested a review from a team as a code owner September 5, 2024 16:12
@bnussman-akamai bnussman-akamai requested review from dwiley-akamai and abailly-akamai and removed request for a team September 5, 2024 16:12
Copy link

github-actions bot commented Sep 5, 2024

Coverage Report:
Base Coverage: 86.4%
Current Coverage: 86.4%

Copy link
Contributor

@dwiley-akamai dwiley-akamai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can use spaces by using a quoted string ✅
Can use and in the search ✅

How are users informed of the rules governing the search functionality?

Co-authored-by: Dajahi Wiley <114682940+dwiley-akamai@users.noreply.github.com>
@bnussman-akamai
Copy link
Member Author

That's a good question @dwiley-akamai. For now, I don't think we'll add new information users about the new search syntax, but as part of Search v2 we will make sure we address that.

Copy link
Contributor

@abailly-akamai abailly-akamai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed both cases now work as expected.

FWIW, it would be nice for the tooltip to show an actual example because it's confusing with the quotes in there.

we could change:

Hint: try searching for a specific item by prepending your search term with "username:", "label:", or "description:"

to

Hint: try searching for a specific item by prepending your search term with `username:`, `label:`, or `description:`. example: `label: "my label"`

@bnussman-akamai
Copy link
Member Author

Good call @abailly-akamai

I'll update the tooltip to include that example

@bnussman-akamai
Copy link
Member Author

bnussman-akamai commented Sep 6, 2024

Thoughts? @abailly-akamai @dwiley-akamai

This might be a bit much. We can always go with the more simple copy that @abailly-akamai suggested

Screenshot 2024-09-06 at 12 28 16 PM

@abailly-akamai
Copy link
Contributor

@bnussman-akamai i think that's great! it's a bit intense but it's very clear 👍

@dwiley-akamai
Copy link
Contributor

That looks good to me as well 🚀

@bnussman-akamai bnussman-akamai merged commit b8f471a into linode:develop Sep 9, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Search Relates to Cloud Manager's search functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Community Stackscripts Search Problems
4 participants