Open korotkovao opened 1 month ago
@korotkovao. I looked at your PR #2134 again and the implementation feels wrong - not incorrect but just not the way it should be. So, I thought about it a little longer and realized what caused the feeling: the name is wrong. While the notes library is an SAP S/4 reuse library, from an application writer perspective, that term is meaningless.
These libs are actually customLibs
i.e. libs that the app needs that are not part of the UI5 distribution. We don’t know anything about custom libs except their id e.g. we don’t know how and when to load them, therefore, the customLibs
should never be part of the ui5Libs array and should never be added to the flpSandbox
-preload or to any ui5*.yaml
.
So, I’ recommend to simplify the implementation in #2134:
ui5ReuseLibs
to customLibs
or customUi5Libs
ui5ReuseLibs
manifest.json
template at https://github.com/SAP/open-ux-tools/blob/main/packages/ui5-application-writer/templates/core/webapp/manifest.json#L39-L42 to something like:
"libs": {<% ui5.ui5Libs.concat(ui5.customLibs ?? []).forEach((ui5Lib, idx, libs) => { %>
<%- `"${ui5Lib}": {}${idx+1 < libs.length ? ',' : ''}` %><% }); %>
}
Related Feature
1924
Description
The library is only available in an abap backend, but if you use ui5-local you run everything offline. So, it can never find the lib. You cannot add
- name: sap.nw.core.gbt.notes.lib.reuse
to theui5-local
yaml. If you remove it, then your app should start and run without the reuse component being loaded. You would still see in the browser log a 404 when trying to load it but FEv4 should handle itSteps to Reproduce
Steps to reproduce the behavior:
Expected results
No failures during the previews.
Actual results
Previews with
start
,start-mock
andstart-variants-management
are good, but previews withnpm run start-local
,npm run int-test
and npm run start-noflp
failScreenshots
If applicable, add screenshots to help explain the problem.
Version/Components/Environment
Add any other context about the problem here OS:
Root Cause Analysis
Problem
{describe the problem}
Fix
{describe the fix}
Why was it missed
{Some explanation why this issue might have been missed during normal development/testing cycle}
How can we avoid this
{if we don’t want to see this type of issues anymore what we should do to prevent}