Skip to content

Commit 464122a

Browse files
committed
feat: show only applicable options in the dropdown
1 parent e36e8b8 commit 464122a

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

  • src/extensionsIntegrated/Phoenix-live-preview

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -353,11 +353,9 @@ define(function (require, exports, module) {
353353
items.push(Strings.LIVE_PREVIEW_SYNC_SOURCE_AND_PREVIEW);
354354
}
355355

356-
// Only add edit highlight option if edit features are active
357-
if (isEditFeaturesActive) {
358-
if (!isNotPreviewMode) {
359-
items.push("---");
360-
}
356+
// Only add edit-specific options when in edit mode and edit features are active
357+
const isEditMode = currentMode === LiveDevelopment.CONSTANTS.LIVE_EDIT_MODE;
358+
if (isEditFeaturesActive && isEditMode) {
361359
items.push(Strings.LIVE_PREVIEW_EDIT_HIGHLIGHT_ON);
362360
items.push(Strings.LIVE_PREVIEW_SHOW_RULER_LINES);
363361
items.push(Strings.LIVE_PREVIEW_SHOW_SPACING_HANDLES);

0 commit comments

Comments
 (0)