Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
6 changes: 3 additions & 3 deletions apps/builder/app/builder/features/pages/pages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ const PagesTree = ({
useReparentOrphans();

if (pages === undefined) {
return null;
return;
}

return (
Expand Down Expand Up @@ -342,7 +342,7 @@ const PagesTree = ({
return (
<TreeSortableItem
key={item.id}
level={item.level}
level={item.level - 1}
isExpanded={item.isExpanded}
isLastChild={item.isLastChild}
data={item}
Expand Down Expand Up @@ -392,7 +392,7 @@ const PagesTree = ({
}}
>
<TreeNode
level={item.level}
level={item.level - 1}
tabbable={index === 0}
isSelected={item.id === selectedPageId}
isHighlighted={dropTarget?.parentId === item.id}
Expand Down
3 changes: 1 addition & 2 deletions packages/design-system/src/components/tree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ const treeActionOpacity = "--tree-action-opacity";
const treeDepthBarsVisibility = "--tree-depth-bars-visibility";
const treeDepthBarsColor = "--tree-depth-bars-color";

const ITEM_HEIGHT = 32;
const ITEM_PADDING_LEFT = 8;
// extra padding on the right to make sure scrollbar doesn't obscure anything
const ITEM_PADDING_RIGHT = 10;
Expand Down Expand Up @@ -95,7 +94,7 @@ export const TreeRoot = ({ children }: { children: ReactNode }) => {

const NodeContainer = styled("div", {
position: "relative",
height: ITEM_HEIGHT,
height: theme.sizes.controlHeight,
"&:hover, &:has(:focus-visible), &:has([aria-current=true])": {
[treeNodeBackgroundColor]: theme.colors.backgroundHover,
backgroundColor: `var(${treeNodeBackgroundColor})`,
Expand Down