Skip to content

Commit

Permalink
More feature optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
SamRodri committed Jan 14, 2025
1 parent 2c5d094 commit fa295c8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
6 changes: 5 additions & 1 deletion crates/zng/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ default = [
"clipboard",
"color_filter",
"config",
"settings_editor",
"data_context",
"data_view",
"dialog",
Expand Down Expand Up @@ -262,6 +263,9 @@ fs_watcher = ["dep:zng-ext-fs-watcher"]
# Enable the configuration service.
config = ["dep:zng-ext-config"]

# Enable settings widgets.
settings_editor = ["dep:zng-wgt-settings"]

# Enable data context service and properties.
data_context = ["dep:zng-wgt-data"]

Expand Down Expand Up @@ -411,7 +415,7 @@ zng-wgt-ansi-text = { path = "../zng-wgt-ansi-text", version = "0.4.6", optional
zng-wgt-tooltip = { path = "../zng-wgt-tooltip", version = "0.5.6", optional = true }
zng-wgt-markdown = { path = "../zng-wgt-markdown", version = "0.4.6", optional = true }
zng-wgt-inspector = { path = "../zng-wgt-inspector", version = "0.3.6" }
zng-wgt-settings = { path = "../zng-wgt-settings", version = "0.2.6" }
zng-wgt-settings = { path = "../zng-wgt-settings", version = "0.2.6", optional = true }
zng-wgt-dialog = { path = "../zng-wgt-dialog", version = "0.2.6", optional = true }
zng-wgt-progress = { path = "../zng-wgt-progress", version = "0.2.6", optional = true }
zng-wgt-slider = { path = "../zng-wgt-slider", version = "0.2.5", optional = true }
Expand Down
1 change: 1 addition & 0 deletions crates/zng/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ pub mod settings {
/// # Full API
///
/// See [`zng_wgt_settings`] for the full settings editor API.
#[cfg(feature = "settings_editor")]
pub mod editor {
pub use zng_wgt_settings::{
categories_list_fn, category_header_fn, category_item_fn, setting_fn, settings_fn, CategoriesListArgs, CategoryHeaderArgs,
Expand Down
8 changes: 6 additions & 2 deletions crates/zng/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,7 @@ mod __prelude {
#[cfg(feature = "data_view")]
pub use zng_wgt_data_view::{DataView, DataViewArgs};

#[cfg(feature = "settings_editor")]
pub use zng_wgt_settings::SettingBuilderEditorExt as _;

#[cfg(feature = "dialog")]
Expand Down Expand Up @@ -1004,8 +1005,11 @@ mod defaults {
}

// setup SETTINGS_CMD handler
zng_wgt_settings::handle_settings_cmd();
tracing::debug!("defaults init, settings set");
#[cfg(feature = "settings_editor")]
{
zng_wgt_settings::handle_settings_cmd();
tracing::debug!("defaults init, settings set");
}

#[cfg(all(single_instance, feature = "window"))]
{
Expand Down

0 comments on commit fa295c8

Please sign in to comment.