Open deborsa opened 4 years ago
The fioriSandboxConfig.json
is not included by design. In general we don't include the test-resources/
folder into the npm packages which will be used when using the UI5 Tooling, because most of the content is not required for consumers and some libraries come with a huge set of test-resources.
For sap.ushell (and also sap.ui.core) this is a bit different. There are some files which are required for development / testing, so we've picked the relevant ones to also be included into the npm package.
The fioriSandboxConfig.json
references a lot of sample / demo applications which are all not packaged with the npm delivery. Therefore we didn't see a reason to include it.
Could you please give a bit context about your application scenario so that I can better understand your use case? We've check several applications and templates to ensure that all common scenarios are supported.
My app triggers a cross application navigation to another app. The target app is configurable by the user in a productive environment. It is not part of my development. Therefore when testing the scenario in sandbox mode I add sap.ushell.demo.AppNavSample as the target for the intent in question. This app will just show all the passed parameter so I can verify that the navigation works fine. I can then also navigate back to my own app and verify that all scenarios work fine.
We discussed this in our team and think it's reasonable to include the fioriSandboxConfig.json
as well as the AppNavSample app (~150 KB) in the existing sap.ushell package.
However, we have to check with the development team responsible for sap.ushell. Ultimately it should be their decision.
@deborsa besides sap.ushell.demo.AppNavSample, are you missing any other apps from the default sandbox configuration?
For my current development the AppNavSample would be sufficient. I don't have requirements for any of the other sandbox apps.
Thanks. One more question: Do you actually require the fioriSandboxConfig.json
as provided by sap.ushell?
I'm asking because if we include it without adding all the other demo apps referenced by it, developers might be even more confused. I guess with the AppNavSample resources you could come up with your own, project specific, sandbox config and work with that?
I do not necessarily need the fioriSandboxConfig.json. I could also create my own sandbox config and include this navigation app. In my opinion it is not very nice though to always get a 404 with the default configuration because unfortunately the sandbox code has this config file hard coded.
Also I still think it would be better to be aligned with what the CDN delivers. In my opinion this should still be the same as what is available for the UI5 serve. I understand those other example apps are not really needed anyhow but then why even bother to serve them from the CDN? Maybe they could get removed alltogether also from the CDN version?
Or they should really be moved into a separate folder/package and then can clearly document this is an add-on not available for UI5 serve but then there should also be no hard references from the sandbox that is part of the UI5 serve packages. Just my opinion to keep the design clean, aligned and well documented.
Thank you for your input. I think I get your point. However, we can't easily remove resources from the CDN since developers might rely on their availability.
What we can do, and actually did in this case, is to leave them out from new delivery channels like npm and wait for feedback like this.
From my (limited) understanding, the responsible team plans to rework the sandbox and related demo apps in the long term.
You are right, I think we should check on the default behavior of sandbox.js
always requesting fioriSandboxConfig.json
. Thinking about this, maybe it makes more sense to replace fioriSandboxConfig.json
with an npm-specific version during publishing.
Expected Behavior
After setting up SAPUI5 version 1.81.0 and running UI5 serve I should be able to serve the same files belonging to SAPUI5 as the content delivery server for all declared libraries so meaning http://localhost:8080/test-resources/... should bring the same results as https://sapui5.hana.ondemand.com/1.81.0/test-resources/...
Current Behavior
http://localhost:8080/test-resources/sap/ushell/shells/sandbox/fioriSandboxConfig.json brings a 404: Cannot GET /test-resources/sap/ushell/shells/sandbox/fioriSandboxConfig.json whereby https://sapui5.hana.ondemand.com/1.81.0/test-resources/sap/ushell/shells/sandbox/fioriSandboxConfig.json brings the correct file.
As a result I cannot run my App in sandbox mode because it relies on the default sandbox configuration which cannot be loaded. The sandbox itself under http://localhost:8080/test-resources/sap/ushell/bootstrap/sandbox.js and other SAPUI5 files are loaded fine so it seems my general setup is working.
Steps to reproduce the issue
Context
ui5 --version
when using the CLI):2.4.1
v11.11.0
6.7.0
Windows 10 1909 x64
Chrome 84
Affected components (if known)
Log Output / Stack Trace
The following stack trace when trying to open my app in sandbox mode in browser: