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 rendering of Dashlet placeholder #19413

Merged
merged 1 commit into from
Jan 18, 2021

Conversation

christianwach
Copy link
Member

Overview

Fixes this issue raised on Lab.

Before

Dragging a Dashlet in the Available Dashlets panel causes the layout to jump unexpectedly.

After

Dragging a Dashlet in the Available Dashlets panel does not cause the layout to jump unexpectedly.

@civibot
Copy link

civibot bot commented Jan 18, 2021

(Standard links)

@civibot civibot bot added the master label Jan 18, 2021
@@ -91,7 +91,9 @@ fieldset.crm-inactive-dashlet-fieldset legend {
#civicrm-dashboard .ui-sortable-placeholder {
border: 2px dashed grey;
visibility: visible !important;
height: 80px !important;
width: 226px;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the significance of the number 226? This layout is fluid using flex css, so there aren't any fixed widths to speak of.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The draggable items are 230px wide, so this sets the correct width of the placeholder, i.e. 230px - 4px border.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hence the 66px height too

@colemanw colemanw merged commit 57e91ba into civicrm:master Jan 18, 2021
@colemanw
Copy link
Member

Ok I agree this is an improvement.

@christianwach christianwach deleted the lab-core-2306 branch January 18, 2021 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants