zsviczian / obsidian-excalidraw-plugin

A plugin to edit and view Excalidraw drawings in Obsidian
3.99k stars 214 forks source link

BUG: Devtools is full of warning messages #1457

Open Ruminov opened 9 months ago

Ruminov commented 9 months ago

Your environment SYSTEM INFO: Obsidian version: v1.5.0 Installer version: v1.4.16 Operating system: Windows 10 Home Single Language 10.0.19045 Login status: logged in Catalyst license: insider Insider build toggle: on Live preview: on Base theme: dark Community theme: Source v0.0.5 Snippets enabled: 6 Restricted mode: off Plugins installed: 35 Plugins enabled: 19 1: Hotkeys for specific files v1.4.0 2: Hotkeys for templates v1.4.3 3: Kanban v1.5.3 4: Meld Encrypt v2.3.5 5: MetaEdit v1.8.2 6: Quick Explorer v0.2.8 7: QuickAdd v1.6.0 8: Underline v1.2.1 9: List Callouts v1.2.0 10: Hover Editor v0.11.15 11: Hider v1.3.1 12: Templater v1.18.1 13: Custom Frames v2.4.6 14: Pane Relief v0.5.2 15: Code Editor Shortcuts v1.14.0 16: Dataview v0.5.64 17: Alias from heading v1.0.12 18: Advanced URI v1.38.1 19: Excalidraw v2.0.3

RECOMMENDATIONS: Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets. Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.

Describe the bug Every time I start Obsidian, I get this warning message: "Page layout may be unexpected due to Quirks Mode", after disabling a lot of plugins, I found out that it was Excalidraw, this also happens in the sandbox vault only with Excalidraw as plugin.

Pasted image 20231122094455

Normally I would ignore the warning message but every time I use Visual Studio Code to edit my Obsidian custom CSS theme, I get "Page layout may be unexpected due to Quirks Mode" over and over again with every update of my theme, I can get up to 180 of these warnings in a single Obsidian session.

When I have +40 Quirk mode warnings, devtools becomes slower and takes 2 to 3 seconds to start when I invoke it, it can take up to 6 seconds to start when I already have +100 warnings, I got to the point of having to disable Excalidraw every time I want to edit my theme but this is something I want to avoid since I use it a lot.

These messages appear in the console at the same time as the "Page layout may be unexpected due to Quirks Mode" warning messages, they may be related.:

Pasted image 20231122094357

Pasted image 20231122094241

To Reproduce Steps to reproduce the behavior:

  1. Open Obsidian.
  2. Open devtools to view the warning (just 1 or 2 warnings from Excalidraw).
  3. Access your CSS theme from Visual Studio Code.
  4. Save the CSS changes in Visual Studio Code to update the appearance of Obsidian.
  5. See in devtools how the Excalidraw warning increases with each save (One warning for each theme update).

Expected behavior No Excalidraw warnings or at least only 1 without stacking.

Additional context I already tried to use the "hide issues like this" option in devtools, but that just makes them invisible, they keep piling up behind the scenes making devtools slow.

I removed all Excalidraw CSS rules from my custom theme and this behavior is still happening.

zsviczian commented 9 months ago

I understand. At this time I am not planning to work on this issue. If you can offer a better way of harvesting the current Obsidian theme, please let me know.