You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add per-property descriptions and enum (OneOf) constraints to all builtin component schemas in nemo-registry so the LSP can provide rich hover documentation and accurate enum value completions.
Example: The button component has variant: PropertySchema::string().with_default("primary") — the LSP has no way to know valid variants are ["primary", "secondary", "danger", "ghost"].
Acceptance Criteria
Property descriptions
Every property in every builtin component has a .description() call with a concise one-line description
Descriptions include the expected type in human-readable form (e.g., "text to display (string)")
Properties with defaults mention the default value (e.g., "layout direction, \"vertical\" or \"horizontal\"")
Enum constraints
All string properties with a known fixed set of values use .one_of():
Summary
Add per-property descriptions and enum (
OneOf) constraints to all builtin component schemas innemo-registryso the LSP can provide rich hover documentation and accurate enum value completions.Context
The
nemo-lspserver (#62) provides:PropertySchema.descriptionValidationRule::OneOfon string-typed propertiesCurrently, the builtin component schemas in
crates/nemo-registry/src/builtins.rshave:ComponentMetadata)ConfigSchema::property(name, type)).description()calls on individual properties → no per-property hover docs.one_of()constraints on enum-like string properties → no enum completions.require()calls → incomplete required-field validationExample: The
buttoncomponent hasvariant: PropertySchema::string().with_default("primary")— the LSP has no way to know valid variants are["primary", "secondary", "danger", "ghost"].Acceptance Criteria
Property descriptions
.description()call with a concise one-line description\"vertical\"or\"horizontal\"")Enum constraints
.one_of():button.variant→["primary", "secondary", "danger", "ghost"]button.size→["xs", "sm", "md", "lg", "xl"]stack.direction→["vertical", "horizontal"]radio.direction→["vertical", "horizontal"]dock.position→["top", "bottom", "left", "right", "center"]alert.variant→["info", "success", "warning", "error"]progress.variant→["determinate", "indeterminate"]spinner.variant(if applicable)code_editor.language→["plain", "rust", "javascript", "typescript", "python", "json", "xml", "toml", "yaml", "css", "html", "sql"]avatar.shape→["circle", "square"]badge.variant→["default", "primary", "success", "warning", "danger"]theme.mode→["light", "dark", "system"].one_of()Required field validation
.require():labelrequirestextimagerequiressrciconrequiresnameselectrequiresoptionscheckboxrequireslabelradiorequiresoptionssliderrequiresvaluetablerequirescolumnshttprequiresurlVerification
cargo test -p nemo-registry— existing tests still passnemo storybookand verify no schema changes broke renderingGuidance for each component category
Layout (dock, stack, panel, tabs)
Input (button, input, textarea, select, checkbox, radio, slider, switch, toggle, code_editor, text_editor)
varianton button needs description + enumtypeattributes (if present) need enum for "text", "password", "email", "number"Display (label, icon, image, spinner, progress, tag, avatar, alert)
texton label should be marked requiredsrcon image should be marked requiredvariantneeds enumData (table, tree, list, accordion)
columnson table should be marked requireditemson list/tree needs descriptionCharts (line-chart, bar-chart, etc.)
data-source,x-field,y-fieldproperties should be consistently named and describedFeedback (modal, tooltip, badge, notification, collapsible)
openstate needs descriptionRelevant Files
crates/nemo-registry/src/builtins.rs— All builtin component schema definitionscrates/nemo-config/src/schema.rs—PropertySchema,.description(),.one_of(),.require()crates/nemo-registry/src/descriptor.rs—ComponentMetadata(already has component-level descriptions)Stack Base
main