Get a basic search implementation working in the settings ui and fix nav bar toggling bugs. Search functionality works by passing in each page and its items into our fuzzy search crate and filtering out any non-matches. A page is a match if any of its items are a match and an item is a match if its title or description has a fuzzy score greater than zero. In the future, a page section header will be filtered out if none of its children has a match or it will show all its children on a match. The team still has to decide what to do in that edge case, but that's the last step until search is fully implemented for our initial launch. Finally, I found some bugs in our nav bar toggling that occurred because we weren't taking into account the index change that occurred when toggling an element with children that is above the selected nav bar entry. I added tests to cover those edge cases as well. Release Notes: - N/A --------- Co-authored-by: Ben Kunkle <ben@zed.dev>
52 lines
1.0 KiB
TOML
52 lines
1.0 KiB
TOML
[package]
|
|
name = "settings_ui"
|
|
version = "0.1.0"
|
|
edition.workspace = true
|
|
publish.workspace = true
|
|
license = "GPL-3.0-or-later"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[lib]
|
|
path = "src/settings_ui.rs"
|
|
|
|
[features]
|
|
default = []
|
|
test-support = []
|
|
|
|
[dependencies]
|
|
anyhow.workspace = true
|
|
command_palette_hooks.workspace = true
|
|
editor.workspace = true
|
|
feature_flags.workspace = true
|
|
fs.workspace = true
|
|
fuzzy.workspace = true
|
|
gpui.workspace = true
|
|
menu.workspace = true
|
|
project.workspace = true
|
|
serde.workspace = true
|
|
settings.workspace = true
|
|
strum.workspace = true
|
|
theme.workspace = true
|
|
ui.workspace = true
|
|
util.workspace = true
|
|
workspace-hack.workspace = true
|
|
workspace.workspace = true
|
|
|
|
[dev-dependencies]
|
|
assets.workspace = true
|
|
client.workspace = true
|
|
futures.workspace = true
|
|
gpui = { workspace = true, features = ["test-support"] }
|
|
language.workspace = true
|
|
node_runtime.workspace = true
|
|
paths.workspace = true
|
|
session.workspace = true
|
|
settings.workspace = true
|
|
zlog.workspace = true
|
|
|
|
[[example]]
|
|
name = "ui"
|
|
path = "examples/ui.rs"
|