-
Notifications
You must be signed in to change notification settings - Fork 50
[WC-3015] Improve dropdown filter #1732
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
base: main
Are you sure you want to change the base?
Conversation
packages/shared/widget-plugin-dropdown-filter/src/controls/select/Select.tsx
Show resolved
Hide resolved
5ceb469
to
0cd24af
Compare
4b3d234
to
d92da8a
Compare
<button className={cls.toggle} {...getToggleButtonProps({ "aria-label": "Show options" })}> | ||
<Arrow className={cls.stateIcon} /> | ||
</button> | ||
<OptionsWrapper | ||
cls={cls} | ||
label={inputLabel} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we set the input label on the Options menu? This seems very counterintuitive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the logic behind downshiftjs, it was putting aria-labeledby
on menu as well. And because we didn't render label it was a dangling property, pointing to a non-existing element by id. So I replaced it with explicit aria-label, which should have the same effect downshiftjs intended to have. Check this line to see how snapshot changed.
Other option is to explicitly unset this aria-labeledby
that is coming from getMenuProps
, so it won't have a label, but I thought that downshiftjs has a good reason to label menu as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, since we're using it here without the label provided by downshift I would also say this makes more sense. We could also consider having the label from downshift there but invisible? But to me this aria-label approach makes more sense. Let me know what you think @iobuhov
packages/pluggableWidgets/datagrid-dropdown-filter-web/src/DatagridDropdownFilter.xml
Show resolved
Hide resolved
packages/shared/widget-plugin-dropdown-filter/src/controls/combobox/Combobox.tsx
Outdated
Show resolved
Hide resolved
separator line margin between tags
also use clear button again
this is how combobox works
…button up the html tree - makes it easier to open the popup, previously it was not opening if clicked inside, but next to the border. - fixes issue with nested button tags.
- introduce new options to configure placeholder text and empty caption - show placeholder when widget is not open and empty - split emptySelectionCaption and emptyOptionCaption
d92da8a
to
7b63b01
Compare
Pull request type
Bug fix (non-breaking change which fixes an issue)
New feature (non-breaking change which adds functionality)
Breaking change (fix or feature that would cause existing functionality to change)
Description
Various improvements for dropdown widget.
Breaking change
The input text are now changed and it will affect users, they have to revisit and configure text to their needs.