Add external link handling and localization support in Bill of Materi… - #43
Merged
LuisSchweinberger merged 5 commits intoMay 4, 2026
Conversation
There was a problem hiding this comment.
Pull request overview
Adds UX and localization support for handling external globalAssetId URLs in the BoM entity tree by showing an “Open” action that prompts for confirmation before navigating to an external site.
Changes:
- Adds external-URL detection and a confirmation dialog flow for BoM entities.
- Extends i18n dictionaries (EN/DE/ES) with dialog copy.
- Adds/updates Cypress E2E coverage and fixture data for external/non-URL entities.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/app/[locale]/viewer/_components/submodel-elements/generic-elements/entity-components/EntityTreeItem.tsx | Adds link-type detection (internal vs external vs hidden) and renders an external-link button + dialog trigger. |
| src/app/[locale]/viewer/_components/submodel-elements/generic-elements/entity-components/ExternalRedirectDialog.tsx | New MUI dialog prompting users before opening an external URL. |
| src/locale/en.json | Adds externalRedirect translations under pages.aasViewer.submodels. |
| src/locale/de.json | Adds externalRedirect translations under pages.aasViewer.submodels. |
| src/locale/es.json | Adds externalRedirect translations under pages.aasViewer.submodels. |
| cypress/fixtures/cypress_e2e/Submodels/cyBillOfMaterial.json | Adds fixture entities for external URL and non-URL asset cases. |
| cypress/e2e/a_billOfMaterial.spec.js | Adds E2E assertions for external-link button and dialog behavior. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Luis Schweinberger <75935467+LuisSchweinberger@users.noreply.github.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request introduces support for handling external asset links in the Bill of Material (BoM) viewer. Now, entities with external URLs as their
globalAssetIdshow a dedicated button that opens a confirmation dialog before redirecting users to the external site. The update includes new Cypress tests, localization improvements, and a new dialog component.Feature: External Asset Link Handling
globalAssetIdthat matches a URL pattern now display an "Open" button with an external link icon. Clicking this button opens a confirmation dialog before redirecting to the external site. Entities without a URL do not show the navigation button. (src/app/[locale]/viewer/_components/submodel-elements/generic-elements/entity-components/EntityTreeItem.tsxsrc/app/[locale]/viewer/_components/submodel-elements/generic-elements/entity-components/EntityTreeItem.tsxL6-R10, src/app/[locale]/viewer/_components/submodel-elements/generic-elements/entity-components/EntityTreeItem.tsxR20-R23, src/app/[locale]/viewer/_components/submodel-elements/generic-elements/entity-components/EntityTreeItem.tsxR58-R103, src/app/[locale]/viewer/_components/submodel-elements/generic-elements/entity-components/EntityTreeItem.tsxR137-R156, src/app/[locale]/viewer/_components/submodel-elements/generic-elements/entity-components/EntityTreeItem.tsxR195-R202;src/app/[locale]/viewer/_components/submodel-elements/generic-elements/entity-components/ExternalRedirectDialog.tsxsrc/app/[locale]/viewer/_components/submodel-elements/generic-elements/entity-components/ExternalRedirectDialog.tsxR1-R37)Testing Enhancements
cypress/e2e/a_billOfMaterial.spec.js[1] [2]cypress/fixtures/cypress_e2e/Submodels/cyBillOfMaterial.jsoncypress/fixtures/cypress_e2e/Submodels/cyBillOfMaterial.jsonR46-R57)Localization
src/locale/en.json[1]src/locale/de.json[2]src/locale/es.json[3]