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

refactor(ui5-shellbar): introducing assistant slot #8963

Merged
merged 21 commits into from
May 21, 2024

Conversation

plamenivanov91
Copy link
Contributor

Т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:

  1. The showCoPilot property of the ui5-shellbar is removed.

If you have previously used the showCoPilot property:

<ui5-shellbar show-co-pilot></ui5-shellbar>

it will no longer work for the component.

  1. The CoPilotAnimation feature of the ui5-shellbar is 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.

  1. The copilotDomRef getter of the ui5-shellbar is removed.

If you have previously used the copilotDomRef public getter:

shellbar.copilotDomRef

it will no longer work for the component.

  1. The co-pilot-click event of the ui5-shellbar is removed.
    If you have previously used the co-pilot-click public 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

Copy link
Contributor

@nnaydenow nnaydenow left a comment

Choose a reason for hiding this comment

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

Remove all the generated css files from:

packages/fiori/test/pages/resources/css/
packages/main/test/pages/resources/css/

packages/fiori/src/i18n/messagebundle.properties Outdated Show resolved Hide resolved
@plamenivanov91 plamenivanov91 merged commit 2a8c252 into SAP:main May 21, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants