Skip to content

Commit 74aab65

Browse files
committed
chore: remove highlights button from live preview toolbar
1 parent db0159c commit 74aab65

File tree

3 files changed

+1
-25
lines changed

3 files changed

+1
-25
lines changed

src/extensionsIntegrated/Phoenix-live-preview/live-preview.css

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,6 @@
6969
background: url("./images/sprites.svg#reload-icon") center no-repeat;
7070
}
7171

72-
.pointer-fill-icon {
73-
background: url("./images/sprites.svg#pointer-fill-icon") center no-repeat;
74-
}
75-
7672
#live-preview-plugin-toolbar:hover .lp-settings-icon {
7773
display: flex;
7874
align-items: center;
@@ -97,10 +93,6 @@
9793
transition: opacity 1s, visibility 0s linear 1s; /* Fade-out effect */
9894
}
9995

100-
.pointer-icon {
101-
background: url("./images/sprites.svg#pointer-icon") center no-repeat;
102-
}
103-
10496
#livePreviewModeBtn {
10597
min-width: fit-content;
10698
display: flex;

src/extensionsIntegrated/Phoenix-live-preview/main.js

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ define(function (require, exports, module) {
113113
$iframe,
114114
$panel,
115115
$pinUrlBtn,
116-
$highlightBtn,
117116
$livePreviewPopBtn,
118117
$reloadBtn,
119118
$chromeButton,
@@ -357,15 +356,6 @@ define(function (require, exports, module) {
357356
Metrics.countEvent(Metrics.EVENT_TYPE.LIVE_PREVIEW, "pinURLBtn", "click");
358357
}
359358

360-
function _updateLiveHighlightToggleStatus() {
361-
let isHighlightEnabled = _isLiveHighlightEnabled();
362-
if(isHighlightEnabled){
363-
$highlightBtn.removeClass('pointer-icon').addClass('pointer-fill-icon');
364-
} else {
365-
$highlightBtn.removeClass('pointer-fill-icon').addClass('pointer-icon');
366-
}
367-
}
368-
369359
function _toggleLiveHighlights() {
370360
LiveDevelopment.togglePreviewHighlight();
371361
Metrics.countEvent(Metrics.EVENT_TYPE.LIVE_PREVIEW, "HighlightBtn", "click");
@@ -442,7 +432,6 @@ define(function (require, exports, module) {
442432
Strings: Strings,
443433
livePreview: Strings.LIVE_DEV_STATUS_TIP_OUT_OF_SYNC,
444434
clickToReload: Strings.LIVE_DEV_CLICK_TO_RELOAD_PAGE,
445-
toggleLiveHighlight: Strings.LIVE_DEV_TOGGLE_LIVE_HIGHLIGHT,
446435
livePreviewSettings: Strings.LIVE_DEV_SETTINGS,
447436
clickToPopout: Strings.LIVE_DEV_CLICK_POPOUT,
448437
openInChrome: Strings.LIVE_DEV_OPEN_CHROME,
@@ -458,7 +447,6 @@ define(function (require, exports, module) {
458447
$panel = $(Mustache.render(panelHTML, templateVars));
459448
$iframe = $panel.find("#panel-live-preview-frame");
460449
$pinUrlBtn = $panel.find("#pinURLButton");
461-
$highlightBtn = $panel.find("#highlightLPButton");
462450
$reloadBtn = $panel.find("#reloadLivePreviewButton");
463451
$livePreviewPopBtn = $panel.find("#livePreviewPopoutButton");
464452
$chromeButton = $panel.find("#chromeButton");
@@ -529,9 +517,7 @@ define(function (require, exports, module) {
529517
PANEL_MIN_SIZE, $icon, INITIAL_PANEL_SIZE);
530518

531519
WorkspaceManager.recomputeLayout(false);
532-
_updateLiveHighlightToggleStatus();
533520
$pinUrlBtn.click(_togglePinUrl);
534-
$highlightBtn.click(_toggleLiveHighlights);
535521
$livePreviewPopBtn.click(_popoutLivePreview);
536522
$reloadBtn.click(()=>{
537523
_loadPreview(true, true);
@@ -903,7 +889,6 @@ define(function (require, exports, module) {
903889
fileMenu.addMenuDivider(Menus.BEFORE, Commands.FILE_LIVE_FILE_PREVIEW);
904890
LiveDevelopment.openLivePreview();
905891
LiveDevelopment.on(LiveDevelopment.EVENT_OPEN_PREVIEW_URL, _openLivePreviewURL);
906-
LiveDevelopment.on(LiveDevelopment.EVENT_LIVE_HIGHLIGHT_PREF_CHANGED, _updateLiveHighlightToggleStatus);
907892
LiveDevelopment.on(LiveDevelopment.EVENT_LIVE_PREVIEW_RELOAD, ()=>{
908893
// Usually, this event is listened by live preview iframes/tabs and they initiate a location.reload.
909894
// But in firefox, the embedded iframe will throw a 404 when we try to reload from within the iframe as

src/extensionsIntegrated/Phoenix-live-preview/panel.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<div id="panel-live-preview">
22
<div id="live-preview-plugin-toolbar" class="plugin-toolbar" style="display: flex; align-items: center; flex-direction: row;">
3-
<div style="width: 20%;display: flex;">
3+
<div style="width: 10%;display: flex;">
44
<button id="reloadLivePreviewButton" title="{{clickToReload}}" class="btn-alt-quiet toolbar-button reload-icon"></button>
5-
<button id="highlightLPButton" title="{{toggleLiveHighlight}}" class="btn-alt-quiet toolbar-button pointer-fill-icon"></button>
65
</div>
76
<div style="width: fit-content;min-width: 60%;display: flex;justify-content: center; align-items: center;">
87
<!-- these are buttons that are always invisible to help central align the panel title-->

0 commit comments

Comments
 (0)