From da606cd9b87cd22e9c8d80beab378e61bee1e9bc Mon Sep 17 00:00:00 2001 From: Mathias Jakobsen Date: Wed, 6 Dec 2023 12:20:30 +0000 Subject: [PATCH] Merge pull request #16141 from overleaf/mj-review-panel-storybook-fix [storybook] Stub review panel data to get storybook to load GitOrigin-RevId: 2a270f6962132e3ffe09af8d6c5809f862b5fbe9 --- .../source-editor/source-editor.stories.tsx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/services/web/frontend/stories/source-editor/source-editor.stories.tsx b/services/web/frontend/stories/source-editor/source-editor.stories.tsx index 749a1aaae9..e8dec5d9d3 100644 --- a/services/web/frontend/stories/source-editor/source-editor.stories.tsx +++ b/services/web/frontend/stories/source-editor/source-editor.stories.tsx @@ -54,6 +54,17 @@ const settings = { syntaxValidation: false, } +const reviewPanel = { + resolvedComments: {}, + formattedProjectMembers: {}, + overview: { docsCollapsedState: { 'story-doc': false } }, + entries: {}, +} + +const permissions = { + write: true, +} + export const Latex = (args: any, { globals: { theme } }: any) => { useScope({ editor: { @@ -87,6 +98,8 @@ export const Latex = (args: any, { globals: { theme } }: any) => { ...settings, overallTheme: theme === 'default-' ? '' : theme, }, + permissions, + reviewPanel, }) useMeta({ @@ -106,6 +119,8 @@ export const Markdown = (args: any, { globals: { theme } }: any) => { ...settings, overallTheme: theme === 'default-' ? '' : theme, }, + permissions, + reviewPanel, }) return @@ -122,6 +137,8 @@ export const Visual = (args: any, { globals: { theme } }: any) => { ...settings, overallTheme: theme === 'default-' ? '' : theme, }, + permissions, + reviewPanel, }) useMeta({ 'ol-showSymbolPalette': true, @@ -143,6 +160,8 @@ export const Bibtex = (args: any, { globals: { theme } }: any) => { ...settings, overallTheme: theme === 'default-' ? '' : theme, }, + permissions, + reviewPanel, }) return