Skip to content

Commit 36a78d0

Browse files
committed
fix: live preview highlight mode tests failing
1 parent e82a406 commit 36a78d0

2 files changed

Lines changed: 12 additions & 21 deletions

File tree

src/LiveDevelopment/BrowserScripts/RemoteFunctions.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -785,20 +785,20 @@ function RemoteFunctions(config = {}) {
785785
_clickHighlight.selector = rule;
786786
}
787787

788-
// Find and select the best element
789-
const { element, skipSelection } = findBestElementToSelect(nodes, rule);
788+
// In edit mode, select the best element and create temporary highlights for the rest.
789+
// In highlight mode, skip selection so all matching elements stay highlighted equally.
790+
if (config.mode === 'edit') {
791+
const { element, skipSelection } = findBestElementToSelect(nodes, rule);
790792

791-
if (!skipSelection) {
792-
if (element) {
793-
selectElement(element, true);
794-
} else {
795-
// No valid element found, dismiss UI
796-
dismissUIAndCleanupState();
793+
if (!skipSelection) {
794+
if (element) {
795+
selectElement(element, true);
796+
} else {
797+
// No valid element found, dismiss UI
798+
dismissUIAndCleanupState();
799+
}
797800
}
798-
}
799801

800-
// In edit mode, create temporary highlights AFTER selection to avoid clearing
801-
if (config.mode === 'edit') {
802802
createCssSelectorHighlight(nodes, rule);
803803
}
804804
}

src/nls/root/strings.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,7 @@ define({
269269
"LIVE_DEV_CB_TIP_BG_COLOR": "Background Color",
270270
"LIVE_DEV_CB_TIP_FONT": "Font",
271271
"LIVE_DEV_CB_TIP_TEXT_SPACING": "Text Spacing",
272-
"LIVE_DEV_CB_TIP_BORDER": "Border",
273-
"LIVE_DEV_CB_TIP_EFFECTS": "Effects",
272+
"LIVE_DEV_CB_TIP_APPEARANCE": "Border & Opacity",
274273
"LIVE_DEV_CB_TIP_LAYOUT": "Layout",
275274
"LIVE_DEV_CB_TIP_POSITION": "Position",
276275
"LIVE_DEV_CB_TIP_OBJECT_FIT": "Object Fit",
@@ -292,10 +291,6 @@ define({
292291
"LIVE_DEV_CB_LABEL_RADIUS": "Radius",
293292
"LIVE_DEV_CB_LABEL_COLOR": "Color",
294293
"LIVE_DEV_CB_LABEL_OPACITY": "Opacity",
295-
"LIVE_DEV_CB_LABEL_SHADOW_X": "X",
296-
"LIVE_DEV_CB_LABEL_SHADOW_Y": "Y",
297-
"LIVE_DEV_CB_LABEL_BLUR": "Blur",
298-
"LIVE_DEV_CB_LABEL_SPREAD": "Spread",
299294
"LIVE_DEV_CB_LABEL_DISPLAY": "Display",
300295
"LIVE_DEV_CB_LABEL_DIRECTION": "Direction",
301296
"LIVE_DEV_CB_LABEL_WRAP": "Wrap",
@@ -360,8 +355,6 @@ define({
360355
"LIVE_DEV_CB_LABEL_BORDER_BL": "BL",
361356
"LIVE_DEV_CB_PER_SIDE": "Per side",
362357
"LIVE_DEV_CB_PER_CORNER": "Per corner",
363-
"LIVE_DEV_CB_SHADOW_ADD": "Add Shadow",
364-
"LIVE_DEV_CB_SHADOW_INSET": "Inset",
365358
"LIVE_DEV_CB_COLOR_RECENT": "Recent",
366359
"LIVE_DEV_CB_COLOR_FROM_PAGE": "From page",
367360
"LIVE_DEV_CB_COLOR_SUGGESTED": "Suggested",
@@ -390,8 +383,6 @@ define({
390383
"LIVE_DEV_CB_ID_PLACEHOLDER": "none",
391384
"LIVE_DEV_CB_ALL_WEIGHTS": "All weights",
392385
"LIVE_DEV_CB_ALL_STYLES": "All styles",
393-
"LIVE_DEV_CB_SHADOW_LABEL": "Shadow",
394-
"LIVE_DEV_CB_SHADOW_REMOVE": "Remove",
395386
"LIVE_DEV_TOAST_NOT_EDITABLE": "Element not editable - generated by script",
396387
"LIVE_DEV_COPY_TOAST_MESSAGE": "Element copied. Use 'Paste' to add it after the selected element",
397388
"LIVE_DEV_TOAST_FIXED_ELEMENT_DISMISSED": "Element doesn't scroll with page - edit boxes hidden",

0 commit comments

Comments
 (0)