refactor(ui5-shellbar): introducing assistant slot
Тhe showCoPilot property and the co-pilot-click event of the ui5-shellbar have been removed.
In their place we now have a public slot called assistant. We recommend using ui5-toggle-button with sap-icon://da and sap-icon://da-2 icons (see the examples below).
BREAKING CHANGE:
- The
showCoPilotproperty of theui5-shellbaris removed.
If you have previously used the showCoPilot property:
<ui5-shellbar show-co-pilot></ui5-shellbar>
it will no longer work for the component.
- The
CoPilotAnimationfeature of theui5-shellbaris removed.
If you have previously used the CoPilotAnimation feature:
import CoPilotAnimation from "@ui5/webcomponents-fiori/dist/features/CoPilotAnimation.js"
it will no longer work for the component.
- The
copilotDomRefgetter of theui5-shellbaris removed.
If you have previously used the copilotDomRef public getter:
shellbar.copilotDomRef
it will no longer work for the component.
- The
co-pilot-clickevent of theui5-shellbaris removed. If you have previously used theco-pilot-clickpublic event:
shellbar.addEventListener("ui5-co-pilot-click", function(event) {
...
});
it will no longer work for the component.
You can achieve similar functionality with the new slot:
HTML:
<ui5-shellbar>
<ui5-toggle-button id="assistant" icon="sap-icon://da" slot="assistant"></ui5-toggle-button>
</ui5-shellbar>
JavaScript:
assistant.addEventListener("click", function (event) {
const toggleButton = event.target;
toggleButton.icon = toggleButton.pressed ? "sap-icon://da-2" : "sap-icon://da";
});
Related to #8461, #7887
Please add instructions in the BREAKING CHANGES section how users can achieve the old behavior or similar.
@IlianaB When I reviewed this change I noticed a test not failing although the used selector for the new test does not match anything on the page. Then I discovered these setTimeout and that tests may fail within them without causing an error because somehow the setTimeout interferes with the lifecycle of the test (probably is not awaited for).
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.
:white_check_mark: plamenivanov91
:white_check_mark: PetyaMarkovaBogdanova
:x: Nayden Naydenov
Nayden Naydenov seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.
:white_check_mark: plamenivanov91
:x: PetyaMarkovaBogdanova
You have signed the CLA already but the status is still pending? Let us recheck it.
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.
:white_check_mark: plamenivanov91
:white_check_mark: PetyaMarkovaBogdanova
:x: Nayden Naydenov
Nayden Naydenov seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.
:white_check_mark: PetyaMarkovaBogdanova
:white_check_mark: plamenivanov91
:x: Nayden Naydenov
Nayden Naydenov seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.
Superseded by https://github.com/SAP/ui5-webcomponents/pull/8963