Skip to content

Conversation

@kineticjs
Copy link
Contributor

@kineticjs kineticjs commented Jun 24, 2024

Added:

  • public layoutsConfiguration property to allow the app customize the column proportions per screen size and layout.
  • layout-configuration-change event will be fired whenever the layoutsConfiguration property changes
    Also, the layoutsConfiguration fields are now updated whenever the user interactively changes the column proportions by dragging the columns separator.

@kineticjs kineticjs marked this pull request as ready for review June 27, 2024 07:44
@dobrinyonkov
Copy link
Contributor

As synced offline, the layoutsConfiguration is now a public property that is being changed by the component upon user interaction, it would help to fire an event and notify the application about those changes.

Copy link
Contributor

@dobrinyonkov dobrinyonkov left a comment

Choose a reason for hiding this comment

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

Overall, it works and looks geat. I've only commented on two concerns of mine that we can discuss offline, if needed.

Also, could we add a test for the layout-configuration-change event?

return false;
}

const hasColumnBelowMinWidth = pxWidths.some(pxWidth => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure whether this could cause an issue but it seems that this check returns false whenever we have less than 3 columns because of their 0 width.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, this issue had popped up earlier, this is why the check for width also contained pxWidth > 0

@kineticjs kineticjs force-pushed the fcl-layout-config-api branch from 535761b to 8f6514e Compare July 22, 2024 15:10
@github-actions github-actions bot added the Stale label Aug 21, 2024
@github-actions github-actions bot closed this Aug 28, 2024
@kineticjs kineticjs reopened this Aug 13, 2025
@github-actions github-actions bot removed the Stale label Aug 14, 2025
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview September 30, 2025 10:58 Inactive
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview September 30, 2025 10:59 Inactive
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview September 30, 2025 11:04 Inactive
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview October 1, 2025 07:11 Inactive
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview October 23, 2025 08:02 Inactive
@kineticjs
Copy link
Contributor Author

kineticjs commented Oct 24, 2025

Can we discuss which name for the new event is better:

  1. layout-configuration-change
  2. layouts-configuration-change
    In this PR i named it layout-configuration-change, in analogy to the existing layout-change event. Also, the event fires when the user resizes the column of the current layout he is viewing i.e. upon config change of a single layout.
    However, given that the corresponding public property is layoutsConfiguration (with "s") would the second option be more consistent?

@kineticjs kineticjs requested a review from Copilot October 24, 2025 12:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new public layoutsConfiguration property to the FlexibleColumnLayout component, allowing applications to customize column proportions for different screen sizes and layouts. A new layout-configuration-change event notifies when these proportions change through user interaction.

Key changes:

  • New public API for custom column layout configuration per screen size and layout type
  • Automatic updates to layoutsConfiguration when users drag column separators
  • Enhanced validation to ensure custom configurations meet minimum width constraints

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/fiori/src/FlexibleColumnLayout.ts Adds public layoutsConfiguration property, layout-configuration-change event, validation logic for custom layouts, and updates internal handling to support custom configurations
packages/fiori/src/fcl-utils/FCLLayout.ts Renames getLayoutsByMedia to getDefaultLayoutsByMedia to distinguish from custom configurations
packages/fiori/test/pages/FCL.html Adds UI and event listeners to track layout configuration changes
packages/fiori/test/pages/FCLCustom.html Updates test page to use new public layoutsConfiguration property instead of private _layoutsConfiguration
packages/fiori/cypress/specs/FCL.cy.tsx Adds comprehensive test coverage for the new layoutsConfiguration feature
packages/website/docs/_samples/fiori/FlexibleColumnLayout/LayoutsConfiguration/* Adds new sample demonstrating layoutsConfiguration usage
packages/website/docs/_components_pages/fiori/FlexibleColumnLayout.mdx Integrates new sample into documentation

@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview October 24, 2025 13:07 Inactive
@dobrinyonkov
Copy link
Contributor

Can we discuss which name for the new event is better:

  1. layout-configuration-change
  2. layouts-configuration-change
    In this PR i named it layout-configuration-change, in analogy to the existing layout-change event.
    However, given that the corresponding public property is layoutsConfiguration (with "s") would the second option be more consistent?

Honestly, I don't have a strong preference for either. Maybe, layout-configuration-change makes more sense semantically as the event detail only includes the layout that chaged. So I personally prefer layout-configuration-change but still choose whichever you prefer.

@kineticjs
Copy link
Contributor Author

Can we discuss which name for the new event is better:

  1. layout-configuration-change
  2. layouts-configuration-change
    In this PR i named it layout-configuration-change, in analogy to the existing layout-change event.
    However, given that the corresponding public property is layoutsConfiguration (with "s") would the second option be more consistent?

Honestly, I don't have a strong preference for either. Maybe, layout-configuration-change makes more sense semantically as the event detail only includes the layout that changed. So I personally prefer layout-configuration-change but still choose whichever you prefer.

OK, the current version seems better indeed. Let us keep it this way then.

@kineticjs kineticjs merged commit a92742c into UI5:main Oct 27, 2025
36 of 41 checks passed
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview October 27, 2025 09:16 Inactive
IlianaB pushed a commit that referenced this pull request Oct 27, 2025
#9290)

* feat(ui5-flexible-column-layout): expose public layoutsConfiguration property

* feat(ui5-flexible-Column-layout): add tests

* feat(ui5-flexible-column-layout): remove json object from jsdoc

* feat(ui5-flexible-column-layout): public layoutsConfiguration property

* feat(ui5-flexible-column-layout): add sample and adjust widths of columns below min-width

* feat(ui5-flexible-column-layout): immediate update of layout configuration

* feat(ui5-flexible-column-layout): add sample

* feat(ui5-flexible-column-layout): improve type declarations

* feat(ui5-flexible-column-layout): improve documentation

* feat(ui5-flexible-column-layout): tmp config to allow sharing a sample

* feat(ui5-flexible-column-layout): tests and some refactoring

* feat(ui5-flexible-column-layout): fix eslint errors

* feat(ui5-flexible-column-layout): fix eslint errors

* feat(ui5-flexible-column-layout): minor corrections

* feat(ui5-flexible-column-layout): improve sample

* feat(ui5-flexible-column-layout): improve sample

* feat(ui5-flexible-column-layout): preserve legacy property for backward compatibility

* feat(ui5-flexible-column-layout): correct indentation

* feat(ui5-flexible-column-layout): docu improvement

* feat(ui5-flexible-column-layout): docu improvement

* feat(ui5-flexible-column-layout): formatting improvement

* feat(ui5-flexible-column-layout): formatting improvement

* Merge remote-tracking branch 'origin/main' into fcl-layout-config-api

* feat(ui5-flexible-column-layout): correct version

* feat(ui5-flexible-column-layout): add experimental flag

* feat(ui5-flexible-column-layout): correct documentation

* feat(ui5-flexible-column-layout): apply feedback

---------

Co-authored-by: ilhan orhan <ilhan.orhan007@gmail.com>
plamenivanov91 pushed a commit to plamenivanov91/ui5-webcomponents that referenced this pull request Oct 28, 2025
UI5#9290)

* feat(ui5-flexible-column-layout): expose public layoutsConfiguration property

* feat(ui5-flexible-Column-layout): add tests

* feat(ui5-flexible-column-layout): remove json object from jsdoc

* feat(ui5-flexible-column-layout): public layoutsConfiguration property

* feat(ui5-flexible-column-layout): add sample and adjust widths of columns below min-width

* feat(ui5-flexible-column-layout): immediate update of layout configuration

* feat(ui5-flexible-column-layout): add sample

* feat(ui5-flexible-column-layout): improve type declarations

* feat(ui5-flexible-column-layout): improve documentation

* feat(ui5-flexible-column-layout): tmp config to allow sharing a sample

* feat(ui5-flexible-column-layout): tests and some refactoring

* feat(ui5-flexible-column-layout): fix eslint errors

* feat(ui5-flexible-column-layout): fix eslint errors

* feat(ui5-flexible-column-layout): minor corrections

* feat(ui5-flexible-column-layout): improve sample

* feat(ui5-flexible-column-layout): improve sample

* feat(ui5-flexible-column-layout): preserve legacy property for backward compatibility

* feat(ui5-flexible-column-layout): correct indentation

* feat(ui5-flexible-column-layout): docu improvement

* feat(ui5-flexible-column-layout): docu improvement

* feat(ui5-flexible-column-layout): formatting improvement

* feat(ui5-flexible-column-layout): formatting improvement

* Merge remote-tracking branch 'origin/main' into fcl-layout-config-api

* feat(ui5-flexible-column-layout): correct version

* feat(ui5-flexible-column-layout): add experimental flag

* feat(ui5-flexible-column-layout): correct documentation

* feat(ui5-flexible-column-layout): apply feedback

---------

Co-authored-by: ilhan orhan <ilhan.orhan007@gmail.com>
@ui5-webcomponents-bot
Copy link
Collaborator

🎉 This PR is included in version v2.16.0-rc.3 🎉

The release is available on v2.16.0-rc.3

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants