Skip to content

Commit e3e5d68

Browse files
author
Lukasz Borowiec
committed
#514: User sees content snapshot on Category Page in Admin Panel - added code review fixes
1 parent c124f12 commit e3e5d68

File tree

5 files changed

+7
-18
lines changed

5 files changed

+7
-18
lines changed

app/code/Magento/PageBuilder/view/adminhtml/web/js/form/element/wysiwyg.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ define([
8585
this.loading(true);
8686
this.pageBuilder = new PageBuilder(
8787
this.wysiwygConfigData(),
88-
this.initialValue,
89-
Boolean(this.wysiwygConfigData()['pagebuilder_content_snapshot'])
88+
this.initialValue
9089
);
9190
events.trigger('pagebuilder:register', {
9291
ns: this.ns,

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

Lines changed: 3 additions & 5 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/form/element/uploader/preview/image.html

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,6 @@
6464
</p>
6565
</div>
6666
</if>
67-
<ifnot args="$parent.accessibility()">
68-
<div class="image-uploader-preview-information">
69-
<h4 class="title" translate="'Preview Mode'"></h4>
70-
<p class="description" translate="'Photo upload is available in full screen mode'"></p>
71-
</div>
72-
</ifnot>
7367
</div>
7468
</div>
7569
</div>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
attr="{title: isFullScreen() ? $t('Close Full Screen') : $t('Open in Full Screen')}">
1818
</i>
1919
</div>
20-
<with args="panel" if="(isFullScreen() && getContentSnapshotMode()) || !getContentSnapshotMode()">
20+
<with args="panel" if="isFullScreen() || !getContentSnapshotMode()">
2121
<render/>
2222
</with>
2323
<if args="isStageReady">

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ export default class PageBuilder implements PageBuilderInterface {
4040
private previousWrapperStyles: {[key: string]: string} = {};
4141
private previousPanelHeight: number;
4242

43-
constructor(config: any, initialValue: string, contentSnapshot: boolean) {
43+
constructor(config: any, initialValue: string) {
4444
Config.setConfig(config);
4545
Config.setMode("Preview");
4646
Config.setContentSnapshot(
4747
{
4848
pageBuilderId: this.id,
4949
isFullScreen: config.isFullScreen,
50-
contentSnapshotMode: contentSnapshot,
50+
contentSnapshotMode: config.pagebuilder_content_snapshot,
5151
},
5252
);
5353
this.preloadTemplates(config);
@@ -185,10 +185,8 @@ export default class PageBuilder implements PageBuilderInterface {
185185
}
186186

187187
if (Config.getContentSnapshot().contentSnapshotMode) {
188-
189188
Config.setContentSnapshotPageBuilderId(this.id);
190189
Config.setContentSnapshotFullScreenMode(this.isFullScreen());
191-
192190
events.trigger(`stage:accessibilityChangeAfter`, {
193191
activePageBuilderId: this.id,
194192
activeFullScreen: this.isFullScreen(),

0 commit comments

Comments
 (0)