Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor UX fixes #1844

Merged
merged 1 commit into from
Mar 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const NodeHudWrapper = styled('div', {
position: 'absolute',
userSelect: 'none',
outline: `1px dotted ${isOutlineVisible ? theme.palette.primary[500] : 'transparent'}`,
zIndex: 2,
zIndex: 80,
'&:hover': {
outline: `2px dashed ${isHoverable ? 'transparent' : theme.palette.primary[500]}`,
},
Expand All @@ -53,7 +53,7 @@ const NodeHudWrapper = styled('div', {
outline: `2px solid ${theme.palette.primary[500]}`,
left: 0,
top: 0,
zIndex: 2,
zIndex: 80,
},
[`&.${nodeHudClasses.allowNodeInteraction}`]: {
// block pointer-events so we can interact with the selection
Expand Down Expand Up @@ -90,7 +90,7 @@ const SelectionHintWrapper = styled('div', {
const DraggableEdgeWrapper = styled('div')({
userSelect: 'none',
position: 'absolute',
zIndex: 3,
zIndex: 90,
});

const DraggableEdge = styled('div', {
Expand Down Expand Up @@ -131,14 +131,14 @@ const DraggableEdge = styled('div', {
...dynamicStyles,
position: 'absolute',
pointerEvents: 'initial',
zIndex: 3,
zIndex: 90,
};
});

const ResizePreview = styled('div')(({ theme }) => ({
backgroundColor: theme.palette.primary[500],
opacity: 0.2,
zIndex: 3,
zIndex: 90,
}));

interface NodeHudProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import {
RECTANGLE_EDGE_TOP,
rectContainsPoint,
} from '../../../../utils/geometry';
import { omit } from '../../../../utils/immutability';
import NodeHud from './NodeHud';
import { OverlayGrid, OverlayGridHandle } from './OverlayGrid';
import { NodeInfo } from '../../../../types';
Expand Down Expand Up @@ -1267,7 +1268,7 @@ export default function RenderOverlay({ bridge }: RenderOverlayProps) {
return normalizePageRowColumnSizes(draft);
},
currentView.kind === 'page'
? { ...currentView, selectedNodeId: newNode?.id || draggedNodeId }
? { ...omit(currentView, 'tab'), selectedNodeId: newNode?.id || draggedNodeId }
: currentView,
);

Expand Down Expand Up @@ -1580,7 +1581,7 @@ export default function RenderOverlay({ bridge }: RenderOverlayProps) {
const isPageColumnChild = parent ? appDom.isElement(parent) && isPageColumn(parent) : false;

const isSelected = selectedNode && !newNode ? selectedNode.id === node.id : false;
const isInteractive = interactiveNodes.has(node.id) && !draggedEdge;
const isInteractive = interactiveNodes.has(node.id) && !draggedNode && !draggedEdge;

const isHorizontallyResizable = isSelected && (isPageRowChild || isPageColumnChild);
const isVerticallyResizable =
Expand Down