Skip to content

feat(combobox): adding new s2 migration #3683

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 44 commits into from
Jun 2, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
ff02395
feat(combobox): adding new s2 migration
aramos-adobe Apr 23, 2025
2949dc4
Merge branch 'spectrum-two' into aramos-adobe/css769-combox-s2-migration
aramos-adobe Apr 29, 2025
d541906
Merge branch 'spectrum-two' into aramos-adobe/css769-combox-s2-migration
aramos-adobe Apr 29, 2025
75ce502
feat(combobox): refactoring field label and helptext
aramos-adobe Apr 30, 2025
428d391
feat(combobox): add metadata files
aramos-adobe Apr 30, 2025
93117b2
Merge branch 'spectrum-two' into aramos-adobe/css769-combox-s2-migration
aramos-adobe May 1, 2025
fb54e14
Merge branch 'spectrum-two' into aramos-adobe/css769-combox-s2-migration
aramos-adobe May 1, 2025
15fa122
Merge branch 'spectrum-two' into aramos-adobe/css769-combox-s2-migration
aramos-adobe May 5, 2025
2488a03
Merge branch 'spectrum-two' into aramos-adobe/css769-combox-s2-migration
aramos-adobe May 6, 2025
acd4c20
feat(combobox): add changeset, more test cases and metadata
aramos-adobe May 6, 2025
5c273ba
chore(combobox): add new s2 branch changes
aramos-adobe May 6, 2025
055803f
chore(combobox): adding helptext metadata
aramos-adobe May 6, 2025
edebd14
Merge branch 'spectrum-two' into aramos-adobe/css769-combox-s2-migration
aramos-adobe May 8, 2025
611b313
feat(combobox): add aria label, adjust story copy, and changeset
aramos-adobe May 9, 2025
d2b3cab
Merge branch 'aramos-adobe/css769-combox-s2-migration' of https://git…
aramos-adobe May 9, 2025
fd0d9b6
Merge branch 'spectrum-two' into aramos-adobe/css769-combox-s2-migration
aramos-adobe May 12, 2025
e009840
chore(combobox): updating metadata files
aramos-adobe May 12, 2025
00e7311
feat(combobox): add help text docs
aramos-adobe May 12, 2025
844b4dd
chore(combobox): restore some metadata files
aramos-adobe May 13, 2025
bbc25f0
Merge branch 'spectrum-two' into aramos-adobe/css769-combox-s2-migration
aramos-adobe May 14, 2025
fb00afc
feat(combobox): adding new tests, fixing css and template
aramos-adobe May 15, 2025
3ffa66d
Merge branch 'spectrum-two' into aramos-adobe/css769-combox-s2-migration
aramos-adobe May 15, 2025
0019491
feat(combobox): updating css classes, adding role to ifb, autocomplete
aramos-adobe May 16, 2025
e055d9d
Merge branch 'spectrum-two' into aramos-adobe/css769-combox-s2-migration
aramos-adobe May 16, 2025
976e3c2
Merge branch 'aramos-adobe/css769-combox-s2-migration' of https://git…
aramos-adobe May 16, 2025
85e0bf2
chore(combobox): adding combobox metadata files
aramos-adobe May 16, 2025
0e31748
Merge branch 'spectrum-two' into aramos-adobe/css769-combox-s2-migration
aramos-adobe May 16, 2025
65f0b55
Merge branch 'spectrum-two' into aramos-adobe/css769-combox-s2-migration
aramos-adobe May 19, 2025
f93eedb
feat(combobox): removing empty args for default combobox
aramos-adobe May 19, 2025
f30be07
feat(combobox): refactor template, passing mods, adding more tests
aramos-adobe May 21, 2025
3303ba3
chore(combobox): restore helptext metadata
aramos-adobe May 21, 2025
2e9ccb3
feat(combobox): update template
aramos-adobe May 21, 2025
cfd51d2
Merge branch 'spectrum-two' into aramos-adobe/css769-combox-s2-migration
aramos-adobe May 22, 2025
817d5cf
chore(combobox): adding metadata files
aramos-adobe May 22, 2025
558bf00
Merge branch 'spectrum-two' into aramos-adobe/css769-combox-s2-migration
aramos-adobe May 27, 2025
8befe00
feat(combobox): fix spacing issues
aramos-adobe May 29, 2025
f23e502
Merge branch 'spectrum-two' into aramos-adobe/css769-combox-s2-migration
aramos-adobe May 29, 2025
1e0aa2e
feat(combobox): adjusting diacritics line height
aramos-adobe May 29, 2025
53f352d
fix(combobox): restore border width subtraction
aramos-adobe May 29, 2025
b2874ad
Merge branch 'spectrum-two' into aramos-adobe/css769-combox-s2-migration
aramos-adobe May 29, 2025
f443181
feat(combobox): fixing autocomplete
aramos-adobe May 29, 2025
bfad7aa
feat(combobox): adjusting WHCM autocomplete mode
aramos-adobe May 30, 2025
3daface
Merge branch 'spectrum-two' into aramos-adobe/css769-combox-s2-migration
aramos-adobe May 30, 2025
e1bf05b
Merge branch 'spectrum-two' into aramos-adobe/css769-combox-s2-migration
aramos-adobe Jun 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(combobox): refactoring field label and helptext
  • Loading branch information
aramos-adobe committed Apr 30, 2025
commit 75ce5026b60ccfaa1dc31cbe32604b1a0f1f9742
126 changes: 50 additions & 76 deletions components/checkbox/dist/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,86 +2,64 @@
"sourceFile": "index.css",
"selectors": [
".spectrum-Checkbox",
".spectrum-Checkbox .spectrum-Checkbox-box",
".spectrum-Checkbox .spectrum-Checkbox-box:after",
".spectrum-Checkbox .spectrum-Checkbox-box:before",
".spectrum-Checkbox .spectrum-Checkbox-checkmark",
".spectrum-Checkbox .spectrum-Checkbox-input",
".spectrum-Checkbox .spectrum-Checkbox-input:checked + .spectrum-Checkbox-box .spectrum-Checkbox-checkmark",
".spectrum-Checkbox .spectrum-Checkbox-input:checked + .spectrum-Checkbox-box:before",
".spectrum-Checkbox .spectrum-Checkbox-input:checked:disabled + .spectrum-Checkbox-box:before",
".spectrum-Checkbox .spectrum-Checkbox-input:checked:disabled ~ .spectrum-Checkbox-label",
".spectrum-Checkbox .spectrum-Checkbox-input:checked:hover:disabled + .spectrum-Checkbox-box:before",
".spectrum-Checkbox .spectrum-Checkbox-input:disabled",
".spectrum-Checkbox .spectrum-Checkbox-input:disabled + .spectrum-Checkbox-box:before",
".spectrum-Checkbox .spectrum-Checkbox-input:disabled ~ .spectrum-Checkbox-label",
".spectrum-Checkbox .spectrum-Checkbox-input:focus-visible + .spectrum-Checkbox-box:after",
".spectrum-Checkbox .spectrum-Checkbox-input:focus-visible + .spectrum-Checkbox-box:before",
".spectrum-Checkbox .spectrum-Checkbox-input:focus-visible + .spectrum-Checkbox-label",
".spectrum-Checkbox .spectrum-Checkbox-input:hover:disabled + .spectrum-Checkbox-box:before",
".spectrum-Checkbox .spectrum-Checkbox-label",
".spectrum-Checkbox .spectrum-Checkbox-partialCheckmark",
".spectrum-Checkbox--emphasized .spectrum-Checkbox-input:checked + .spectrum-Checkbox-box:before",
".spectrum-Checkbox--emphasized .spectrum-Checkbox-input:focus-visible:checked + .spectrum-Checkbox-box:before",
".spectrum-Checkbox--emphasized.is-indeterminate .spectrum-Checkbox-box:before",
".spectrum-Checkbox--emphasized.is-indeterminate .spectrum-Checkbox-input:checked + .spectrum-Checkbox-box:before",
".spectrum-Checkbox--emphasized.is-indeterminate .spectrum-Checkbox-input:focus-visible + .spectrum-Checkbox-box:before",
".spectrum-Checkbox--emphasized.is-indeterminate:active .spectrum-Checkbox-box:before",
".spectrum-Checkbox--emphasized.is-indeterminate:active .spectrum-Checkbox-input:checked + .spectrum-Checkbox-box:before",
".spectrum-Checkbox--emphasized.is-indeterminate:hover .spectrum-Checkbox-box:before",
".spectrum-Checkbox--emphasized.is-indeterminate:hover .spectrum-Checkbox-input:checked + .spectrum-Checkbox-box:before",
".spectrum-Checkbox--emphasized.is-invalid .spectrum-Checkbox-input:focus-visible:checked + .spectrum-Checkbox-box:before",
".spectrum-Checkbox--emphasized.is-invalid.is-indeterminate:hover .spectrum-Checkbox-box:before",
".spectrum-Checkbox--emphasized.is-invalid.is-indeterminate:hover .spectrum-Checkbox-input:checked + .spectrum-Checkbox-box:before",
".spectrum-Checkbox--emphasized.is-invalid:active .spectrum-Checkbox-box:before",
".spectrum-Checkbox--emphasized.is-invalid:active .spectrum-Checkbox-input:checked + .spectrum-Checkbox-box:before",
".spectrum-Checkbox--emphasized.is-invalid:hover .spectrum-Checkbox-input:checked + .spectrum-Checkbox-box:before",
".spectrum-Checkbox--emphasized:active .spectrum-Checkbox-input:checked + .spectrum-Checkbox-box:before",
".spectrum-Checkbox--emphasized:focus-visible .spectrum-Checkbox-box:before",
".spectrum-Checkbox--emphasized:focus-visible .spectrum-Checkbox-input:checked + .spectrum-Checkbox-box:before",
".spectrum-Checkbox--emphasized:hover .spectrum-Checkbox-input:checked + .spectrum-Checkbox-box:before",
".spectrum-Checkbox--sizeL",
".spectrum-Checkbox--sizeS",
".spectrum-Checkbox--sizeXL",
".spectrum-Checkbox-box",
".spectrum-Checkbox-box:after",
".spectrum-Checkbox-box:before",
".spectrum-Checkbox-input",
".spectrum-Checkbox-input:checked + .spectrum-Checkbox-box .spectrum-Checkbox-checkmark",
".spectrum-Checkbox-input:checked + .spectrum-Checkbox-box:before",
".spectrum-Checkbox-input:disabled",
".spectrum-Checkbox--emphasized.is-indeterminate:not(.is-invalid) .spectrum-Checkbox-input:focus-visible + .spectrum-Checkbox-box:before",
".spectrum-Checkbox--emphasized:not(.is-invalid) .spectrum-Checkbox-input:focus-visible:checked + .spectrum-Checkbox-box:before",
".spectrum-Checkbox-input:focus-visible + .spectrum-Checkbox-box",
".spectrum-Checkbox-input:focus-visible + .spectrum-Checkbox-box:after",
".spectrum-Checkbox-input:focus-visible + .spectrum-Checkbox-box:before",
".spectrum-Checkbox-input:focus-visible + .spectrum-Checkbox-label",
".spectrum-Checkbox-input:focus-visible:checked + .spectrum-Checkbox-box:before",
".spectrum-Checkbox-label",
".spectrum-Checkbox-label:lang(ja)",
".spectrum-Checkbox-label:lang(ko)",
".spectrum-Checkbox-label:lang(zh)",
".spectrum-Checkbox.is-indeterminate .spectrum-Checkbox-box .spectrum-Checkbox-checkmark",
".spectrum-Checkbox.is-indeterminate .spectrum-Checkbox-box .spectrum-Checkbox-partialCheckmark",
".spectrum-Checkbox.is-indeterminate .spectrum-Checkbox-box:before",
".spectrum-Checkbox.is-indeterminate .spectrum-Checkbox-input:checked + .spectrum-Checkbox-box .spectrum-Checkbox-checkmark",
".spectrum-Checkbox.is-indeterminate .spectrum-Checkbox-input:checked + .spectrum-Checkbox-box .spectrum-Checkbox-partialCheckmark",
".spectrum-Checkbox.is-indeterminate .spectrum-Checkbox-input:checked + .spectrum-Checkbox-box:before",
".spectrum-Checkbox.is-indeterminate .spectrum-Checkbox-input:focus-visible + .spectrum-Checkbox-box:before",
".spectrum-Checkbox.is-indeterminate:hover .spectrum-Checkbox-box:before",
".spectrum-Checkbox.is-indeterminate:hover .spectrum-Checkbox-input:checked + .spectrum-Checkbox-box:before",
".spectrum-Checkbox.is-invalid .spectrum-Checkbox-box:before",
".spectrum-Checkbox.is-invalid .spectrum-Checkbox-input:checked + .spectrum-Checkbox-box:before",
".spectrum-Checkbox.is-invalid .spectrum-Checkbox-input:focus-visible + .spectrum-Checkbox-box:before",
".spectrum-Checkbox.is-invalid",
".spectrum-Checkbox.is-invalid.is-indeterminate .spectrum-Checkbox-box:before",
".spectrum-Checkbox.is-invalid.is-indeterminate .spectrum-Checkbox-input:checked + .spectrum-Checkbox-box:before",
".spectrum-Checkbox.is-invalid.is-indeterminate .spectrum-Checkbox-input:checked:not(:disabled) + .spectrum-Checkbox-box:before",
".spectrum-Checkbox.is-invalid.is-indeterminate .spectrum-Checkbox-input:focus-visible + .spectrum-Checkbox-box:before",
".spectrum-Checkbox.is-invalid.is-indeterminate:hover .spectrum-Checkbox-box:before",
".spectrum-Checkbox.is-invalid.is-indeterminate:hover .spectrum-Checkbox-input:checked + .spectrum-Checkbox-box:before",
".spectrum-Checkbox.is-invalid.is-indeterminate:hover .spectrum-Checkbox-label",
".spectrum-Checkbox.is-invalid:hover .spectrum-Checkbox-box:before",
".spectrum-Checkbox.is-invalid:hover .spectrum-Checkbox-input:checked + .spectrum-Checkbox-box:before",
".spectrum-Checkbox.is-readOnly .spectrum-Checkbox-input",
".spectrum-Checkbox.is-readOnly .spectrum-Checkbox-input:checked:disabled + .spectrum-Checkbox-box:before",
".spectrum-Checkbox.is-readOnly .spectrum-Checkbox-input:checked:disabled ~ .spectrum-Checkbox-label",
".spectrum-Checkbox.is-readOnly .spectrum-Checkbox-input:disabled + .spectrum-Checkbox-box:before",
".spectrum-Checkbox.is-readOnly .spectrum-Checkbox-input:disabled ~ .spectrum-Checkbox-label",
".spectrum-Checkbox.is-invalid.is-indeterminate:hover .spectrum-Checkbox-input:checked:not(:disabled) + .spectrum-Checkbox-box:before",
".spectrum-Checkbox.spectrum-Checkbox--emphasized",
".spectrum-Checkbox.spectrum-Checkbox--sizeL",
".spectrum-Checkbox.spectrum-Checkbox--sizeS",
".spectrum-Checkbox.spectrum-Checkbox--sizeXL",
".spectrum-Checkbox:active .spectrum-Checkbox-box:before",
".spectrum-Checkbox:active .spectrum-Checkbox-input:checked + .spectrum-Checkbox-box:before",
".spectrum-Checkbox:active .spectrum-Checkbox-label",
".spectrum-Checkbox:hover .spectrum-Checkbox-box:before",
".spectrum-Checkbox:hover .spectrum-Checkbox-input:checked + .spectrum-Checkbox-box:before",
".spectrum-Checkbox:hover .spectrum-Checkbox-label",
".spectrum-Checkbox:lang(ja)",
".spectrum-Checkbox:lang(ko)",
".spectrum-Checkbox:lang(zh)",
".spectrum-Checkbox:not(.is-readOnly) .spectrum-Checkbox-input:active:not(:disabled) + .spectrum-Checkbox-box",
".spectrum-Checkbox:not(.is-readOnly):active .spectrum-Checkbox-input:not(:disabled) + .spectrum-Checkbox-box"
],
"modifiers": [
"--mod-checkbox-animation-duration",
"--mod-checkbox-border-width",
"--mod-checkbox-bottom-to-text",
"--mod-checkbox-checkmark-color",
"--mod-checkbox-content-color-default",
"--mod-checkbox-content-color-disabled",
Expand All @@ -94,38 +72,30 @@
"--mod-checkbox-control-color-focus",
"--mod-checkbox-control-color-hover",
"--mod-checkbox-control-corner-radius",
"--mod-checkbox-control-invalid-color-down",
"--mod-checkbox-control-selected-color-default",
"--mod-checkbox-control-selected-color-down",
"--mod-checkbox-control-selected-color-focus",
"--mod-checkbox-control-selected-color-hover",
"--mod-checkbox-control-size",
"--mod-checkbox-emphasized-color-default",
"--mod-checkbox-emphasized-color-down",
"--mod-checkbox-emphasized-color-focus",
"--mod-checkbox-emphasized-color-hover",
"--mod-checkbox-focus-indicator-color",
"--mod-checkbox-focus-indicator-gap",
"--mod-checkbox-focus-indicator-thinkness",
"--mod-checkbox-focus-indicator-thickness",
"--mod-checkbox-font-size",
"--mod-checkbox-height",
"--mod-checkbox-invalid-color-default",
"--mod-checkbox-invalid-color-focus",
"--mod-checkbox-invalid-color-hover",
"--mod-checkbox-line-height",
"--mod-checkbox-line-height-cjk",
"--mod-checkbox-margin-block",
"--mod-checkbox-selected-border-width",
"--mod-checkbox-spacing",
"--mod-checkbox-text-to-control",
"--mod-checkbox-top-to-text",
"--mod-focus-indicator-thickness"
],
"component": [
"--spectrum-checkbox-animation-duration",
"--spectrum-checkbox-background-color",
"--spectrum-checkbox-border-width",
"--spectrum-checkbox-bottom-to-text",
"--spectrum-checkbox-checkmark-color",
"--spectrum-checkbox-content-color-default",
"--spectrum-checkbox-content-color-disabled",
"--spectrum-checkbox-content-color-down",
"--spectrum-checkbox-content-color-focus",
"--spectrum-checkbox-content-color-hover",
Expand All @@ -137,7 +107,6 @@
"--spectrum-checkbox-control-corner-radius",
"--spectrum-checkbox-control-selected-color-default",
"--spectrum-checkbox-control-selected-color-down",
"--spectrum-checkbox-control-selected-color-focus",
"--spectrum-checkbox-control-selected-color-hover",
"--spectrum-checkbox-control-size",
"--spectrum-checkbox-control-size-extra-large",
Expand All @@ -160,17 +129,28 @@
"--spectrum-checkbox-line-height",
"--spectrum-checkbox-line-height-cjk",
"--spectrum-checkbox-selected-border-width",
"--spectrum-checkbox-spacing",
"--spectrum-checkbox-text-font-style",
"--spectrum-checkbox-text-font-weight",
"--spectrum-checkbox-text-to-control",
"--spectrum-checkbox-top-to-control",
"--spectrum-checkbox-top-to-control-extra-large",
"--spectrum-checkbox-top-to-control-large",
"--spectrum-checkbox-top-to-control-medium",
"--spectrum-checkbox-top-to-control-small",
"--spectrum-checkbox-top-to-text"
],
"global": [
"--spectrum-accent-color-1000",
"--spectrum-accent-color-1100",
"--spectrum-accent-color-900",
"--spectrum-accent-content-color-default",
"--spectrum-accent-content-color-down",
"--spectrum-accent-content-color-hover",
"--spectrum-accent-content-color-key-focus",
"--spectrum-animation-duration-100",
"--spectrum-border-width-200",
"--spectrum-cjk-line-height-100",
"--spectrum-component-bottom-to-text-100",
"--spectrum-component-bottom-to-text-200",
"--spectrum-component-bottom-to-text-300",
"--spectrum-component-bottom-to-text-75",
"--spectrum-component-height-100",
"--spectrum-component-height-200",
"--spectrum-component-height-300",
Expand All @@ -183,7 +163,9 @@
"--spectrum-component-top-to-text-75",
"--spectrum-corner-radius-small-size-extra-large",
"--spectrum-corner-radius-small-size-large",
"--spectrum-corner-radius-small-size-medium",
"--spectrum-corner-radius-small-size-small",
"--spectrum-default-font-style",
"--spectrum-disabled-content-color",
"--spectrum-focus-indicator-color",
"--spectrum-focus-indicator-gap",
Expand All @@ -192,21 +174,15 @@
"--spectrum-font-size-200",
"--spectrum-font-size-300",
"--spectrum-font-size-75",
"--spectrum-gray-50",
"--spectrum-gray-700",
"--spectrum-gray-800",
"--spectrum-gray-25",
"--spectrum-line-height-100",
"--spectrum-negative-color-1000",
"--spectrum-negative-color-1100",
"--spectrum-negative-color-900",
"--spectrum-neutral-background-color-selected-default",
"--spectrum-neutral-background-color-selected-down",
"--spectrum-neutral-background-color-selected-hover",
"--spectrum-neutral-background-color-selected-key-focus",
"--spectrum-neutral-content-color-default",
"--spectrum-neutral-content-color-down",
"--spectrum-neutral-content-color-hover",
"--spectrum-neutral-content-color-key-focus",
"--spectrum-regular-font-weight",
"--spectrum-text-to-control-100",
"--spectrum-text-to-control-200",
"--spectrum-text-to-control-300",
Expand All @@ -217,7 +193,6 @@
"--highcontrast-checkbox-background-color-default",
"--highcontrast-checkbox-color-default",
"--highcontrast-checkbox-color-focus",
"--highcontrast-checkbox-color-hover",
"--highcontrast-checkbox-content-color-default",
"--highcontrast-checkbox-content-color-down",
"--highcontrast-checkbox-content-color-focus",
Expand All @@ -226,7 +201,6 @@
"--highcontrast-checkbox-focus-indicator-color",
"--highcontrast-checkbox-highlight-color-default",
"--highcontrast-checkbox-highlight-color-down",
"--highcontrast-checkbox-highlight-color-focus",
"--highcontrast-checkbox-highlight-color-hover"
]
}
72 changes: 42 additions & 30 deletions components/combobox/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -175,34 +175,13 @@
}
}

