-
Notifications
You must be signed in to change notification settings - Fork 280
feat(ui5-flexible-column-layout): public layoutsConfiguration property #9290
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
Conversation
|
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. |
dobrinyonkov
left a comment
There was a problem hiding this 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 => { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
…umns below min-width
535761b to
8f6514e
Compare
…bcomponents into fcl-layout-config-api
|
Can we discuss which name for the new event is better:
|
There was a problem hiding this 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
layoutsConfigurationwhen 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 |
Honestly, I don't have a strong preference for either. Maybe, |
OK, the current version seems better indeed. Let us keep it this way then. |
#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#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>
|
🎉 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 📦🚀 |
Added:
layoutsConfigurationproperty to allow the app customize the column proportions per screen size and layout.layout-configuration-changeevent will be fired whenever thelayoutsConfigurationproperty changesAlso, the
layoutsConfigurationfields are now updated whenever the user interactively changes the column proportions by dragging the columns separator.