Skip to content
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

feat(ui5-combobox/multi-combobox): physical items #10051

Merged
merged 15 commits into from
Nov 7, 2024
Merged

Conversation

MapTo0
Copy link
Member

@MapTo0 MapTo0 commented Oct 18, 2024

Passed items to the ui5-combobox and ui5-multi-combobox are now physically slotted to the internal list of the picker.

@MapTo0
Copy link
Member Author

MapTo0 commented Oct 18, 2024

@dobrinyonkov I have some changes in the list if something is not clear please contact me.

Basically, Since the combobox and the multicombobox are filtering their items internally, I need to render inidividual slots just for filtered items. That breaks the Item Navigation in the list and I had to enhance it

@vladitasev

packages/main/src/ComboBoxItem.ts Outdated Show resolved Hide resolved
packages/main/test/specs/ComboBox.mobile.spec.js Outdated Show resolved Hide resolved
Copy link
Contributor

@elenastoyanovaa elenastoyanovaa left a comment

Choose a reason for hiding this comment

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

combobox:

  • go to Items with grouping
  • press A and navigate through items
  • the input field will eventually have a value Zimbabve which is not present in the list
  • it seems that this item is part of the second visible group, but should not be part of the filtered items and should not be selected on navigation as it is filtered out

Copy link
Contributor

@elenastoyanovaa elenastoyanovaa left a comment

Choose a reason for hiding this comment

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

combobox:

  • go to Lazy Loading - example does not work on IE11
  • type P
  • delete the typeahead in order to show the rest of the list
  • press arrow down to navigate through the list - everything breaks. the same works on main

Copy link
Contributor

@elenastoyanovaa elenastoyanovaa left a comment

Choose a reason for hiding this comment

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

combobox

  • ComboBox - suggestions and show wrapping is broken

Copy link
Contributor

@elenastoyanovaa elenastoyanovaa left a comment

Choose a reason for hiding this comment

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

multicombobox:

  1. the mcb item checkbox should have an accessible name. Check in UI5 and in the main of ui5 web components for the label and add it as an accessible name to the checkbox. It should be translatable as well.
Screenshot 2024-10-25 at 9 26 04
  1. Go to "Select all with groups". Press A to filter. Press the Select All - the items won't be selected. This works in main.

  2. MultiComboBox with N-More and show wrapping - wrapping is broken

@MapTo0 MapTo0 closed this Oct 29, 2024
@MapTo0 MapTo0 reopened this Oct 29, 2024
@elenastoyanovaa
Copy link
Contributor

elenastoyanovaa commented Oct 30, 2024

combobox:

  • go to Items with grouping
  • press A and navigate through items
  • the input field will eventually have a value Zimbabve which is not present in the list
  • it seems that this item is part of the second visible group, but should not be part of the filtered items and should not be selected on navigation as it is filtered out

As this is reproducible in main as well we will ignore this comment.

@MapTo0
Copy link
Member Author

MapTo0 commented Oct 30, 2024

@nnaydenow please carefully check the cypress use case.

We have MultiComboBox Items now physical. They are slotted, this means mcbElement.items always returns full list of the items, but just some of them are forwarded to the list. for the forwarded we add slot. How we should select such items in the test?

Copy link
Contributor

@elenastoyanovaa elenastoyanovaa left a comment

Choose a reason for hiding this comment

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

tests still fail

@@ -1,7 +1,7 @@
{{>include "./ComboBoxItem.hbs"}}

{{#*inline "listItemContent"}}
<ui5-checkbox ?checked="{{selected}}" tabindex="invalid" accessible-name="{{_accessibleName}}"></ui5-checkbox>
<ui5-checkbox ?disabled="{{_readonly}}" ?checked="{{selected}}" tabindex="invalid" accessible-name="{{_accessibleName}}"></ui5-checkbox>
Copy link
Contributor

Choose a reason for hiding this comment

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

what is the purpose of this? readonly MCB has no possibility to open the picker

Copy link
Member Author

Choose a reason for hiding this comment

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

image

n more

@@ -138,7 +138,7 @@
{{#*inline "selectAllWrapper"}}
{{#if showSelectAll}}
<div class="ui5-mcb-select-all-header" @keydown="{{_onListHeaderKeydown}}" tabindex="0">
<ui5-checkbox ?checked={{_allSelected}} class="ui5-mcb-select-all-checkbox" text="{{selectAllCheckboxLabel}}" @ui5-change="{{_handleSelectAllCheckboxClick}}"></ui5-checkbox>
<ui5-checkbox ?disabled={{this.readonly}} ?checked={{_allSelected}} class="ui5-mcb-select-all-checkbox" text="{{selectAllCheckboxLabel}}" @ui5-change="{{_handleSelectAllCheckboxClick}}"></ui5-checkbox>
Copy link
Contributor

Choose a reason for hiding this comment

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

same

}

:host([readonly]) ::slotted([ui5-mcb-item]) {
Copy link
Contributor

Choose a reason for hiding this comment

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

should not be a valid case

Copy link
Member Author

Choose a reason for hiding this comment

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

mobile

Copy link
Member Author

Choose a reason for hiding this comment

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

image

@MapTo0 MapTo0 merged commit 73f82ab into main Nov 7, 2024
10 checks passed
@MapTo0 MapTo0 deleted the cb-items-refactoring branch November 7, 2024 21:49
@ui5-webcomponents-bot
Copy link
Collaborator

🎉 This PR is included in version v2.5.0-rc.0 🎉

The release is available on v2.5.0-rc.0

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants