Skip to content

Automate browser based workflows with AI

style: align block picker padding (SKY-11595) (#6991)

Aaron Perez542dcc5dd4af
diff --git a/skyvern-frontend/src/routes/workflows/editor/panels/BlockConfigSidebar.test.tsx b/skyvern-frontend/src/routes/workflows/editor/panels/BlockConfigSidebar.test.tsx
index 3c4336751..9027a6861 100644
--- a/skyvern-frontend/src/routes/workflows/editor/panels/BlockConfigSidebar.test.tsx
+++ b/skyvern-frontend/src/routes/workflows/editor/panels/BlockConfigSidebar.test.tsx
@@ -237,6 +237,23 @@ describe("BlockConfigSidebar mount stability (SKY-9360)", () => {
expect(stub.getAttribute("data-block-type")).toBe("task");
expect(stub.getAttribute("data-block-id")).toBe("block-a");
});
+
+ test("block-config body uses px-6 py-5 padding", () => {
+ act(() => {
+ useWorkflowPanelStore.getState().setSelectedBlockId("block-a");
+ });
+
+ render(
+ <MemoryRouter initialEntries={["/workflows/wpid_abc/edit"]}>
+ <BlockConfigSidebar />
+ </MemoryRouter>,
+ );
+
+ const body = screen.getByTestId("block-config-sidebar-body");
+
+ expect(body.className).toContain("px-6");
+ expect(body.className).toContain("py-5");
+ });
});
describe("BlockConfigSidebar footer label", () => {
@@ -397,6 +414,26 @@ describe("BlockConfigSidebar block library layout (contained drawer)", () => {
expect(panel).not.toBeNull();
expect(panel?.className).toContain("w-full");
});
+
+ test("block-library body uses px-6 py-5 padding", () => {
+ act(() => {
+ useWorkflowPanelStore.getState().setWorkflowPanelState({
+ active: true,
+ content: "nodeLibrary",
+ });
+ });
+
+ render(
+ <MemoryRouter initialEntries={["/workflows/wpid_abc/edit"]}>
+ <BlockConfigSidebar />
+ </MemoryRouter>,
+ );
+
+ const body = screen.getByTestId("block-library-sidebar-body");
+
+ expect(body.className).toContain("px-6");
+ expect(body.className).toContain("py-5");
+ });
});
describe("BlockConfigSidebar block title editing (SKY-10255)", () => {
diff --git a/skyvern-frontend/src/routes/workflows/editor/panels/BlockConfigSidebar.tsx b/skyvern-frontend/src/routes/workflows/editor/panels/BlockConfigSidebar.tsx
index c53fb097a..7613bbcd0 100644
--- a/skyvern-frontend/src/routes/workflows/editor/panels/BlockConfigSidebar.tsx
+++ b/skyvern-frontend/src/routes/workflows/editor/panels/BlockConfigSidebar.tsx
@@ -277,7 +277,10 @@ function BlockConfigSidebarBody({
<Cross2Icon className="h-4 w-4" />
</button>
</header>
- <div className="flex-1 overflow-y-auto px-5 py-4">
+ <div
+ data-testid="block-config-sidebar-body"
+ className="flex-1 overflow-y-auto px-6 py-5"
+ >
<BlockConfigForm blockId={selectedBlockId} />
</div>
<UpdatedAgoFooter blockId={selectedBlockId} />
@@ -317,7 +320,10 @@ function BlockLibrarySidebarBody({
<Cross2Icon className="h-4 w-4" />
</button>
</header>
- <div className="flex min-h-0 flex-1 overflow-hidden px-5 py-4">
+ <div
+ data-testid="block-library-sidebar-body"
+ className="flex min-h-0 flex-1 overflow-hidden px-6 py-5"
+ >
<WorkflowNodeLibraryPanel onNodeClick={onAddNode} />
</div>
</>