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

Add Layouts via AddElementMenu #375

Merged
merged 14 commits into from
Sep 19, 2023
Prev Previous commit
respond to comments
oshi97 committed Sep 19, 2023
commit e76db8ecf9d2969c19857fe8a09928578b0727e4
4 changes: 2 additions & 2 deletions e2e-tests/tests/infra/StudioPlaywrightPage.ts
Original file line number Diff line number Diff line change
@@ -183,15 +183,15 @@ export default class StudioPlaywrightPage {

async addElement(
elementName: string,
category: "Components" | "Containers",
category: "Components" | "Containers" | "Layouts",
shouldTakeScreenshots = true
) {
await this.openAddElementMenu(category, shouldTakeScreenshots);
await this.getAddElementLocator(elementName).click();
}

async openAddElementMenu(
category: "Components" | "Containers" = "Components",
category: "Components" | "Containers" | "Layouts" = "Components",
shouldTakeScreenshots = false
) {
const takeScreenshot = () =>
1 change: 0 additions & 1 deletion packages/studio/src/store/slices/createLayoutSlice.ts
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@ import { SliceCreator } from "../models/utils";
import removeTopLevelFragments from "../../utils/removeTopLevelFragments";

const createLayoutSlice: SliceCreator<LayoutSlice> = () => ({
// TODO (SLAP-2930): Remove top-level fragments from layouts
layoutNameToLayoutState: removeTopLevelFragments(
initialStudioData.layoutNameToLayoutState
),