You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] draw.io diagrams saved in light mode even when app is in dark mode #476
onSave={(data: EventSave) => {
// If the save is triggered by another event, then do nothing
if (data.parentEvent !== 'save') {
return;
}
handleSave(data);
}}
save: (data) => {
action.exportDiagram({
format: exportFormat || 'xmlsvg',
// @ts-ignore not allowed normally, but only for internal use
exit: data.exit,
parentEvent: 'save'
});
},
A possible fix is to bundle a version of react-drawio with the extra parameter keepTheme: true in this save callback, to retain the theme when saving. Other workarounds might include some callback magic but no obvious solutions are apparent to me after skimming the code.
react-drawio also has this issue opened recently about exposing these options as props, so maybe if a fix for that gets merged using it would be easier
If we set keepTheme to true, won't light mode users complain of the same thing?
In the case of Excalidraw, I have resorted to saving the diagrams in light mode.
Since the finalized diagram is saved to the file storage, I think it is impossible to satisfy both theme options.
You're right that it's impossible to satisfy both theme options, but you can have light mode users' diagrams saved in light mode and dark mode users' saved in dark mode because we set the draw.io theme depending on the current docmost theme.
Activity
neov5 commentedon Nov 8, 2024
react-drawio also has this issue opened recently about exposing these options as props, so maybe if a fix for that gets merged using it would be easier
Philipinho commentedon Nov 11, 2024
If we set
keepThemeto true, won't light mode users complain of the same thing?In the case of Excalidraw, I have resorted to saving the diagrams in light mode.
Since the finalized diagram is saved to the file storage, I think it is impossible to satisfy both theme options.
neov5 commentedon Nov 11, 2024
You're right that it's impossible to satisfy both theme options, but you can have light mode users' diagrams saved in light mode and dark mode users' saved in dark mode because we set the draw.io theme depending on the current docmost theme.
ci(docmost#476): гейты наблюдаемых свойств перед publish — image-smok…
fix(mcp): форма сохраняет deny-all allowlist вместо тихого расширения…
Merge pull request 'ci: гейты наблюдаемых свойств перед publish — ima…
fix(ai-chat/external-mcp): recovery-reconnect honours empty allowlist…