Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
738ee96
feat: add import slices
levimykel Nov 5, 2025
fc1b3dc
Merge remote-tracking branch 'origin/main' into lg/import-slices
jomifepe Nov 24, 2025
8f18284
feat: empty menu
jomifepe Nov 24, 2025
5c333d9
feat: 🤖
jomifepe Dec 1, 2025
da0e717
feat: progress
jomifepe Dec 1, 2025
12f7e0c
feat: endpoint definition
jomifepe Dec 3, 2025
3a1d1b8
refactor: rename
jomifepe Dec 3, 2025
ac2f79f
feat: button label
jomifepe Dec 3, 2025
03f08b6
Merge remote-tracking branch 'origin/jp/import-slice-base' into jp/im…
jomifepe Dec 18, 2025
46f24a2
fix: types
jomifepe Dec 18, 2025
ea3d0d6
refactor: cleanup
jomifepe Dec 18, 2025
ae5135c
Merge remote-tracking branch 'origin/jp/import-slice-base' into jp/im…
jomifepe Dec 18, 2025
5904598
refactor: cleanup for review
jomifepe Dec 18, 2025
4478ee7
feat: add select all checkbox back
jomifepe Dec 18, 2025
2864a34
refactor: revert unwanted change
jomifepe Dec 18, 2025
df8807d
refactor: revert unwanted change
jomifepe Dec 18, 2025
dd301f1
feat: remove from slices page
jomifepe Dec 18, 2025
4767da7
feat: same grid and reset tab
jomifepe Dec 18, 2025
52a3764
feat: scroll area
jomifepe Dec 18, 2025
1dc9936
refactor: remove unwanted change
jomifepe Dec 18, 2025
5c59665
fix: update success message and fix e2e
jomifepe Dec 19, 2025
f307d72
fix: remove protected
jomifepe Dec 19, 2025
158e5ee
refactor: separate logic
jomifepe Dec 22, 2025
edb1960
refactor: cleanup
jomifepe Dec 22, 2025
53bd4d3
refactor: tests
jomifepe Dec 22, 2025
b70d59a
refactor: shorten
jomifepe Dec 22, 2025
24b5142
fix: onSuccess
jomifepe Dec 22, 2025
e07266c
refactor: cleanup
jomifepe Dec 22, 2025
3dd9d1d
chore: cleanup
jomifepe Dec 22, 2025
264616a
refactor: remove unnecessary code
jomifepe Dec 22, 2025
731747b
refactor: duplicate toasts
jomifepe Dec 22, 2025
d049910
fix: lost commit
jomifepe Dec 22, 2025
d155263
refactor: cleanup
jomifepe Dec 22, 2025
2f6a88b
fix: use conflictFreeSlices
jomifepe Dec 22, 2025
e95676a
fix: mock parsing
jomifepe Dec 24, 2025
b803f8d
chore: lint
jomifepe Dec 24, 2025
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 packages/slice-machine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
"@emotion/react": "11.11.1",
"@extractus/oembed-extractor": "3.1.8",
"@prismicio/client": "7.17.0",
"@prismicio/editor-fields": "0.4.88",
"@prismicio/editor-support": "0.4.88",
"@prismicio/editor-ui": "0.4.88",
"@prismicio/editor-fields": "0.4.89-alpha.jp-box-display-none.1",
"@prismicio/editor-support": "0.4.89-alpha.jp-box-display-none.1",
"@prismicio/editor-ui": "0.4.89-alpha.jp-box-display-none.1",
"@prismicio/mock": "0.7.1",
"@prismicio/mocks": "2.14.0",
"@prismicio/simulator": "0.1.4",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import {
DialogActionButton,
DialogActions,
DialogCancelButton,
} from "@prismicio/editor-ui";

import { CommonDialogProps } from "./types";

type DialogButtonsProps = {
totalSelected: number;
isSubmitting?: boolean;
onSubmit: () => void | Promise<void>;
typeName: CommonDialogProps["typeName"];
};

export function DialogButtons(props: DialogButtonsProps) {
const { totalSelected, onSubmit, isSubmitting, typeName } = props;

return (
<DialogActions>
<DialogCancelButton disabled={isSubmitting} size="medium" />
<DialogActionButton
disabled={totalSelected === 0}
loading={isSubmitting}
onClick={() => void onSubmit()}
size="medium"
>
Add to {typeName} ({totalSelected})
</DialogActionButton>
</DialogActions>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { Box } from "@prismicio/editor-ui";
import { ReactNode } from "react";

interface DialogContentProps {
children: ReactNode;
selected: boolean;
}

export function DialogContent(args: DialogContentProps) {
const { children, selected } = args;

if (!selected) {
return (
<Box display="none" minHeight={0}>
{children}
</Box>
);
}

return (
<Box display="flex" flexDirection="column" flexGrow={1} minHeight={0}>
{children}
</Box>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { Box, Tab } from "@prismicio/editor-ui";
import { ReactNode } from "react";

import { DialogTab } from "./types";

interface DialogTabsProps {
selectedTab: DialogTab;
onSelectTab: (tab: DialogTab) => void;
rightContent?: ReactNode;
}

export function DialogTabs(props: DialogTabsProps) {
const { selectedTab, onSelectTab, rightContent } = props;

return (
<Box justifyContent="space-between" padding={16} border={{ bottom: true }}>
<Box gap={8}>
<Tab
selected={selectedTab === "local"}
onClick={() => onSelectTab("local")}
>
Local Slices
</Tab>
<Tab
selected={selectedTab === "library"}
onClick={() => onSelectTab("library")}
>
Library Slices
</Tab>
</Box>
{rightContent}
</Box>
);
}
Loading
Loading