Skip to content

Dropdown: standardize leading/trailing slot names and collapse the trailing slot soup #61

Description

@lifeiscontent

From the prop-design (component-manifesto) audit. DropdownItem is the worst offender for slot naming and configuration soup, and it's heavily composed (Table editable cells, Breadcrumb menu, etc.), so this needs a design call rather than a unilateral rename.

Two problems:

  1. Inconsistent leading/trailing naming vs the rest of the library. DropdownItem has icon (leading) + leading, and value + trailing + endIcon (trailing); DropdownSubTrigger has icon/trailing; DropdownLabel has action. Button/Input use leadingIcon/trailingIcon. Standardize on leadingIcon/trailingIcon where it's an icon slot.
  2. Trailing slot soup. DropdownItem carries three coexisting trailing slots (value text, trailing rich content, endIcon icon) that render in a fixed order and overlap in meaning. Per the manifesto ("compose primitives, don't turn components into control panels"), collapse these toward composition (a single trailing slot the caller composes, or trailing subcomponents).

Because DropdownItem is composed across several components and in-flight branches (#15, #6, #53), coordinate the rename so it doesn't break those.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions