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: add hosted app actions for sap [EXT-5612] #8603

Merged
merged 2 commits into from
Aug 16, 2024

Conversation

whitelisab
Copy link
Contributor

Purpose

We will use hosted app actions to make api calls with the AIR header for the SAP AIR app. This PR introduces a lot of the boilerplate around hosted app actions.

Approach

Updated the SAP app to follow the project structure and boilerplate used in the MS Teams and Vercel apps. See this PR as an example for Vercel: #6769

Specifically, here is a summary of the changes:

  • Move all frontend app code into a new frontend directory
    • Update the vite.config to support parent project build outDir location
  • Introduce a new app-actions directory
  • Set up top level project to handle the double deploy and build for both apps (public marketplace and private AIR header)
    • Add manifest file for the new actions
    • Add build actions and call actions scripts

Testing steps

I confirmed that I could successfully build the frontend and actions and deployed to both staging apps. Confirmed that the app config page and field locations are rendering for both staging apps. I am not able to see products in the Dialog, but that's also a problem I am seeing on our feature branch.

Screenshot 2024-08-16 at 12 38 10 PM

Breaking Changes

Dependencies and/or References

Deployment

@whitelisab whitelisab requested a review from a team as a code owner August 16, 2024 18:39
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added this test handler and .spec file for it to just have a test that is passing in this folder. We can remove this down the road.


return {
status: 'Success',
// @ts-ignore
Copy link
Contributor Author

Choose a reason for hiding this comment

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

You'll see this in a few places in these app actions. I just opted to ignore ts errors for now since these will need to be refactored to work anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changes in this file: I renamed the frontend app and removed all of the deploy scripts; those are now in the top level package.json

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is something we've used in other apps and it's useful for testing app actions

@whitelisab whitelisab merged commit bcec6e5 into feat/sap-app-refactor-ext5483 Aug 16, 2024
9 checks passed
@whitelisab whitelisab deleted the feat/add-haa-for-sap-air branch August 16, 2024 20:06
mgoudy91 pushed a commit that referenced this pull request Aug 26, 2024
* feat: reorganize app to introduce haa

* chore: add more template files to app actions and remove deploy scripts from frontend
mgoudy91 pushed a commit that referenced this pull request Aug 26, 2024
* feat: reorganize app to introduce haa

* chore: add more template files to app actions and remove deploy scripts from frontend
mgoudy91 pushed a commit that referenced this pull request Aug 27, 2024
* feat: reorganize app to introduce haa

* chore: add more template files to app actions and remove deploy scripts from frontend
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.

3 participants