-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
ui: Add search block UI #4444
ui: Add search block UI #4444
Conversation
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.
Love it! This is super useful for us. Would be good to support more filter conditions in the future (by external labels, compaction levels, etc)
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.
Some nits and a few suggestions. Looking good!
const resultIndex = result.map((value) => value.index); | ||
|
||
const blockResult = blocks.filter((block, index) => resultIndex.includes(index)); | ||
return blockResult; |
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.
I spoke with @adzshaf and mentioned that I think this could produce confusing experience for the user. If I provide full-length ULID that matches a block name exactly, but fuzzy search returns more than one result, then I would be very confused and asume that all of the blocks have the same name, which should not really be happening. I think it's fair to return multiple blocks if the ULID does not match any block exactly, i.e. it is not full-length or has a typo.
We can do this in a follow up of course, since this UI already provides a ton of value.
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.
lgtm!
Signed-off-by: Shafiya Adzhani <[email protected]>
Signed-off-by: Shafiya Adzhani <[email protected]>
Signed-off-by: Shafiya Adzhani <[email protected]>
Signed-off-by: Shafiya Adzhani <[email protected]>
Signed-off-by: Shafiya Adzhani <[email protected]>
4d48fb8
to
e05ed00
Compare
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.
LGTM-ing again, this force push just rebases on main
actually! this PR should definitely have a changelog entry! It provides a great new feature for the user |
Signed-off-by: Shafiya Adzhani <[email protected]>
22b2e51
to
3ede8bd
Compare
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.
LGTM :)
Changes
This PR is part of LFX Mentorship project (issue: #3112). We want to add Search Block by ID.
Verification
When we haven't search anything yet:
Example search block by ID:
Tested on local using
make quickstart