-
Notifications
You must be signed in to change notification settings - Fork 14
CEXT-6406: add menu/custom-menu v2 sample #63
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
4031ca9
CEXT-6406: move menu/custom-menu into v1/ directory
obarcelonap 7bf403a
CEXT-6406: add menu/custom-menu v2 sample
obarcelonap 13120de
Merge remote-tracking branch 'origin/feature/admin-ui-sdk-v2-samples'…
obarcelonap 05f94e9
CEXT-6406: fix web-src build config missing for pre-existing entrypoint
obarcelonap 21e18f2
Remove empty package
obarcelonap File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| # package directories | ||
| node_modules | ||
|
|
||
| # build | ||
| build | ||
| dist | ||
| .manifest-dist.yml | ||
|
|
||
| # Config | ||
| config.json | ||
| .env* | ||
| !.env.dist | ||
| .aio | ||
|
|
||
| # Adobe I/O console config | ||
| console.json | ||
|
|
||
| .idea | ||
| .aws.tmp.creds.json | ||
| .parcel-cache | ||
| .DS_Store | ||
| .vscode |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| # Custom Menu — Admin UI SDK V2 | ||
|
|
||
| Adds a custom menu item to the Adobe Commerce Admin panel that opens a page inside your App Builder application. | ||
|
|
||
| ## What you get | ||
|
|
||
| A menu entry, **First App on App Builder**, that opens a custom page in the Commerce Admin. The page displays a welcome message along with the Adobe IMS Org ID of the signed-in admin user, demonstrating how IMS context is made available to your app. | ||
|
|
||
| The menu definition lives in `app.commerce.config.ts`. The page component lives in `src/commerce-backend-ui-2/web-src/src/pages/main-page.tsx`. | ||
|
|
||
| ## How it works | ||
|
|
||
| 1. Merchant opens the Commerce Admin and selects **First App on App Builder** from the menu | ||
| 2. Commerce Admin loads your App Builder web app inside an iframe | ||
| 3. The app resolves the IMS context via the Admin UI SDK and renders the welcome page with the signed-in admin's IMS Org ID | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - [Node.js](https://nodejs.org/) >= 24 | ||
| - [Adobe I/O CLI](https://developer.adobe.com/runtime/docs/guides/tools/cli_install/) (`npm install -g @adobe/aio-cli`) | ||
| - An App Builder project on [Adobe Developer Console](https://developer.adobe.com/console/) with a workspace configured for your Commerce instance | ||
| - Adobe Commerce >= 2.4.7 with the [Admin UI SDK module](https://developer.adobe.com/commerce/extensibility/admin-ui-sdk/) installed and enabled | ||
|
|
||
| ## Setup | ||
|
|
||
| **1. Install dependencies** | ||
|
|
||
| ```bash | ||
| npm install | ||
| ``` | ||
|
|
||
| **2. Connect to your App Builder workspace** | ||
|
|
||
| ```bash | ||
| aio console org select | ||
| aio console project select | ||
| aio console workspace select | ||
| aio app use -g --no-input --overwrite | ||
| ``` | ||
|
|
||
| **3. Deploy** | ||
|
|
||
| ```bash | ||
| aio app deploy | ||
| ``` | ||
|
|
||
| **4. Associate and install on Commerce** | ||
|
|
||
| Associate and install the app with your Commerce instance through the App Management UI in the Commerce Admin. See [App Management](https://developer.adobe.com/commerce/extensibility/app-management/) for the full walkthrough. | ||
|
|
||
| To verify the installation, navigate to **Stores → Configuration → Adobe Services → Admin UI SDK → Configure Extensions** and check the **Installed Extensions** tab — the app should appear there once successfully installed. | ||
|
|
||
| ## More information | ||
|
|
||
| - [Admin UI SDK — Custom Menu](https://developer.adobe.com/commerce/extensibility/admin-ui-sdk/extension-points/menu/) | ||
| - [App Management](https://developer.adobe.com/commerce/extensibility/app-management/) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| /* | ||
| * Copyright 2026 Adobe. All rights reserved. | ||
| * This file is licensed to you under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. You may obtain a copy | ||
| * of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software distributed under | ||
| * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS | ||
| * OF ANY KIND, either express or implied. See the License for the specific language | ||
| * governing permissions and limitations under the License. | ||
| */ | ||
|
|
||
| import { defineConfig } from '@adobe/aio-commerce-lib-app/config' | ||
|
|
||
| export default defineConfig({ | ||
| metadata: { | ||
| id: "custommenu", | ||
| displayName: "Adobe Commerce custom menu", | ||
| version: "1.0.0", | ||
| description: "Adobe Commerce custom menu example in admin panel", | ||
| }, | ||
| adminUi: { | ||
| menu: { | ||
| id: "CustomMenu::first", | ||
| label: "First App on App Builder", | ||
| pageTitle: "Adobe Commerce First App on App Builder", | ||
| description: "First App on App Builder", | ||
| }, | ||
| }, | ||
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| extensions: | ||
| # This extension is required for Admin UI. Do not remove. | ||
| commerce/backend-ui/2: | ||
| $include: src/commerce-backend-ui-2/ext.config.yaml | ||
|
|
||
| # This extension is required for app management. Do not remove. | ||
| commerce/extensibility/1: | ||
| $include: src/commerce-extensibility-1/ext.config.yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| $schema: http://json-schema.org/draft-07/schema | ||
| $id: https://adobe.io/schemas/app-builder-templates/1 | ||
|
obarcelonap marked this conversation as resolved.
|
||
|
|
||
| categories: | ||
| - action | ||
| - ui | ||
|
|
||
| extensions: | ||
| # This extension is required for Admin UI. Do not remove. | ||
| - extensionPointId: commerce/backend-ui/2 | ||
|
|
||
| # This extension is required for app management. Do not remove. | ||
| - extensionPointId: commerce/extensibility/1 | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.