Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(site/src/pages/TemplateBuilder): remove redundant optional field labels/placeholders - #28928

Merged
aqandrew merged 9 commits into
mainfrom
feat/remove-optional-placeholder
Sep 10, 2026
Merged

feat(site/src/pages/TemplateBuilder): remove redundant optional field labels/placeholders#28928
aqandrew merged 9 commits into
mainfrom
feat/remove-optional-placeholder

Conversation

@aqandrew

@aqandrew aqandrew commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

removes "optional" labels and placeholder text from optional fields in Template Builder, because they're already marked as optional by being tucked into the "Additional settings" accordion

What

Resolves DEVEX-830. This is an isolated slice of #27077 (its item 4), rebased onto current main; nothing else from that PR is included.

Changes

  • Remove the (optional) indicator from optional fields. Non-required select/radio/switch-group labels and the module-variable label no longer append "(optional)" (the required * marker is unchanged).

  • Stop writing "Optional" into placeholders. The fallback is now "Required" for required fields and an empty string otherwise, in both ModuleSettingsStep and BaseTemplateParametersStep.

  • Per-module placeholder overrides. New moduleFieldPlaceholders.ts exposes getModuleFieldPlaceholder(moduleId, varName) backed by an override table (locked by moduleFieldPlaceholders.test.ts). Precedence in the module step: override → defaultPlaceholder(variable.default)"Required"/"".

    Module Field Placeholder
    codex model_reasoning_effort none, minimal, low, medium, high, or xhigh
    claude-code anthropic_api_key sk-ant-...
    claude-code model e.g. claude-sonnet-5
    git-clone base_dir $HOME
    git-clone branch_name Default branch
    dotfiles description e.g https://dotfiles.github.io or an SSH URL git@host:user/repo
  • Dim placeholder text to content-disabled via placeholder:!text-content-disabled on the module/base text fields.

Before / After

Storybook: pages/TemplateBuilder/ModuleConfigurationDefault, with "Additional settings" expanded.

  • Before: the optional field label reads One more example (optional); empty placeholders use the default content-secondary tone.
  • After: the label reads One more example (no "(optional)"); placeholder text is dimmed to content-disabled.

(Before/after screenshots are attached in the Coder chat that produced this PR; drop them here when publishing.)

Testing

  • pnpm check (biome) clean
  • pnpm lint:types (tsc) clean
  • pnpm vitest run --project=unit src/pages/TemplateBuilder/moduleFieldPlaceholders — 4 pass
  • pnpm vitest run --project=storybook src/pages/TemplateBuilder — 41 pass
Context: remaining #27077 items

Per Tracy's summary, #27077's items 5 (scroll fix) and 6 (customizations layout) are already effectively handled on main by later PRs (#27437, #27797). Item 7 (required-field miss highlight) is tracked separately (DEVEX-832). This PR is item 4.


Coder Agents generated, on behalf of @aqandrew.

Remove the '(optional)' indicator from optional template builder fields
and stop writing 'Optional' into placeholders. Add a per-module
placeholder override table (getModuleFieldPlaceholder) with precedence
override -> default -> 'Required'/'', and dim placeholder text via
content-disabled.

Isolated slice of #27077 (item 4). DEVEX-830.
@linear-code

linear-code Bot commented Sep 3, 2026

Copy link
Copy Markdown

DEVEX-830

@aqandrew aqandrew changed the title feat(site/src/pages/TemplateBuilder): overhaul module field placeholders feat(site/src/pages/TemplateBuilder): remove redundant optional field labels/placeholders Sep 3, 2026
…placeholder

# Conflicts:
#	site/src/pages/TemplateBuilder/BaseTemplateParametersStep.tsx

@jeremyruppel jeremyruppel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great!

@aqandrew
aqandrew marked this pull request as ready for review September 10, 2026 17:12
@aqandrew
aqandrew merged commit dd313a5 into main Sep 10, 2026
31 checks passed
@aqandrew
aqandrew deleted the feat/remove-optional-placeholder branch September 10, 2026 17:14
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants