feat(onboarding): polish setup experience
This commit is contained in:
1 parent
f4891447d3
commit
4ca02a9133
34 files changed
+1005
-1172
No files matched your search
@@ -102,4 +102,28 @@ describe("onboarding URL validation", () => {
|
||||
onboardingCompleteSetupSchema.safeParse({ ...input, selectedDockerSourceIds: ["x".repeat(513)] }).success,
|
||||
).toBe(false);
|
||||
});
|
||||
|
||||
test("accepts board column counts from 8 through 24", () => {
|
||||
const input = {
|
||||
server: { defaultLocale: "en", defaultColorScheme: "dark" },
|
||||
board: {
|
||||
name: "dashboard",
|
||||
primaryColor: "#228BE6",
|
||||
secondaryColor: "#15AABF",
|
||||
itemRadius: "md",
|
||||
columnCount: 8,
|
||||
},
|
||||
};
|
||||
|
||||
expect(onboardingCompleteSetupSchema.safeParse(input).success).toBe(true);
|
||||
expect(
|
||||
onboardingCompleteSetupSchema.safeParse({ ...input, board: { ...input.board, columnCount: 24 } }).success,
|
||||
).toBe(true);
|
||||
expect(
|
||||
onboardingCompleteSetupSchema.safeParse({ ...input, board: { ...input.board, columnCount: 7 } }).success,
|
||||
).toBe(false);
|
||||
expect(
|
||||
onboardingCompleteSetupSchema.safeParse({ ...input, board: { ...input.board, columnCount: 25 } }).success,
|
||||
).toBe(false);
|
||||
});
|
||||
});
|
||||
@@ -85,6 +85,7 @@ export const onboardingCompleteSetupSchema = z
|
||||
secondaryColor: hexColorSchema,
|
||||
itemRadius: z.enum(["xs", "sm", "md", "lg", "xl"]),
|
||||
layoutPreset: z.enum(onboardingLayoutPresets).default("balanced"),
|
||||
columnCount: z.number().int().min(8).max(24).optional(),
|
||||
leftSidebar: z.boolean().default(false),
|
||||
rightSidebar: z.boolean().default(false),
|
||||
}),
|
||||
|
||||
Reference in new issue
Block a user