Skip to content

Commit 572c8cf

Browse files
committed
#514: User sees content snapshot on Category Page in Admin Panel - Changed styles to be more generic, added mouseover events for overlay
1 parent 08197bb commit 572c8cf

File tree

6 files changed

+76
-39
lines changed

6 files changed

+76
-39
lines changed

app/code/Magento/PageBuilder/view/adminhtml/web/css/source/_common.less

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -48,35 +48,3 @@
4848
display: none !important;
4949
}
5050
}
51-
52-
//
53-
// Category Description
54-
// ---------------------------------------------
55-
56-
.catalog-category-edit {
57-
.admin__fieldset {
58-
> .admin__field {
59-
&[data-index="description"] {
60-
> .admin__field-label {
61-
text-align: left;
62-
63-
label {
64-
span {
65-
&:before {
66-
left: 0;
67-
}
68-
}
69-
}
70-
}
71-
72-
> .admin__field-control {
73-
float: right;
74-
75-
button.action-default {
76-
float: right;
77-
}
78-
}
79-
}
80-
}
81-
}
82-
}

app/code/Magento/PageBuilder/view/adminhtml/web/css/source/_config.less

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,30 @@
4545
}
4646
}
4747
}
48+
49+
50+
//
51+
// Page Builder full width field
52+
// _____________________________________________
53+
54+
55+
.admin__fieldset {
56+
> .admin__field.admin__field-wide.admin__field-page-builder[class]:not(.admin__field-option) {
57+
> .admin__field-label {
58+
text-align: right;
59+
min-height: 32px;
60+
margin-top: @indent__xs;
61+
}
62+
}
63+
}
64+
65+
.admin__field-page-builder {
66+
margin-top: @indent__l;
67+
68+
button.action-default {
69+
position: absolute;
70+
top: @indent__xs;
71+
right: 0;
72+
}
73+
74+
}

app/code/Magento/PageBuilder/view/adminhtml/web/css/source/_page-builder.less

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
// */
55

66
@border-size: 2px;
7+
@stage-overlay-background: rgba(0, 120, 249, 0.08);
8+
@stage-overlay-border: #4181E4;
79

810
.pagebuilder-header {
911
opacity: 0;
@@ -98,6 +100,7 @@
98100

99101
.pagebuilder-canvas {
100102
padding-top: 30px;
103+
padding-bottom: 120px;
101104
}
102105

103106
.pagebuilder-panel-wrapper {
@@ -148,14 +151,27 @@
148151
visibility: hidden;
149152
width: 0;
150153

151-
&.active {
154+
&.visible {
155+
-moz-transition: .175s ease-in-out;
156+
-webkit-transition: .175s ease-in-out;
152157
cursor: pointer;
153158
display: block;
154159
height: 100%;
160+
opacity: 0;
161+
transform: translateY(-@indent__xs);
162+
transition: .175s ease-in-out;
155163
visibility: visible;
156164
width: 100%;
157165
z-index: @z-index-2;
158166
}
167+
168+
&._hover {
169+
background-color: @stage-overlay-background;
170+
border-radius: 2px;
171+
border: 2px solid @stage-overlay-border;
172+
opacity: 1;
173+
transform: translateY(0);
174+
}
159175
}
160176

161177
.pagebuilder-wysiwyg-wrapper.pagebuilder-transition-out .pagebuilder-stage-wrapper {
@@ -188,17 +204,13 @@
188204
}
189205

190206
.pagebuilder-stage {
191-
-moz-transition: margin-left .35s ease-in-out;
192207
-moz-user-select: none;
193208
-ms-user-select: none;
194209
-o-user-select: none;
195-
-webkit-transition: margin-left .35s ease-in-out;
196210
-webkit-user-select: none;
197211
font-size: 0;
198-
margin-left: 170px;
199212
min-height: 200px;
200213
padding: 0;
201-
transition: margin-left .35s ease-in-out;
202214
user-select: none;
203215

204216
&.stage-full-screen {
@@ -234,7 +246,6 @@
234246
-moz-transition: opacity .75s ease-in-out, visibility .75s ease-in-out;
235247
-webkit-transition: opacity .75s ease-in-out, visibility .75s ease-in-out;
236248
opacity: 0;
237-
padding-bottom: 120px;
238249
transition: opacity .75s ease-in-out, visibility .75s ease-in-out;
239250
visibility: hidden;
240251

app/code/Magento/PageBuilder/view/adminhtml/web/js/page-builder.js

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/code/Magento/PageBuilder/view/adminhtml/web/template/page-builder.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
<div if="hasStageOverlay()"
1111
class="pagebuilder-stage-overlay"
1212
click="toggleFullScreen.bind($data, $element)"
13-
css="'active': !isFullScreen()"
13+
css="'visible': !isFullScreen()"
14+
event="{ mouseover: onStageOverlayMouseOver, mouseout: onStageOverlayMouseOut }, mouseoverBubble: false"
1415
tabindex="0">
1516
</div>
1617
<div class="admin__field pagebuilder-header" css="visible: panel.isVisible">

app/code/Magento/PageBuilder/view/adminhtml/web/ts/js/page-builder.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,20 @@ export default class PageBuilder implements PageBuilderInterface {
9494
stageWrapper.find(focusableElements).attr('tabindex', tabIndexValue);
9595
}
9696

97+
/**
98+
* MouseOver event for Stage Overlay
99+
*/
100+
public onStageOverlayMouseOver (): void {
101+
$('.pagebuilder-stage-overlay').addClass('_hover');
102+
}
103+
104+
/**
105+
* MouseOut event for Stage Overlay
106+
*/
107+
public onStageOverlayMouseOut (): void {
108+
$('.pagebuilder-stage-overlay').removeClass('_hover');
109+
}
110+
97111
/**
98112
* Tells the stage wrapper to expand to fullScreen
99113
*

0 commit comments

Comments
 (0)