-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[explorer] add KV prefix search #12431
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
Merged
Merged
Changes from 7 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
63ad293
Add prefix filtering to the API
emily-shen 296db1f
add prefix search bar to ui
emily-shen a031313
unprettify and ignore routeTree.gen.ts
emily-shen 8a6e07f
changeset
emily-shen 7de403b
Merge branch 'main' into emily/kv-prefix
NuroDev c6917a6
Fixed local explorer `build` script
NuroDev d4beded
Merge branch 'main' into emily/kv-prefix
NuroDev 19a4228
devin feedback
emily-shen ecf23ba
fix turbo build issue
emily-shen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| "@cloudflare/local-explorer-ui": minor | ||
| "miniflare": minor | ||
| --- | ||
|
|
||
| Add ability to search KV keys by prefix | ||
|
|
||
| The UI and list keys API now lets you search KV keys by prefix. | ||
|
|
||
| This is an experimental WIP feature. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| import { Button } from "@base-ui/react/button"; | ||
| import { useState } from "react"; | ||
|
|
||
| interface SearchFormProps { | ||
| onSearch: (prefix: string) => void; | ||
| disabled?: boolean; | ||
| } | ||
|
|
||
| export function SearchForm({ onSearch, disabled = false }: SearchFormProps) { | ||
| const [prefix, setPrefix] = useState(""); | ||
|
|
||
| const handleSubmit = (e: React.SyntheticEvent) => { | ||
| e.preventDefault(); | ||
| onSearch(prefix); | ||
| }; | ||
|
|
||
| return ( | ||
| <form className="flex gap-2 items-center" onSubmit={handleSubmit}> | ||
| <label className="sr-only" htmlFor="search-prefix"> | ||
| Search keys by prefix | ||
| </label> | ||
| <input | ||
| id="search-prefix" | ||
| className="flex-1 max-w-[400px] font-mono bg-bg text-text py-2 px-3 text-sm border border-border rounded-md focus:outline-none focus:border-primary focus:shadow-[0_0_0_3px_rgba(255,72,1,0.15)] disabled:bg-bg-secondary disabled:text-text-secondary" | ||
| placeholder="Search keys by prefix..." | ||
| value={prefix} | ||
| onChange={(e) => setPrefix(e.target.value)} | ||
| disabled={disabled} | ||
| /> | ||
| <Button | ||
| type="submit" | ||
| className="btn shrink-0 inline-flex items-center justify-center py-2 px-4 text-sm font-medium rounded-md cursor-pointer transition-[background-color,transform] active:translate-y-px bg-bg-tertiary text-text border border-border hover:bg-border" | ||
| disabled={disabled} | ||
| focusableWhenDisabled | ||
| > | ||
| Search | ||
| </Button> | ||
| </form> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.