SAP / ui5-webcomponents

UI5 Web Components - the enterprise-flavored sugar on top of native APIs! Build SAP Fiori user interfaces with the technology of your choice.
https://sap.github.io/ui5-webcomponents/
Apache License 2.0
1.5k stars 260 forks source link

"busy" and "__isBusy" handling #5236

Open vladitasev opened 2 years ago

vladitasev commented 2 years ago

We have the OpenUI5Enablement feature that adds an __isBusy property + the necessary code for it. Although this is only used in the OpenUI5 context now (but could become a core web components feature in the future), the code itself is maintained here in this repo.

There are currently 2 issues:

The first could be solved either in UI5 Web Components (OpenUI5Elablement for example not only adds __isBusy to the metadata, but also removes busy for the components that have such a property), or in OpenUI5 (WebComponent.js never sets it to the web components instance). To be determined which would be best.

The second issue is trickier. All component wrappers are controls (even for the components that are logical elements such as options, items, etc.). One way to do it would be to create WebComponent.js and WebComponentElement.js classes in OpenUI5 and only set busy support for the first ones. But this way wizard steps would not have busy support at all. The other way would be to manually enable it for some elements (such as wizard steps). For this to work, the parent component (ui5-wizard) would need to monitor the __isBusy property of its children and act upon it - f.e. set busy state to some of its own shadow root as the wizard is the one to display the steps. This would mean that UI5 Web Components code starts working with, and understanding the __isBusy property.

ilhan007 commented 2 years ago

The first issue is fixed with https://github.com/SAP/ui5-webcomponents/pull/5251 "Some components have a busy property already, and when both busy and __isBusy are set (f.e. the OpenUI5 ui5-table wrapper has setBusy(true) ) users see 2 busy indicators"

The second issue remains