Skip to content
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

fix(ui5-dialog): width on mobile is not bigger than the phone width #10199

Merged
merged 5 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions packages/main/src/Dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ const ICON_PER_STATE: Record<ValueStateWithIcon, string> = {

*
* ### Responsive Behavior
* The `stretch` property can be used to stretch the
* `ui5-dialog` on full screen.
* The `stretch` property can be used to stretch the `ui5-dialog` on full screen. This is recommended for better usability on mobile devices.
LidiyaGeorgieva marked this conversation as resolved.
Show resolved Hide resolved
* On desktop and tablet `stretch` property can be switched off.
*
* **Note:** When a `ui5-bar` is used in the header or in the footer, you should remove the default dialog's paddings.
*
Expand Down Expand Up @@ -131,10 +131,10 @@ class Dialog extends Popup {
headerText?: string;

/**
* Determines whether the component should be stretched to fullscreen.
* Determines if the Dialog will be stretched to full screen on mobile. On desktop,
LidiyaGeorgieva marked this conversation as resolved.
Show resolved Hide resolved
* the Dialog will be stretched to approximately 90% of the viewport.
LidiyaGeorgieva marked this conversation as resolved.
Show resolved Hide resolved
*
* **Note:** The component will be stretched to approximately
* 90% of the viewport.
* **Note:** For better usability of the component it is recommended to set this property to "true" when the Dialog is opened in phone.
LidiyaGeorgieva marked this conversation as resolved.
Show resolved Hide resolved
* @default false
* @public
*/
Expand Down
1 change: 1 addition & 0 deletions packages/main/src/themes/Dialog.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
max-height: 100%;
max-width: 100%;
border-radius: 0;
min-width: 0; /*this is for preventing the dialog to hold it's width in small screens*/
LidiyaGeorgieva marked this conversation as resolved.
Show resolved Hide resolved
}

:host([draggable]) .ui5-popup-header-root,
Expand Down