SAP / ui5-webcomponents-react

A wrapper implementation for React of the UI5 Web Components that are compliant with the SAP Fiori User Experience
https://sap.github.io/ui5-webcomponents-react/
Apache License 2.0
444 stars 100 forks source link

[DIALOG]: [Header and footer pushed away on dialog resize] #6285

Closed kushalkaranjkar closed 2 months ago

kushalkaranjkar commented 2 months ago

Describe the bug

When the dialog resizable property set true , header and footer of the dialog moved and pushed to right & left respectively. I am using initial dialog width - 680px for this dialog.

This issue is reproducible in UI5 playground or - https://sap.github.io/ui5-webcomponents/components/Dialog/.

Open Dialog
<ui5-dialog id="dialog" resizable="true" style="width:680px" header-text="Register Form">
    <section class="login-form">
        <div>
            <ui5-label for="username" required show-colon>Username</ui5-label>
            <ui5-input id="username"></ui5-input>
        </div>
    </section>
    <div slot="footer" style="display: flex; justify-content: flex-end; width: 100%; align-items: center">
        <div style="flex: 1;"></div>
        <ui5-button class="dialogCloser" design="Emphasized">Register</ui5-button>
    </div>
</ui5-dialog>

Isolated Example

This issue is reproducible in UI5 playground or - https://sap.github.io/ui5-webcomponents/components/Dialog/. Open Dialog

Register

Reproduction steps

  1. Create UI5 Dialog with resizable=true and set dialog width to 680px
  2. after render on screen - try to resize dialog to smaller width
  3. You will see both header n footer are moving and pushed inside. ...

Expected Behaviour

Header and footer should get back to there original place. The padding for header text should remain same from the left.

Screenshots or Videos

Image 1 - image

Image 2 - image

UI5 Web Components for React Version

1.29

UI5 Web Components Version

1.24

Browser

Chrome

Operating System

Mac

Additional Context

SAP - successfactor's - WEF Team -

Relevant log output

No response

Organization

SAP

Declaration

Lukas742 commented 2 months ago

Hi @kushalkaranjkar

this behavior is by design, the padding should be adjusted depending on component width. You can define your own padding by using the respective ::part pseudo element. You can find out more about this here.