Skip to content

Commit

Permalink
Fix a few issues in widget selection
Browse files Browse the repository at this point in the history
  • Loading branch information
riodeuno committed May 3, 2024
1 parent bea3cc1 commit a94a7ad
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ export function useAddBordersToDetachedWidgets(
if (element) {
element.style.outlineOffset = borderStyled.outlineOffset ?? "unset";
element.style.outline = borderStyled.outline ?? "none";
element.style.borderRadius = borderStyled.borderRadius ?? "unset";
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export function useWidgetBorderStyles(widgetId: string, widgetType: string) {
let borderColor = "transparent";
let borderWidth = "var(--on-canvas-ui-border-width-2)";
// If widget is focused, use the thin borders
if (isFocused) {
if (isFocused && !isSelected) {
borderColor = `var(${onCanvasUI.selectionBGCSSVar})`;
borderWidth = "var(--on-canvas-ui-border-width-1)";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
} from "layoutSystems/anvil/common/messages";
import { createMessage } from "@appsmith/constants/messages";
import { debugWidget } from "layoutSystems/anvil/integrations/actions";
import { useDispatch } from "react-redux";

/**
*
Expand Down Expand Up @@ -36,6 +37,7 @@ export function _AnvilWidgetNameComponent(
},
ref: ForwardedRef<HTMLDivElement>,
) {
const dispatch = useDispatch();
const { parentId } = props;

/** Widget Selection Handlers */
Expand All @@ -49,7 +51,7 @@ export function _AnvilWidgetNameComponent(
}, [props.widgetId]);

const handleDebugClick = useCallback(() => {
debugWidget(props.widgetId);
dispatch(debugWidget(props.widgetId));
}, [props.widgetId]);
/** EO Widget Selection Handlers */

Expand Down

0 comments on commit a94a7ad

Please sign in to comment.