-
Notifications
You must be signed in to change notification settings - Fork 272
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
refactor(ui5-input): suggestions refactoring #9092
Conversation
- grouping adoption to the new API - suggestions are now slotted directly
the first non-group header item in the list should be focused when the list is opened
fix samples and tests
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.
Input suggestions with grouping sample:
- Type "a" in input then delete it with backspace => items disappear.
Custom Suggestions sample:
- Popover does not get scrolled when you navigate through items with keyboard.
Input with disabled autocomplete (type-ahead) and Input with disabled autocomplete and preventable suggestion select:
- Popover is being empty when you type something.
Input with open suggestions on focusin sample:
- There are a lot of differences from the main branch related to the behaviour of the suggestions, please have a look.
Input - showing wrapping sample :
Input with valueState and Dynamic suggestions sample:
- Open the popover so that it has a scroll and navigate through the items with ArrowDown => Popover is not being scrolled properly.
- When you focus the ValueStateMessage and spam ArrowUp, focus goes back and forth from the VSM to the Input, which is not expected.
This is like thhat even in the main branch, I would suggest we fix it with another change since this is a minor issue. Lets focus on the implementation. Rest comments are done |
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.
There are no tests for inputs with custom suggestion items, please write some.
} | ||
|
||
:host([ui5-suggestion-item]) .ui5-li-content { | ||
padding-bottom: .875rem; |
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.
don't we have a parameter about this?
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.
It behaves the same as in the main branch. I noticed that there is no difference between compact and cozy styles which looks strange to me. IMHO this is an existing bug and we should fix it with another change following latest specs of the list.
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.
Navigating through the custom items an incorrect speech announcement constructed and will be presented to the SR user
please see selectionText
. We should either:
- try to construct an announcement for custom items
- remove the announcement if custom items are present, but provide a sample how can an application achieve an announcement on navigating (InvisibleMessaging)
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.
- With your change, non of the sample in the test suite actually filter something - they seem to work to filter a group, but not the items themselves (check the first and second sample). Please adjust at least one sample in order to have working examples with filtering.
- The SuggestionItemCustom is not present in the playground. Can you please check why?
- There is no sample of input with custom suggestions in the playground. Please provide one.
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.
* **Note:** The
and
are recommended to be used as suggestion items.
Line 517, Input.ts - not only those items, but the custom items as well.
Check the documentation of the slot for other inconsistencies. For example check the part for the InputSuggestions feature in this section.
2. Not a single test for the input with custom suggestion items - at least the general scenarios should be covered - event firing, typeahead, mobile test.
3. Add the main breaking change topic as Related to (the issue for the breaking changes)
4. Add at least a test sample for the multiinput as well. Good to have: tests for custom suggestion items
BREAKING CHANGE: remove
type
,description
,icon
,iconEnd
,image
fromui5-suggestion-item
and introduceui5-suggestion-item-custom
ui5-suggestion-item
:type
property is removed, useui5-suggestion-item-custom
instead.description
property is removed, useui5-suggestion-item-custom
instead.icon
property is removed, useui5-suggestion-item-custom
instead.iconEnd
property is removed, useui5-suggestion-item-custom
instead.image
property is removed, useui5-suggestion-item-custom
instead.ui5-suggestion-group-item
:ui5-suggestion-item-group
text
is removed, useheaderText
insteadui5-suggestion-item-custom
:ui5-li-custom
@ui5/webcomponents-base/dist/util/generateHighlightedMarkup.js
All suggestion items are now physical items and can be overstyled.
Grouping now works with via nesting: e.g.
Related to #8461, #7890