Skip to content

Conversation

@Singham-24
Copy link

@Singham-24 Singham-24 commented Oct 10, 2025

This update adds support for launching the Card Generation Dialog in CAP-based Fiori applications, aligning it with existing functionality available for RAP-based apps. CAP apps can now generate, save, and share cards using the same flow.

Summary of Changes :-

Enabled card generation trigger for CAP-based projects

Reused existing logic for dialog handling

Ensured consistent behavior across RAP and CAP apps

@changeset-bot
Copy link

changeset-bot bot commented Oct 10, 2025

🦋 Changeset detected

Latest commit: 10b5997

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

This PR includes changesets to release 2 packages
Name Type
@sap-ux/preview-middleware Major
@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

@cla-assistant
Copy link

cla-assistant bot commented Oct 10, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@Singham-24 Singham-24 marked this pull request as ready for review October 10, 2025 11:58
@Singham-24 Singham-24 requested a review from a team as a code owner October 10, 2025 11:58
@heimwege
Copy link
Contributor

@Singham-24 please don't use internal URLs in an external PR.
FYI I deleted the URL, you might want to rephrase the description.

@heimwege heimwege added the preview-middleware @sap-ux/preview-middleware label Oct 10, 2025
Copy link
Contributor

@heimwege heimwege left a comment

Choose a reason for hiding this comment

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

See comments.
Bonus question: how is CAP supported? I just see the edmx check is being removed but how can I deploy my card in the CAP scenario? Do all FLPs (Portal service, Launchpad Service, Workzone, etc.) support this?

const webappPath = await getWebappPath(path.resolve(), this.fs);
const i18nPath = this.manifest['sap.app'].i18n as string;
const filePath = i18nPath ? join(webappPath, i18nPath) : join(webappPath, 'i18n', 'i18n.properties');
const i18nConfig = this.manifest['sap.app'].i18n;
Copy link
Contributor

Choose a reason for hiding this comment

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

General question: What does the i18n adjustments have to do with card generation for CAP based apps?

Copy link
Author

Choose a reason for hiding this comment

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

Earlier, the implementation only handled the default i18n.properties file and did not account for scenarios where the manifest defined i18n configurations using a bundleUrl.

Copy link
Contributor

Choose a reason for hiding this comment

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

I understand that. My question was rather what the i18n adjustment has to do with general cards support for CAP apps. According to this PR because of the missing object support for the i18n property, CAP apps have not been supported. But that's not true. Card generation fro CAP apps has been disabled in #3349 because you cannot deploy the generated cards / the generated cards will be ignored by the FLP. That only works for ABAP based FLPs. So basically my questions are:

  1. Did you verify that the non-ABAP FLP(s) now also support cards? If not, why delete the restriction in this PR?
  2. Why is this i18n change related to CAP at all? The type of the i18n property has been string | object all the time. That's nothing CAP specific. So that part rather looks like a bugfix to me.

@sonarqubecloud
Copy link

app.use(flp.router);

server = supertest(app);
return { flp, app };
Copy link
Contributor

Choose a reason for hiding this comment

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

The return parameters seem to be not use anywhere. Can this be deleted?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview-middleware @sap-ux/preview-middleware

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants