Skip to content

Commit f4a5d0c

Browse files
committed
Merge branch 'dev' into feature/2132-workflow-status
2 parents 6acaa93 + ec07673 commit f4a5d0c

File tree

46 files changed

+2387
-1101
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+2387
-1101
lines changed

cypress/e2e/settings/actions.spec.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ describe("Settings Actions", () => {
2222
cy.get("[data-cy=SubApp] .MuiSelect-select").first().click();
2323
cy.get(".MuiList-root li[aria-selected=false]").last().click();
2424
cy.get("#SaveSettings").click();
25-
cy.contains(SAVED_MESSAGE).should("exist");
25+
cy.get('[data-cy="ConfirmSaveSettings"]').should("exist");
26+
cy.get('[data-cy="ConfirmSaveSettings"]').click();
27+
cy.contains(SAVED_MESSAGE, { matchCase: false, timeout: 15_000 }).should(
28+
"exist"
29+
);
2630
});
2731

2832
// skipping flakey test in preparation for CI

cypress/e2e/settings/instance.spec.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ describe("Instance", () => {
1010
it("General", () => {
1111
cy.get("[data-cy=SubApp] textarea").first().clear().type("example");
1212

13-
cy.get("#saveSettings").click();
13+
cy.get("#SaveSettings").click();
14+
cy.get('[data-cy="ConfirmSaveSettings"]').should("exist");
15+
cy.get('[data-cy="ConfirmSaveSettings"]').click();
1416

1517
cy.contains(SAVED_MESSAGE).should("exist");
1618
});
@@ -26,9 +28,10 @@ describe("Instance", () => {
2628
.type("test test test")
2729
.clear();
2830

29-
cy.get("#saveSettings").click({ force: true });
30-
31-
cy.get("#saveSettings").click({ force: true });
31+
cy.get("#SaveSettings").should("exist");
32+
cy.get("#SaveSettings").click();
33+
cy.get('[data-cy="ConfirmSaveSettings"]').should("exist");
34+
cy.get('[data-cy="ConfirmSaveSettings"]').click();
3235
cy.contains(SAVED_MESSAGE).should("exist");
3336
});
3437

@@ -40,7 +43,9 @@ describe("Instance", () => {
4043
.click();
4144
cy.get("[data-cy=SubApp] input").last().type("[email protected]");
4245

43-
cy.get("#saveSettings").click();
46+
cy.get("#SaveSettings").click();
47+
cy.get('[data-cy="ConfirmSaveSettings"]').should("exist");
48+
cy.get('[data-cy="ConfirmSaveSettings"]').click();
4449
cy.contains(SAVED_MESSAGE).should("exist");
4550
});
4651

src/apps/blocks/views/AllBlocks.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ export const AllBlocks = () => {
220220
{showCreateModelDialogue && (
221221
<CreateModelDialogue
222222
modelType="block"
223+
typeIsSet={true}
223224
onClose={() => setShowCreateModelDialogue(false)}
224225
/>
225226
)}

src/apps/code-editor/src/app/components/BottomDrawer/FileCard.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const FileCard: React.FC<FileCardProps> = ({
3131
sx={{
3232
boxSizing: "border-box",
3333
// Temporary: will be updated once the design is final
34-
bgcolor: "#2f2f2f",
34+
bgcolor: "#0D1116",
3535
color: "grey.400",
3636
width: "100%",
3737
px: 2,
@@ -68,6 +68,7 @@ const FileCard: React.FC<FileCardProps> = ({
6868
flexGrow={0}
6969
width="100%"
7070
boxSizing="border-box"
71+
overflow="hidden"
7172
>
7273
<Box
7374
component={Icon}
@@ -76,9 +77,11 @@ const FileCard: React.FC<FileCardProps> = ({
7677
<Typography
7778
variant="h6"
7879
color="grey.300"
80+
width="100%"
7981
sx={{
8082
pl: "35px",
8183
boxSizing: "border-box",
84+
wordWrap: "break-word",
8285
}}
8386
>
8487
{title}

src/apps/code-editor/src/app/components/BottomDrawer/FileStatus.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import FlashOnIcon from "@mui/icons-material/FlashOn";
66
import { FileCard, FileCardListItem } from "./FileCard";
77
import { List, Divider } from "@mui/material";
88
import { Link as RouterLink } from "react-router-dom";
9-
import { NavCodeTypes } from "../SideBar/constants";
109
import Typography from "@mui/material/Typography";
1110
import Link from "@mui/material/Link";
11+
import { NavCodeTypes } from "../constants";
1212
interface ItemWeb {
1313
path: string;
1414
}

src/apps/code-editor/src/app/components/BottomDrawer/LinkedContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import EditIcon from "@mui/icons-material/Edit";
33
import { FileCard, FileCardListItem } from "./FileCard";
44
import { NavLink } from "react-router-dom";
55
import VisibilityIcon from "@mui/icons-material/Visibility";
6-
import { NavCodeTypes } from "../SideBar/constants";
76
import LaunchIcon from "@mui/icons-material/Launch";
7+
import { NavCodeTypes } from "../constants";
88

99
interface Meta {
1010
ZUID: string;

src/apps/code-editor/src/app/components/BottomDrawer/LinkedSchema.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import StorageIcon from "@mui/icons-material/Storage";
21
import Link from "@mui/material/Link";
32
import { List, Typography, Divider } from "@mui/material";
43
import { FileCardListItem, FileCard } from "./FileCard";
5-
import { NavCodeTypes } from "../SideBar/constants";
64
import { Database } from "@zesty-io/material";
5+
import { NavCodeTypes } from "../constants";
76

87
interface Field {
98
ZUID: string;

src/apps/code-editor/src/app/components/BottomDrawer/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { fetchFields } from "../../../../../../shell/store/fields";
1414
import { fetchAuditTrail } from "../../../store/auditTrail";
1515
import { useMetaKey } from "../../../../../../shell/hooks/useMetaKey";
1616
import { fetchItems } from "../../../../../../shell/store/content";
17-
import { NavCodeTypes } from "../SideBar/constants";
17+
import { NavCodeTypes } from "../constants";
1818

1919
interface Field {
2020
ZUID: string;
@@ -157,7 +157,7 @@ const BottomDrawer = memo(function BottomDrawer({ file }: BottomDrawerProps) {
157157
bgcolor="background.editor"
158158
color="grey.300"
159159
height="40vh"
160-
sx={{ overflowY: "auto", bgcolor: "background.editor" }}
160+
sx={{ overflowY: "auto" }}
161161
>
162162
<WithLoader
163163
condition={!loading}

src/apps/code-editor/src/app/components/SideBar/CreateFile.tsx renamed to src/apps/code-editor/src/app/components/CreateFile.tsx

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ import {
1515
} from "@mui/material";
1616
import LoadingButton from "@mui/lab/LoadingButton";
1717
import CloseIcon from "@mui/icons-material/Close";
18-
import { createFile, fetchFiles } from "../../../store/files";
19-
import { notify } from "../../../../../../shell/store/notifications";
18+
2019
import { fileTypeOptions, scripts, stylesheets } from "./constants";
20+
import { notify } from "../../../../../shell/store/notifications";
21+
import { createFile, fetchFiles } from "../../store/files";
2122

2223
export type CreateFileProps = {
2324
open: boolean;
@@ -75,25 +76,14 @@ const CreateFile = memo(function CreateFile({
7576
}
7677

7778
setLoading(true);
78-
79-
dispatch(createFile(name, type) as any)
79+
let redirectPage = "";
80+
Promise.resolve(dispatch(createFile(name, type)))
8081
.then((res: any) => {
81-
if (res.status === 201) {
82+
if (!res?.error) {
8283
history.push(`/code/file/${res.pathPart}/${res.data.ZUID}`);
83-
84-
const fileType = scripts.includes(type)
85-
? "scripts"
86-
: stylesheets?.includes(type)
87-
? "stylesheets"
88-
: "views";
89-
90-
dispatch(fetchFiles(fileType));
9184
handleClearForm();
9285
}
9386
})
94-
.catch((err: any) => {
95-
console.error(err);
96-
})
9787
.finally(() => {
9888
setLoading(false);
9989
onClose();

src/apps/code-editor/src/app/components/Differ/Differ.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export const Differ = memo(
3939
isLoading={loading}
4040
synced={props?.synced}
4141
code={props?.currentCode}
42+
icon={props.icon}
4243
isDiffer={true}
4344
/>
4445
<Box

0 commit comments

Comments
 (0)