Skip to content

Add external link handling and localization support in Bill of Materi… - #43

Merged
LuisSchweinberger merged 5 commits into
robotik-challenge-mainfrom
ALS-67-resolve-bo-m-links-before-rendering-button
May 4, 2026
Merged

Add external link handling and localization support in Bill of Materi…#43
LuisSchweinberger merged 5 commits into
robotik-challenge-mainfrom
ALS-67-resolve-bo-m-links-before-rendering-button

Conversation

@LuisSchweinberger

Copy link
Copy Markdown
Collaborator

This pull request introduces support for handling external asset links in the Bill of Material (BoM) viewer. Now, entities with external URLs as their globalAssetId show 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

Testing Enhancements

  • Added Cypress tests to verify the presence and behavior of the external link button, the confirmation dialog, and the absence of the button for non-URL assets. (cypress/e2e/a_billOfMaterial.spec.js [1] [2]
  • Updated test data and fixture to include entities for both external URLs and non-URL assets. (cypress/fixtures/cypress_e2e/Submodels/cyBillOfMaterial.json cypress/fixtures/cypress_e2e/Submodels/cyBillOfMaterial.jsonR46-R57)

Localization

  • Added new translation keys for the external redirect dialog in English, German, and Spanish locale files. (src/locale/en.json [1] src/locale/de.json [2] src/locale/es.json [3]

Copilot AI review requested due to automatic review settings April 30, 2026 14:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment thread cypress/e2e/a_billOfMaterial.spec.js Outdated
Comment thread cypress/e2e/a_billOfMaterial.spec.js Outdated
LuisSchweinberger and others added 4 commits May 4, 2026 08:51
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Luis Schweinberger <75935467+LuisSchweinberger@users.noreply.github.com>
@LuisSchweinberger
LuisSchweinberger merged commit 48e37e5 into robotik-challenge-main May 4, 2026
10 checks passed
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.

2 participants