Skip to content

Commit fffeab4

Browse files
authored
Merge pull request #353 from code0-tech/feat/general-fixes
General fixes
2 parents 420f94b + 61fe1fa commit fffeab4

30 files changed

Lines changed: 237 additions & 165 deletions

.env.local

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ PLAYGROUND_MOCK_DIR=#./mock
88
PLAYGROUND_FRAME_ANCESTORS=#"'self'"
99

1010
NEXT_PUBLIC_SCULPTOR_VERSION=0.0.0
11-
NEXT_PUBLIC_PICTOR_VERSION=0.17.1
11+
NEXT_PUBLIC_PICTOR_VERSION=0.18.0
1212
NEXT_PUBLIC_ALLOWED_REDIRECT_DOMAINS=*.code0.tech,*.codezero.build
1313
NEXT_PUBLIC_SUBSCRIPTION_URL=https://codezero.build/subscription
1414

next.config.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,17 @@ const nextConfig: NextConfig = {
4444
// per-file Babel pass (the compiler is a Babel plugin) which is the
4545
// dominant cost of Turbopack dev compile time and memory here.
4646
reactCompiler: process.env.NODE_ENV === "production",
47+
// Rewrite barrel imports from the code0 UI packages into direct submodule
48+
// imports. Without this, each of the ~186 files importing from
49+
// "@code0-tech/pictor" pulls the entire dist/index.js barrel (~364 modules)
50+
// into that route's Turbopack compile graph. This is the dominant dev
51+
// compile cost. date-fns/lodash/@radix-ui are already optimized by default.
52+
experimental: {
53+
optimizePackageImports: [
54+
"@code0-tech/pictor",
55+
"@code0-tech/triangulum",
56+
],
57+
},
4758
turbopack: {
4859
resolveAlias: {
4960
"@edition": path.resolve(__dirname, `src/packages/${EDITION}/src`),

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
},
1717
"dependencies": {
1818
"@apollo/client": "^4.0.9",
19-
"@code0-tech/pictor": "^0.17.1",
19+
"@code0-tech/pictor": "^0.18.0",
2020
"@code0-tech/triangulum": "^0.33.0",
2121
"@code0-tech/tucana": "^0.0.82",
2222
"@codemirror/lang-javascript": "^6.2.5",

src/app/(dashboard)/layout.tsx

Lines changed: 53 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import React from "react";
44
import {useApolloClient} from "@apollo/client/react";
5-
import {ContextStoreProvider} from "@code0-tech/pictor";
5+
import {AuroraBackground, ContextStoreProvider} from "@code0-tech/pictor";
66
import {UserService} from "@edition/user/services/User.service";
77
import {GraphqlClient} from "@core/util/graphql-client";
88
import {useParams, usePathname} from "next/navigation";
@@ -20,12 +20,14 @@ import {RoleView} from "@edition/role/services/Role.view";
2020
import {Layout} from "@code0-tech/pictor/dist/components/layout/Layout";
2121
import {
2222
DataType,
23-
Flow, FlowType,
23+
Flow,
24+
FlowType,
2425
FunctionDefinition,
2526
Namespace,
2627
NamespaceMember,
2728
NamespaceProject,
28-
Runtime, RuntimeModule,
29+
Runtime,
30+
RuntimeModule,
2931
User
3032
} from "@code0-tech/sagittarius-graphql-types";
3133
import {ApplicationMiddlewareComponent} from "@edition/application/components/ApplicationMiddlewareComponent";
@@ -93,20 +95,56 @@ const ApplicationLayout: React.FC<ApplicationLayoutProps> = ({children, sidebar,
9395
services={[application, user, organization, member, namespace, runtime, project, role, flow, functions, datatype, flowtype, module, ai]}>
9496
<ApplicationMiddlewareComponent>
9597
<MfaProviderComponent>
96-
<FullScreen bg={"var(--secondary)"}>
97-
<Layout p={1} showLayoutSplitter={false} layoutGap={32} leftContent={<ApplicationNavigationView/>}>
98-
<Layout showLayoutSplitter={false} layoutGap={32} leftContent={<div style={{
98+
<FullScreen bg={"var(--primary)"}>
99+
<div style={{
100+
position: "absolute",
101+
top: 0,
102+
left: 0,
103+
width: "100%",
104+
transform: "scaleX(-1)",
105+
height: "50%",
106+
opacity: "0.25"
107+
}}>
108+
<div style={{
109+
position: "absolute",
110+
top: "0",
111+
left: 0,
112+
width: "100%",
113+
height: "100%",
114+
background: "radial-gradient(circle at top right,rgba(25, 24, 37, 0) 0%, var(--primary) 35%)",
115+
zIndex: "1",
116+
WebkitBackdropFilter: "blur(5rem)",
117+
}}/>
118+
<AuroraBackground/>
119+
120+
</div>
121+
122+
<div style={{
123+
position: "absolute",
124+
top: 0,
125+
right: 0,
126+
width: "100%",
127+
transform: "",
99128
height: "100%",
100-
boxSizing: "border-box",
101-
maxWidth: "20vw"
102-
}}>{sidebar}</div>}>
103-
<>
104-
{children}
105-
{modal}
106-
</>
129+
opacity: "0.25",
130+
filter: "blur(5rem)",
131+
}}>
132+
<AuroraBackground/>
133+
134+
</div>
135+
<Layout p={1} showLayoutSplitter={false} layoutGap={32} leftContent={<ApplicationNavigationView/>}>
136+
<Layout showLayoutSplitter={false} layoutGap={32} leftContent={<div style={{
137+
height: "100%",
138+
boxSizing: "border-box",
139+
maxWidth: "20vw"
140+
}}>{sidebar}</div>}>
141+
<>
142+
{children}
143+
{modal}
144+
</>
145+
</Layout>
107146
</Layout>
108-
</Layout>
109-
</FullScreen>
147+
</FullScreen>
110148
</MfaProviderComponent>
111149
</ApplicationMiddlewareComponent>
112150
</ContextStoreProvider>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import {ModulesPage} from "@ce-internal/module/pages/ModulesPage";
1+
import {ModuleOverviewPage} from "@edition/module/pages/ModuleOverviewPage";
22

3-
export default ModulesPage
3+
export default ModuleOverviewPage

src/app/global.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ a {
2121
}
2222

2323
.scroll-area__viewport > div {
24-
display: block !important;
2524
height: 100%;
2625
}
2726

src/packages/ce/src/ai/components/AIChatComponent.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
EditorInputValue,
88
EditorTokenRule,
99
Flex, getSize,
10-
Progress,
10+
ProgressLinear,
1111
SelectContent,
1212
SelectItem,
1313
SelectItemText,
@@ -309,7 +309,7 @@ export const AIChatComponent: React.FC<AIChatComponentProps> = (props) => {
309309
<Text>
310310
Upgrade your license to increase your AI usage limit
311311
</Text>
312-
<Progress w={"100px"} h={"7.5px"} value={0} max={100}
312+
<ProgressLinear w={"100px"} h={"7.5px"} value={0} max={100}
313313
color={"#70ffb2"}/>
314314
</Flex>
315315
) : (

src/packages/ce/src/application/components/ApplicationAttentionFlowsComponent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export const ApplicationAttentionFlowsComponent: React.FC<ApplicationAttentionFl
100100

101101
const count = attentionFlows.length
102102

103-
return <Card color={"secondary"} clickable onClick={() => setOpen(previous => !previous)}>
103+
return <Card color={"secondary"} paddingSize={"lg"} clickable onClick={() => setOpen(previous => !previous)}>
104104
<Flex align={"center"} justify={"space-between"} style={{gap: "0.75rem"}}>
105105
<Flex align={"center"} style={{gap: "0.75rem", minWidth: 0}}>
106106
<IconPointFilled size={16} color={"#FFBE0B"} style={{flexShrink: 0}}/>

src/packages/ce/src/application/pages/ApplicationPage.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,13 @@ import {ApplicationAttentionFlowsComponent} from "@edition/application/component
1313

1414
export const ApplicationPage = () => {
1515
return <div style={{
16-
background: "var(--primary)",
1716
height: "100%",
1817
position: "relative",
1918
boxSizing: "border-box",
20-
borderRadius: "1rem"
2119
}}>
2220
<ScrollArea h={"100%"} type={"scroll"}>
2321
<ScrollAreaViewport>
24-
<div style={{maxWidth: "52rem", margin: "0 auto", padding: "4rem 1rem"}}>
22+
<div style={{maxWidth: "52rem", margin: "0 auto", padding: "1rem 1rem"}}>
2523
<ApplicationStatsView/>
2624
<Spacing spacing={"xl"}/>
2725
<ApplicationAttentionFlowsComponent/>

0 commit comments

Comments
 (0)