-
Notifications
You must be signed in to change notification settings - Fork 42
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
SuperSelect
components (HDS-3221)
#2022
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git βοΈ
|
KristinLBradley
force-pushed
the
hds-3221-super-select-component
branch
from
March 27, 2024 22:11
6117c24
to
b866594
Compare
KristinLBradley
force-pushed
the
hds-3221-super-select-component
branch
from
March 29, 2024 05:15
2519bdb
to
9522bb7
Compare
The exceptions are still being worked on and need to be addressed in the main `ember-power-select` repo
The `__no-options-selected` element is now generated using the `Hds::Text::Body` component
For the style overrides where we instantiate `<PowerSelect>`
Co-authored-by: Majed Elass <[email protected]> Co-authored-by: Melanie Sumner <[email protected]> Co-authored-by: Jory Tindall <[email protected]> Co-authored-by: Alex <[email protected]> Co-authored-by: Majed <[email protected]> Co-authored-by: Cristiano Rastelli <[email protected]>
@KristinLBradley @didoo It turns out that the |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
π Summary
If merged, this PR will add SuperSelect components to HDS.
SuperSelect
web docs (HDS-3222)Β #2026π οΈ Detailed description
API differences from PowerSelect:
@renderInPlace
is alwaysfalse
(setting it to true makes the instances non-compliant and impossible to style via overrides)Multiple
variants@closeOnSelect
is alwaysfalse
allowing users to choose multiple options without requiring them to re-open the dropdown.@searchPlaceholder
is 'Search' by defaultForm components
The following components will be available to our consumers:
Hds::Form::SuperSelect::Single::Base
Hds::Form::SuperSelect::Single::Field
Hds::Form::SuperSelect::Multiple::Base
Hds::Form::SuperSelect::Multiple::Field
The instantiation of
SuperSelect::[Single|Multiple]::Base
components is similar to thePowerSelect
.However, instantiating
SuperSelect::[Single|Multiple]::Field
components is slightly different because theHds::Form::Field
component exposes several subcomponents (Label, HelperText, Error).Note: Because the SuperSelect component doesn't use an HTML
<input>
element, the link between the label and the control is done viaariaLabelledBy
meaning small updates were required forForm::Field
andForm::Label
components.List positioning
There are two arguments related to positioning in
PowerSelect
:@verticalPosition
(unspecified/auto,below
,above
)@horizontalPosition
(left
,center
,right
)We tried to preserve PowerSelect's behavior for positioning as much as possible. Unfortunately, auto-positioning is only possible if the
@renderInPlace
isfalse
(where the dropdown is placed at the root of the document, which is not a compliant option). For this reason, if no@verticalPosition
is explicitly defined we rely on Floating UI viahds-anchored-position
to automatically determine the positioning of the list.List width
There are two arguments in
SuperSelect
:matchTriggerWidth
(defaulttrue
, similar toPowerSelect
)dropdownMaxWidth
(can be used to constrain the dropdown whenmatchTriggerWidth
isfalse
)After options
Aside from PowerSelect's
@afterOptionsComponent
we added:@afterOptionsContent
(a way to provide custom content in the 'after options' section without requiring a component to be passed in)@showAfterOptions
(determines whether to display or not the 'after options' section)false
inSingle
variantstrue
inMulti
variantsπ External links
π Component checklist
π¬ Please consider using conventional comments when reviewing this PR.