ui5-webcomponents icon indicating copy to clipboard operation
ui5-webcomponents copied to clipboard

[Flexible Column Layout]: [The disableResizing="true" property between the start and mid columns. However, we are still able to resize between the mid and end columns.]

Open Harshithaharsh opened this issue 1 year ago • 7 comments

Describe the bug

The Flexible Column Layout, disableResizing="true" only disables resizing between the start and mid columns. However, users are still able to resize between the mid and end columns. It should ideally disable resizing between mid and end columns too along with start and mid columns

Isolated Example

https://sap.github.io/ui5-webcomponents-react/v2/?path=/story/layouts-floorplans-flexiblecolumnlayout--default&args=disableResizing:!true

Reproduction steps

  1. Go to https://sap.github.io/ui5-webcomponents-react/v2/?path=/story/layouts-floorplans-flexiblecolumnlayout--default&args=disableResizing:!true
  2. Set disableResize to "true"
  3. Observe it only disables resizing between the start and mid columns. However same behavior is not exist for mid and end columns. ...

Expected Behaviour

It should ideally disable resizing between mid and end columns too along with start and mid columns when we set disableResizing="true". In some page resizing the columns causing the flickering issue in the application.

The works fine in Version 1 - "@ui5/webcomponents-react": "^1.23.3", "@ui5/webcomponents": "^1.20.0". We are not able to resize between mid and end column.

Screenshots or Videos

https://github.com/user-attachments/assets/86351c9f-98cc-4662-aed8-b244cc97ed04

UI5 Web Components for React Version

~2.7.1

UI5 Web Components Version

~2.7.4

Browser

Chrome

Operating System

No response

Additional Context

No response

Relevant log output


Organization

No response

Declaration

  • [x] I’m not disclosing any internal or sensitive information.

Harshithaharsh avatar Apr 23 '25 16:04 Harshithaharsh

Thanks for reporting! I'll forward this issue to our UI5 Web Components Colleagues as the affected component is developed in their repository.

Lukas742 avatar Apr 24 '25 06:04 Lukas742

Hello @SAP/ui5-webcomponents-topic-p, can you check this issue?

TeodorTaushanov avatar Apr 24 '25 10:04 TeodorTaushanov

This issue has been closed. To reopen, just leave a comment!

github-actions[bot] avatar Apr 25 '25 13:04 github-actions[bot]

This issue has been closed. To reopen, just leave a comment!

github-actions[bot] avatar Apr 25 '25 13:04 github-actions[bot]

Hi, Currently we are using "@ui5/webcomponents-react": "~2.7.1", in our application, is it possible to down port the fix to 2.7.1 to provide this fix to customers?

Harshithaharsh avatar Apr 27 '25 17:04 Harshithaharsh

Hi @Harshithaharsh,

The fix you are requesting to be downported is included in our upcoming release 2.10.0, scheduled for early May.

As this is not a critical issue, we will not be downporting it. We strongly encourage keeping up to date with the latest version to benefit from all improvements and fixes.

If you are unable to update right away, I can suggest a workaround. It involves overriding a few methods of the FlexibleColumnLayout component (based on the linked solution). The required changes are relatively minor. You can apply the following snippet as early as possible in your application (for example, in main.tsx as shown here: example snippet

import FlexibleColumnLayout from '@ui5/webcomponents-fiori/dist/FlexibleColumnLayout.js';

const originalOnSeparatorPress = FlexibleColumnLayout.prototype.onSeparatorPress;

Object.defineProperty(FlexibleColumnLayout.prototype, 'endSeparatorTabIndex', {
  get: function () {
    if (this.showEndSeparatorGrip) {
      return 0;
    }
  },
});

// Override onSeparatorPress
FlexibleColumnLayout.prototype.onSeparatorPress = function (e) {
  const pressedSeparator = (e.target as HTMLElement).closest('.ui5-fcl-separator') as HTMLElement;

  if (
    (pressedSeparator.classList.contains('ui5-fcl-separator-start') && !this.showStartSeparatorGrip) ||
    (pressedSeparator.classList.contains('ui5-fcl-separator-end') && !this.showEndSeparatorGrip)
  ) {
    return;
  }

  // Call the original function
  originalOnSeparatorPress.call(this, e);
};

Please make sure to remove this workaround once you update to version 2.10.0.

Best regards,
Nayden

nnaydenow avatar Apr 28 '25 16:04 nnaydenow

This issue has been closed. To reopen, just leave a comment!

github-actions[bot] avatar Apr 28 '25 16:04 github-actions[bot]