-
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
base: main
Are you sure you want to change the base?
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. |
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
this.layout = newLayout; | ||
this.fireLayoutChange(true, false); | ||
} | ||
if (oldColumnLayout !== newColumnLayout) { |
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.
Those two seems to be arrays, comparing them with "===" will compare them by reference and would result in false. Unless this is intentional, we may need to deep check if the fields have changed.
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.
thanks, corrected now to compare the actual content
…umns below min-width
535761b
to
8f6514e
Compare
f4411e2
to
fd5dd40
Compare
* @param {MEDIA} media The current media type | ||
* @param {array} columnLayout The effective column layout, f.e ["67%", "33%", "0px"] | ||
* @public | ||
* @since 2.15.1 |
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 about the correct version
* - Whenever the user drags the columns separator to resize the columns, the `layoutsConfiguration` object will be updated with the user-specified proportions for the given layout (and the `layout-configuration-change` event will be fired). | ||
* - No custom configuration available for the phone screen size, as the default of 100% column width is always used there. | ||
* @public | ||
* @since 2.15.1 |
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 about the correct version (2.15.1?)
Add public layoutsConfiguration property to allow the app customize the column proportions per screen size and layout.
Also, update the layoutsConfiguration fields whenever the user interactively changes the column proportions by dragging the columns separator.