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

feat: preview 2.0 #2159

Closed
wants to merge 44 commits into from
Closed

feat: preview 2.0 #2159

wants to merge 44 commits into from

Conversation

schreckstefan
Copy link
Contributor

@schreckstefan schreckstefan commented Jul 12, 2024

Issue: #1679

Allows two options for the target sandbox, depending on the UI5 major version the one or other gets chosen.
This bootstrapPath gets defaulted now from the manifest.json., at the templating point in time.
In cases where this does not fit at the client side, e.g. in case of run configs having a different version, the proxy error gets caught and we try to load the different resource.

Besides, the sandbox2.js obviously does not have a function createRenderer, but only createRendererInternal.

For testing (with https://github.tools.sap/ux/open-ux-tools-playground), I had to set the right target url https://sapui5untested2.int.sap.eu2.hana.ondemand.com
a) at the yaml file of the test app:

b) ui5-proxy-middleware did not react on similar settings, I had to set the corresponding env variable for it:

export FIORI_TOOLS_UI5_URI=https://sapui5untested2.int.sap.eu2.hana.ondemand.com

The PR also replaces sap.ui.version, which gets invalid with UI5 2.0, by await VersionInfo.load()

Copy link

changeset-bot bot commented Jul 12, 2024

🦋 Changeset detected

Latest commit: 48c6313

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@sap-ux-private/preview-middleware-client Patch
@sap-ux/preview-middleware Patch
@sap-ux/create Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

github-actions bot and others added 24 commits July 12, 2024 15:31
* feat(environment-check): update order, destinations in dropdown

* feat(environment-check): snapshots

* feat(environment-check): changeset

* feat(environment-check): refactor md table
* fix: generate correct ui5.yaml for adp

* test: fix tests

* refactor: extract afterMiddleware from FioriToolsProxyConfig

* chore: update README

* chore: update changeset

---------

Co-authored-by: Tobias Queck <[email protected]>
* fix: log specification version instead dist-tag

* test: log specification version instead dist-tag

* chore: changeset

* fix: windows path for `@sap/ux-specification`

* fix: adjust `moduleName`

---------

Co-authored-by: Klaus Keller <[email protected]>
….yaml custom configuration (#2152)

* fix: remove safe mode

* refactor: change order of blocks in ui5.yaml

* test: update snapshots

* chore: add cset
* fix qunit.js template to avoid potential racing condition

* add changeset

* adjust test snap

* fix wrong dependency in shim

* refactoring

* update test snap

---------

Co-authored-by: Tobias Queck <[email protected]>
Copy link

@schreckstefan schreckstefan marked this pull request as ready for review July 23, 2024 15:09
@schreckstefan schreckstefan requested a review from a team as a code owner July 23, 2024 15:09
proxyRes.headers['Etag'] = etag;
proxyRes.headers['cache-control'] = 'no-cache';
if (proxyRes.statusCode === 404 && req.path.includes('/resources/sap/ushell/bootstrap/sandbox2.js')) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if this is relevant here but please ensure that this also works when preview middleware is used with karma (uses connect API instead of express). See karma-ui5 documentation (and #1968 and #1826)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@heimwege
Hello Dominik, it does not look like this coding enhancement contradicts to the statements and PR's concerning karma, but if you can test it it would be helpful. Or let me do about the right test environment that I can use.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure, I'll drop you a mail as the repo is internal

@schreckstefan schreckstefan marked this pull request as draft July 25, 2024 09:35
@schreckstefan
Copy link
Contributor Author

Work in progress: dynamic loading of sap/ushell/bootstrap/sandbox now works, but the ushell container does not get initialized, an then runs into an exception
image

@schreckstefan
Copy link
Contributor Author

After discussion with the UI5 experts, this branch is discontinued, and replaced by #2192

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.

7 participants