@media (forced-colors: active) {
.spectrum-Combobox {
--highcontrast-combobox-border-color-highlight: Highlight;
--highcontrast-combobox-border-color-invalid: Highlight;
--highcontrast-combobox-background-color-default: Canvas;
--highcontrast-combobox-readonly-border-color: CanvasText;

.spectrum-Combobox-button.spectrum-PickerButton--quiet {
.spectrum-PickerButton-fill {
forced-color-adjust: none;
}

.spectrum-PickerButton-icon {
/* Should match foreground color of the Textfield. */
color: CanvasText;
}
}
}
}

.spectrum-Combobox {
position: relative;
display: inline-flex;
display: inline-grid;
flex-flow: row nowrap;

inline-size: var(--mod-combobox-inline-size, var(--spectrum-combobox-inline-size));
min-inline-size: var(--mod-combobox-min-inline-size, var(--spectrum-combobox-min-inline-size));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Here's another thing about combobox that I'm wondering about that I sort of touched on in another comment: Should the min-inline-size be set on .spectrum-Combobox or on .spectrum-Combobox-input? When we have a side label the input tends to shrink a lot, in this case it's about 78.5px. Since the minimum width token is a multiplier (2.5 * the height, which is 32px), it looks like for this particular size the combobox should be a minimum of 80px. Which it is, if we're talking about the field label + input width, but the input is smaller. I know this is how it was before, but was that what was intended?

image image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rise-erpelding Looking at the component a little closer in Figma, it looks like side label and the input are half of the combobox in width.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@aramos-adobe I placed a min inline size of 50% for both label and the content (parent containing the inputs). I have seen any weird movements yet in the button. I did place a position: relative on the .spectrum-Combobox-content to keep the button at the end of it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think the 50% min sizing helps (textfield also has its own similar min sizing calc on the input, which helps here too) and that does match the way they're doing it in the Desktop Figma side label variants I see there, but the way I understood that combo-box-minimum-width-multiplier token to work is that it applies to the textfield input or any element that's the same width as the input, such as .spectrum-Combobox-content. Instead you have the combo-box-minimum-width-multiplier token on --spectrum-combobox-min-inline-size and then it's applied to .spectrum-Combobox, which includes the width of the input but also the width of the label.

I only see one instance where that's violated: XL(mobile), where the component height is 60px, so the min-width should be 60 * 2.5 = 150px but the component is just a few px shy of meeting that min-width.
Screenshot 2025-05-27 at 9 28 35 AM

block-size: var(--mod-combobox-block-size, var(--spectrum-combobox-block-size));
margin-block-start: var(--mod-combobox-spacing-label-to-combobox, var(--spectrum-combobox-spacing-label-to-combobox));

border-radius: var(--mod-combobox-border-radius, var(--spectrum-combobox-border-radius));
Expand Down Expand Up @@ -329,10 +308,9 @@
}
}

/* TEXTFIELD (wrapper) */
.spectrum-Combobox-textfield {
inline-size: 100%;
display: inline-flex;
.spectrum-Combobox-content {
display: flex;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Something strange is happening with the side label when it's really short, the infield button has no spacing between it and the textfield border. Not sure if it's related to this flex or if the issue is somewhere else, but that might be where I'd start looking into it.

image

Copy link
Collaborator

Choose a reason for hiding this comment

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

This works and wraps well!
image

The only potential issue I see here is if we have a longer word that doesn't break, not only is the button moving from its original position on the right side but the input seems smaller than what we'd want for the min-width:
image

The previous combobox looks like it also breaks with a long label, but in a different way.
image

This could definitely be a follow-up ticket if there doesn't seem to be a simple fix for this!

block-size: var(--mod-combobox-block-size, var(--spectrum-combobox-block-size));
}

/* TEXT INPUT */
Expand Down Expand Up @@ -403,10 +381,24 @@
}
}

&:not(&--left).spectrum-Combobox-label {
display: flex;
align-items: center;
justify-content: space-between;
.spectrum-Combobox--sideLabel {
.spectrum-Combobox-textfield {
inline-size: auto;
}
.spectrum-Combobox-label {
grid-row: 1 / span 2;
grid-column: 1 / span 1;
}

.spectrum-Combobox-content {
grid-row: 1 / span 1;
grid-column: 2 / span 1;
}

.spectrum-Combobox-helptext {
grid-row: 2 / span 1;
grid-column: 2 / span 1;
}
}

/* VALIDATION ICON */
Expand All @@ -427,3 +419,23 @@
display: none;
}
}

@media (forced-colors: active) {
.spectrum-Combobox {
--highcontrast-combobox-border-color-highlight: Highlight;
--highcontrast-combobox-border-color-invalid: Highlight;
--highcontrast-combobox-background-color-default: Canvas;
--highcontrast-combobox-readonly-border-color: CanvasText;

.spectrum-Combobox-button.spectrum-PickerButton--quiet {
.spectrum-PickerButton-fill {
forced-color-adjust: none;
}

.spectrum-PickerButton-icon {
/* Should match foreground color of the Textfield. */
color: CanvasText;
}
}
}
}
Loading
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy