Update navigation handling for multiple properties targeting the same entity set - #5176
marcovieth wants to merge 4 commits into
Conversation
|
👋 Hi — I'm PR Bot, your SAP code review assistant. I'll automatically review your pull requests for code quality, security, and SAP compliance. Get an overview of what I do → What I do
Key commands
*This introduction message will be shown to you only once, you will not see it in future PRs. |
🦋 Changeset detectedLatest commit: 32f727d The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
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 |
SummaryThe following content is AI-generated and provides a summary of the pull request: Title: Fix Add Subpage handling for shared target entity sets DescriptionFixes FE V4 Add Subpage quick action handling when multiple navigation properties target the same entity set. Previously, a subpage already configured for one navigation property could incorrectly disable or hide other navigation properties that point to the same target entity set. This change now checks existing manifest routes by navigation property route pattern instead of only by target entity set. Key updates:
Type of change
How have you tested?
Checklist:
PR Bot InformationVersion:
|
There was a problem hiding this comment.
I found one substantive concern: the route-existence check appears to scan all manifest routes by navigation property only, which can suppress valid subpage options when the same navigation property name exists under another page. I wasn’t able to post the inline comment before tool access ended, so please verify that the check is scoped to the current page’s generated route pattern rather than any route containing /${navigationProperty}(.
|
Jimmy-Joseph19
left a comment
There was a problem hiding this comment.
Changes looks good.
Changeset found.
Test coverage ok.
Tested with int test https://github.com/SAP/open-ux-tools/actions/runs/34827724531



Summary from AI
In FE V4 apps, the "Add Subpage" quick action was incorrectly disabled when multiple navigation properties all target the same entity set and at least one of them already has a subpage configured
Root cause: prepareNavigationData called isPageExists(targetEntitySet) which only matched by entity set name — so a page existing for _Subtype1 → Child01 would block _ZZSubtype13 → Child01 as well
Fix: replace the entity-set check with a route-pattern check — a nav property is only skipped if the manifest already contains a route whose pattern includes /{navProperty}(
Changes
packages/preview-middleware-client/src/adp/quick-actions/fe-v4/add-new-subpage.ts — prepareNavigationData now checks manifest routes instead of entity set names; nav properties that already have a route are filtered out, all others are offered
packages/preview-middleware-client/test/unit/adp/quick-actions/fe-v4.test.ts — updated isNewPageUnavailable object-page test case to include the _BookSupplement route (a target page must have a route — the test was incomplete); added a dedicated regression test for the multi-nav-prop-to-same-entity-set scenario
Test plan
pnpm --filter @sap-ux-private/preview-middleware-client test — all 63 tests pass
Manually verified with hcm.fio.myfamilymemberss1 on QKZ: "Add Subpage" is now enabled and offers _ZZSubtype13 as an option