-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Remove free text search on contextURL #8503
Conversation
Codecov Report
@@ Coverage Diff @@
## main #8503 +/- ##
===========================================
- Coverage 32.82% 11.17% -21.65%
===========================================
Files 33 18 -15
Lines 4753 993 -3760
===========================================
- Hits 1560 111 -1449
+ Misses 3075 880 -2195
+ Partials 118 2 -116
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
@@ -104,7 +96,9 @@ export function WorkspaceSearch(props: Props) { | |||
<path fillRule="evenodd" clipRule="evenodd" d="M6 2a4 4 0 100 8 4 4 0 000-8zM0 6a6 6 0 1110.89 3.477l4.817 4.816a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 010 6z" fill="#A8A29E" /> | |||
</svg> | |||
</div> | |||
<input type="search" placeholder="Search Workspaces" onKeyDown={(ke) => ke.key === 'Enter' && search() } onChange={(v) => { setQueryTerm(v.target.value) }} /> | |||
<input type="search" placeholder="Search Workspace IDs or Instance IDs" style={{width: "20rem"}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Shall we go with one of these here based on #8453 (comment)? Cc @geropl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
workspaceId
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@geropl Like this?
59f531c
to
8992b7c
Compare
Looking at this now! 👀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @laushinka!
Regarding the input placeholder question in #8503 (comment):
I think @geropl was only suggesting to go with the workspaceId
option instead of the instanceId
as described in #8453 (comment) but sounds ok to keep the friendlier placeholder.
@@ -104,7 +96,9 @@ export function WorkspaceSearch(props: Props) { | |||
<path fillRule="evenodd" clipRule="evenodd" d="M6 2a4 4 0 100 8 4 4 0 000-8zM0 6a6 6 0 1110.89 3.477l4.817 4.816a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 010 6z" fill="#A8A29E" /> | |||
</svg> | |||
</div> | |||
<input type="search" placeholder="Search Workspaces" onKeyDown={(ke) => ke.key === 'Enter' && search() } onChange={(v) => { setQueryTerm(v.target.value) }} /> | |||
<input type="search" placeholder="Search Workspace IDs" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought: I still think that long-term using more descriptive placeholders like Search by name as described in the last point in #8453 (comment) could be better. The ID
, besides being a technical term, it's known within the team building the product but could be scary or ignored by users. We also scarcely reference the term workspace or instance ID
in our docs.
suggestion: However, let's go with the current change as this looks obviously good and helpful and improve this if needed in a future iteration. ✔️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also scarcely reference the term workspace or instance
ID
in our docs.
Initially I thought that Admins surely know that those are workspace IDs, but I realize that that was my biased assumption and the fact that we don't reference the term ID
anywhere makes me see your point.
Let's see how this goes - especially when self-hosted users give us feedback, and yes we can improve this anytime. 🙏🏽
<input type="search" placeholder="Search Workspaces" onKeyDown={(ke) => ke.key === 'Enter' && search() } onChange={(v) => { setQueryTerm(v.target.value) }} /> | ||
<input type="search" placeholder="Search Workspace IDs" | ||
onKeyDown={(ke) => ke.key === 'Enter' && search() } | ||
onChange={(v) => { setQueryTerm((v.target.value).trim()) }} /> | ||
</div> | ||
<button disabled={searching} onClick={search}>Search</button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Although out of the scope of the changes in this PR, what do you think of dropping this search button here and other pages within the admin dashboard?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thinking When there is no button, would the expectation be that the search result gets updated with every key change? Or would the user be expected to hit Enter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought: There are cases where searching or filtering on key change is valid and useful like projects or members which usually are a finite and small data set. However, it sounds optimal to not search on key change when filtering large datasets like instance users, workspaces, etc but require enter to perform the search. 💭
Thinking out loud, we added the search button back in #3723 because we require the enter key to perform a search here but seems harmless to drop the button. Your call, feel free to move this discussion in a follow up issue. 🏓
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM and tested: works and looks nice! 👍
Description
This change disables the free text search, and encourages searching on workspace IDs.
It's a minimum change for now - there will be follow-up tasks to improve the search[1][2].
It also includes drive-by changes of removing whitespace from searches[1].
Related Issue(s)
Fixes #8453
Fixes #8454
How to test
Release Notes
Documentation