-
Notifications
You must be signed in to change notification settings - Fork 273
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
feat(ui5-dialog): introduce draggable property #2269
Conversation
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 for the PR. It works fine, I tested the change in IE as well, you can find few minor comments in place, after that we can merge the PR
packages/main/src/themes/Dialog.css
Outdated
@@ -21,6 +21,14 @@ | |||
max-width: 100vw; | |||
} | |||
|
|||
:host([draggable]) .ui5-popup-header-root { |
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.
We should also apply the correct cursor when the user sets a "header" slot.
Because this CSS applies for the built-in header that shows the "header-text", but doesn't apply to the user defined header via the "header" slot. Explore the ::slotted CSS selector in order to make it.
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.
I added it, but the ::slotted selector doesn't allow selecting inner elements deeper in the Shadow DOM, only the most top level inner elements. Because of this, I can't reset the cursor of the inner children like I am doing with the rule
:host([draggable]) .ui5-popup-header-root * {
cursor: auto
}
This results in elements such as headings still inheriting the "move" cursor. A ui5-button
, for example, will have correct cursor "pointer", because its own CSS defines it.
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.
Also, found some strange side effect in IE. At the moment someone start dragging the dialog in IE, the content gets a scrollbar (did not have it before), without a reason.
*It can be reproduced with the dialog with the "draggable" attribute set in the Dialog test page in IE11.
Fixed the IE issue. Was caused by inconsistent number rounding. |
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 for addressing the comments. Now the draggable test is failing, could you take a look of it.
Regarding the cursor pointer of the header slot, we can live with that. But, If we receive an issue in future we should spend time to find a way to resolve this.
Thanks for the review Ilhan. I've amended the Dialog.html to keep the visual test straightforward. I will follow up with another change for the other user story on the issue. |
Part of #2082