Closed Bug 1925311 Opened 2 years ago Closed 2 years ago

Create moz-select component

Categories

(Toolkit :: UI Widgets, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
134 Branch
Tracking Status
firefox134 --- fixed

People

(Reporter: mstriemer, Assigned: mstriemer)

References

(Blocks 1 open bug)

Details

(Whiteboard: [recomp])

Attachments

(3 external files)

Create a <moz-select> element that can layout a select using our standard input element helpers. The helpers will need an update to support the select being underneath the label.

For version one we will use an unstyled <select> element. We should discuss the API and fill out the component's API docs template as a team.

Potential markup could slot in <option> elements, however this may require updating all consumers in the future if we need to start customizing the elements in the future. Some placeholder element like a <moz-option> may make sense. Potentially we could make the <option> elements placeholders in the future, this is also worth some discussion.

<moz-select label="Destination">
  <option value="pdf">Save to PDF</option>
  <option value="office-printer">Office Printer</option>
</moz-select>

This was created with the assistance of Mozilla's ChatGPT 4o instance.

Assignee: nobody → mstriemer
Attachment #9431964 - Attachment description: WIP: Bug 1925311 - Create a basic moz-select component r?#recomp-reviewers! → Bug 1925311 - Create a basic moz-select component r?#recomp-reviewers!
Status: NEW → ASSIGNED
Attachment #9431964 - Attachment description: Bug 1925311 - Create a basic moz-select component r?#recomp-reviewers! → WIP: Bug 1925311 - Create a basic moz-select component r?#recomp-reviewers!
Attachment #9431964 - Attachment description: WIP: Bug 1925311 - Create a basic moz-select component r?#recomp-reviewers! → Bug 1925311 - Part 1: Create a basic moz-select component r?#recomp-reviewers!
Pushed by mstriemer@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e113a742f02b Part 1: Create a basic moz-select component r=reusable-components-reviewers,desktop-theme-reviewers,hjones https://hg.mozilla.org/integration/autoland/rev/01481c4a14c9 Part 2: Tests for moz-select r=reusable-components-reviewers,hjones https://hg.mozilla.org/integration/autoland/rev/fe4dbe34c9a4 Part 3: Include moz-select in moz-fieldset story r=reusable-components-reviewers,hjones
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 134 Branch
Blocks: moz-select
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: