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

feat(ui5-dialog): introduce draggable property #2269

Merged
merged 1 commit into from
Oct 4, 2020
Merged

feat(ui5-dialog): introduce draggable property #2269

merged 1 commit into from
Oct 4, 2020

Conversation

georgimkv
Copy link
Contributor

Part of #2082

@CLAassistant
Copy link

CLAassistant commented Sep 29, 2020

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@ilhan007 ilhan007 left a 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/Dialog.js Show resolved Hide resolved
@@ -21,6 +21,14 @@
max-width: 100vw;
}

:host([draggable]) .ui5-popup-header-root {
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

@ilhan007 ilhan007 left a 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.

@georgimkv
Copy link
Contributor Author

Fixed the IE issue. Was caused by inconsistent number rounding.

Copy link
Member

@ilhan007 ilhan007 left a 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.

@georgimkv
Copy link
Contributor Author

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.

@georgimkv georgimkv closed this Oct 2, 2020
@georgimkv georgimkv reopened this Oct 2, 2020
@georgimkv georgimkv closed this Oct 3, 2020
@georgimkv georgimkv reopened this Oct 3, 2020
@ilhan007 ilhan007 self-requested a review October 4, 2020 05:58
@ilhan007 ilhan007 merged commit 93772fb into SAP:master Oct 4, 2020
@georgimkv georgimkv deleted the dialog_draggable branch October 5, 2020 11:08
@georgimkv georgimkv restored the dialog_draggable branch October 7, 2020 11:43
@georgimkv georgimkv deleted the dialog_draggable branch October 7, 2020 11:45
ilhan007 pushed a commit that referenced this pull request Oct 17, 2020
ilhan007 pushed a commit that referenced this pull request Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants