Skip to content

fix: correct control aggregation for object page when fcl is enabled #3168

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

Conversation

815are
Copy link
Contributor

@815are 815are commented Apr 22, 2025

Issue #3170

Scenario:

  1. Use manifest.json with routing like:
"routing": {
            "config": {
                "flexibleColumnLayout": {
                    "defaultTwoColumnLayoutType": "TwoColumnsBeginExpanded",
                    "defaultThreeColumnLayoutType": "ThreeColumnsMidExpanded"
                },
                "routerClass": "sap.f.routing.Router"
            },
            "routes": [
                {
                    "pattern": ":?query:",
                    "name": "TripsList",
                    "target": [
                        "TripsList"
                    ]
                },
                {
                    "name": "TripsObjectPage",
                    "pattern": "Trips({TripsKey}):?query:",
                    "target": [
                        "TripsList",
                        "TripsObjectPage"
                    ]
                }
            ],
            "targets": {
                "TripsList": {
                    "type": "Component",
                    "id": "TripsList",
                    "name": "sap.fe.templates.ListReport",
                    "options": {
                        "settings": {
                            "contextPath": "/Trips",
                            "variantManagement": "Page",
                            "initialLoad": "Enabled",
                            "navigation": {
                                "Trips": {
                                    "detail": {
                                        "route": "TripsObjectPage"
                                    }
                                }
                            }
                        }
                    },
                    "controlAggregation": "beginColumnPages",
                    "contextPattern": ""
                },
                "TripsObjectPage": {
                    "type": "Component",
                    "id": "TripsObjectPage",
                    "name": "sap.fe.templates.ObjectPage",
                    "controlAggregation": "midColumnPages",
                    "options": {
                        "settings": {
                            "navigation": {},
                            "contextPath": "/Trips"
                        }
                    },
                    "contextPattern": "/Trips({TripsKey})"
                }
            }
        },
  1. Add new object page to TripsObjectPage while FCL is enabled.

Problem - controlAggregation of new Object Page is beginColumnPages instead of endColumnPages

Issue navigation was not passed to method getFclConfig

correct control aggregation for object page when fcl is enabled
Copy link

changeset-bot bot commented Apr 22, 2025

🦋 Changeset detected

Latest commit: 6331383

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@sap-ux/fe-fpm-writer Patch
@sap-ux/fiori-elements-writer Patch
@sap-ux/fe-fpm-cli Patch
@sap-ux/fiori-app-sub-generator Patch
@sap-ux/repo-app-import-sub-generator Patch
@sap-ux/generator-simple-fe Patch

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

815are added 2 commits April 22, 2025 12:58
additional tests
changelog
@815are 815are marked this pull request as ready for review April 22, 2025 10:15
@815are 815are requested a review from a team as a code owner April 22, 2025 10:15
@815are 815are added the fe-fpm-writer @sap-ux/fe-fpm-writer label Apr 22, 2025
Copy link
Contributor

@AlinaGovoruhina AlinaGovoruhina left a comment

Choose a reason for hiding this comment

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

Config for controlAggregation fixed, change tested, changeset added.

Copy link
Member

@devinea devinea left a comment

Choose a reason for hiding this comment

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

Code changes are clear and covered by test.
changeset ✅

@815are 815are merged commit 8b035bd into main Apr 22, 2025
16 checks passed
@815are 815are deleted the fix/0/wrongControlAggregationForNewObjectPageWhenFclEnabled branch April 22, 2025 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fe-fpm-writer @sap-ux/fe-fpm-writer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants