Skip to content

Commit 9d9f59b

Browse files
committed
feat: remove show spacing handles preference setting
1 parent db93dd9 commit 9d9f59b

File tree

5 files changed

+2
-23
lines changed

5 files changed

+2
-23
lines changed

src/LiveDevelopment/BrowserScripts/RemoteFunctions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1353,7 +1353,7 @@ function RemoteFunctions(config = {}) {
13531353
}
13541354

13551355
// Preserve the currently selected element across re-registration
1356-
// so that toggling options (e.g. show measurements, show spacing handles)
1356+
// so that toggling options (e.g. show measurements)
13571357
// doesn't clear the element highlighting.
13581358
const selectedBeforeReregister = previouslySelectedElement;
13591359
registerHandlers();

src/LiveDevelopment/LivePreviewConstants.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ define(function main(require, exports, module) {
4141
exports.HIGHLIGHT_CLICK = "click";
4242

4343
exports.PREFERENCE_SHOW_RULER_LINES = "livePreviewShowMeasurements";
44-
exports.PREFERENCE_SHOW_SPACING_HANDLES = "livePreviewShowSpacingHandles";
4544

4645
exports.PREFERENCE_LIVE_PREVIEW_SYNC = "livePreviewSyncSourceAndPreview";
4746
});

src/LiveDevelopment/main.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ define(function main(require, exports, module) {
7070
mode: LIVE_HIGHLIGHT_MODE, // will be updated when we fetch entitlements
7171
elemHighlights: CONSTANTS.HIGHLIGHT_HOVER, // default value, this will get updated when the extension loads
7272
showRulerLines: false, // default value, this will get updated when the extension loads
73-
showSpacingHandles: true, // default value, this will get updated when the extension loads
7473
syncSourceAndPreview: true, // default value, this will get updated when the extension loads
7574
isPaidUser: false, // will be updated when we fetch entitlements
7675
isLoggedIn: false, // will be updated when we fetch entitlements
@@ -326,13 +325,6 @@ define(function main(require, exports, module) {
326325
MultiBrowserLiveDev.updateConfig(config);
327326
}
328327

329-
function updateSpacingHandlesConfig() {
330-
const prefValue = PreferencesManager.get(CONSTANTS.PREFERENCE_SHOW_SPACING_HANDLES);
331-
const config = MultiBrowserLiveDev.getConfig();
332-
config.showSpacingHandles = prefValue !== false;
333-
MultiBrowserLiveDev.updateConfig(config);
334-
}
335-
336328
function updateSyncConfig() {
337329
const prefValue = PreferencesManager.get(CONSTANTS.PREFERENCE_LIVE_PREVIEW_SYNC);
338330
const config = MultiBrowserLiveDev.getConfig();
@@ -363,7 +355,6 @@ define(function main(require, exports, module) {
363355
exports.setLivePreviewTransportBridge = setLivePreviewTransportBridge;
364356
exports.updateElementHighlightConfig = updateElementHighlightConfig;
365357
exports.updateRulerLinesConfig = updateRulerLinesConfig;
366-
exports.updateSpacingHandlesConfig = updateSpacingHandlesConfig;
367358
exports.updateSyncConfig = updateSyncConfig;
368359
exports.getConnectionIds = MultiBrowserLiveDev.getConnectionIds;
369360
exports.getLivePreviewDetails = MultiBrowserLiveDev.getLivePreviewDetails;

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

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,6 @@ define(function (require, exports, module) {
115115
description: Strings.LIVE_DEV_SETTINGS_SHOW_RULER_LINES_PREFERENCE
116116
});
117117

118-
const PREFERENCE_SHOW_SPACING_HANDLES = CONSTANTS.PREFERENCE_SHOW_SPACING_HANDLES;
119-
PreferencesManager.definePreference(PREFERENCE_SHOW_SPACING_HANDLES, "boolean", true, {
120-
description: Strings.LIVE_DEV_SETTINGS_SHOW_SPACING_HANDLES_PREFERENCE
121-
});
122-
123118
// live preview link editor and preview preference
124119
const PREFERENCE_LIVE_PREVIEW_SYNC = CONSTANTS.PREFERENCE_LIVE_PREVIEW_SYNC;
125120
PreferencesManager.definePreference(PREFERENCE_LIVE_PREVIEW_SYNC, "boolean", true, {
@@ -1455,17 +1450,13 @@ define(function (require, exports, module) {
14551450
PreferencesManager.on("change", PREFERENCE_SHOW_RULER_LINES, function() {
14561451
LiveDevelopment.updateRulerLinesConfig();
14571452
});
1458-
PreferencesManager.on("change", PREFERENCE_SHOW_SPACING_HANDLES, function() {
1459-
LiveDevelopment.updateSpacingHandlesConfig();
1460-
});
14611453
PreferencesManager.on("change", PREFERENCE_LIVE_PREVIEW_SYNC, function() {
14621454
LiveDevelopment.updateSyncConfig();
14631455
});
14641456

1465-
// Initialize element highlight, ruler lines, spacing handles, and sync config on startup
1457+
// Initialize element highlight, ruler lines, and sync config on startup
14661458
LiveDevelopment.updateElementHighlightConfig();
14671459
LiveDevelopment.updateRulerLinesConfig();
1468-
LiveDevelopment.updateSpacingHandlesConfig();
14691460
LiveDevelopment.updateSyncConfig();
14701461

14711462
LiveDevelopment.openLivePreview();

src/nls/root/strings.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -537,8 +537,6 @@ define({
537537
"LIVE_PREVIEW_MODE_EDIT": "Edit Mode",
538538
"LIVE_PREVIEW_EDIT_HIGHLIGHT_ON": "Inspect Element on Hover",
539539
"LIVE_PREVIEW_SHOW_RULER_LINES": "Show Measurements",
540-
"LIVE_PREVIEW_SHOW_SPACING_HANDLES": "Show Spacing Handles",
541-
"LIVE_DEV_SETTINGS_SHOW_SPACING_HANDLES_PREFERENCE": "Show spacing handles when elements are selected in live preview edit mode. Defaults to 'true'",
542540
"LIVE_PREVIEW_LINK_EDITOR_AND_PREVIEW": "Link Editor and Preview",
543541
"LIVE_DEV_SETTINGS_LINK_EDITOR_AND_PREVIEW_PREFERENCE": "Link editor cursor with live preview element highlighting. When enabled, moving the cursor in the editor highlights the corresponding element in the live preview, and clicking an element in the live preview jumps the cursor to its source code. Defaults to 'true'",
544542
"LIVE_PREVIEW_MODE_PREFERENCE": "'{0}' shows only the webpage, '{1}' connects the webpage to your code - click on elements to jump to their code and vice versa, '{2}' provides highlighting along with advanced element manipulation",

0 commit comments

Comments
 (0)