Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 6 additions & 2 deletions apps/roam/src/data/blockPropsSettingsConfig.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
export const DG_BLOCK_PROP_SETTINGS_PAGE_TITLE ="roam/js/discourse-graph/block-prop-settings";
export const TOP_LEVEL_BLOCK_PROP_KEYS = { featureFlags: "Feature Flags" };
export const DG_BLOCK_PROP_SETTINGS_PAGE_TITLE =
"roam/js/discourse-graph/block-prop-settings";
export const TOP_LEVEL_BLOCK_PROP_KEYS = {
featureFlags: "Feature Flags",
global: "Global",
};
11 changes: 11 additions & 0 deletions apps/roam/src/utils/zodSchemaForSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ import { z } from "zod";
export const FeatureFlagsSchema = z.object({
"Enable Left Sidebar": z.boolean().default(false),
});

export const GlobalSettingsSchema = z.object({
"Left Sidebar": z.object({
Children: z.array(z.string()),
Settings: z.object({
Foldable: z.boolean(),
"Truncate at": z.number().int(),
}),
}),
});
/* eslint-disable @typescript-eslint/naming-convention */

export type FeatureFlags = z.infer<typeof FeatureFlagsSchema>;
export type GlobalSettings = z.infer<typeof GlobalSettingsSchema>;