Enveloppe / obsidian-enveloppe

Enveloppe helps you to publish your notes on a GitHub repository from your Obsidian Vault, for free!
https://enveloppe.github.io/
Apache License 2.0
636 stars 39 forks source link

[Bug]: Compatibility issue with Excalidraw plugin #315

Closed mathisgauthey closed 8 months ago

mathisgauthey commented 8 months ago

Issue validation

Command used

No response

Plugin version

6.15.5

Describe the bug

There's a compatibility issue with Excalidraw when activating Github-Publisher prevents from using any icons in the toolbar. It is weird.

Link to the issue in the Excalidraw repo

How to reproduce ?

  1. Install Excalidraw
  2. Install GIthub-Publisher
  3. Try to create a drawing and click a try icon

Minimal Reproducible Example

None

Configuration

{
  "github": {
    "branch": "main",
    "automaticallyMergePR": true,
    "dryRun": {
      "enable": false,
      "folderName": "github-publisher"
    },
    "tokenPath": "%configDir%/plugins/%pluginID%/env",
    "api": {
      "tiersForApi": "Github Free/Pro/Team (default)",
      "hostname": ""
    },
    "workflow": {
      "commitMessage": "[PUBLISHER] Merge",
      "name": ""
    },
    "verifiedRepo": true
  },
  "upload": {
    "behavior": "fixed",
    "defaultName": "docs/posts",
    "rootFolder": "docs",
    "yamlFolderKey": "categories",
    "frontmatterTitle": {
      "enable": false,
      "key": "title"
    },
    "replaceTitle": [],
    "replacePath": [
      {
        "regex": "docs/blog",
        "replacement": "docs/blog/posts",
        "type": "path"
      }
    ],
    "autoclean": {
      "enable": true,
      "excluded": [
        "/^((?!docs\\/posts|docs\\/images).)*$/"
      ]
    },
    "folderNote": {
      "enable": false,
      "rename": "index.md",
      "addTitle": {
        "enable": false,
        "key": "title"
      }
    },
    "metadataExtractorPath": ""
  },
  "conversion": {
    "hardbreak": false,
    "dataview": true,
    "censorText": [
      {
        "entry": "/title:\\s\"([^\"]+)\"/i",
        "replace": "title: $1",
        "flags": "",
        "after": false
      },
      {
        "entry": "/(date_)(created: )(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\+\\d{2}:\\d{2})\\n(date_)(modified: )(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\+\\d{2}:\\d{2})/i",
        "replace": "date:\\n  $2$3\\n  updated: $6",
        "flags": "",
        "after": true
      }
    ],
    "tags": {
      "inline": false,
      "exclude": [],
      "fields": []
    },
    "links": {
      "internal": true,
      "unshared": false,
      "wiki": true,
      "slugify": "strict"
    }
  },
  "embed": {
    "attachments": true,
    "overrideAttachments": [],
    "keySendFile": [],
    "notes": false,
    "folder": "docs/images",
    "convertEmbedToLinks": "keep",
    "charConvert": "->",
    "useObsidianFolder": false
  },
  "plugin": {
    "shareKey": "share",
    "excludedFolder": [],
    "copyLink": {
      "enable": false,
      "links": "",
      "removePart": [],
      "transform": {
        "toUri": true,
        "slugify": "lower",
        "applyRegex": []
      }
    },
    "setFrontmatterKey": "Set"
  }
}

Relevant log output

Nope

OS

Android, Windows

Anything else?

No response

Obsidian information

SYSTEM INFO:
    Obsidian version: v1.5.3
    Installer version: v1.4.16
    Operating system: Windows 10 Pro 10.0.22631
    Login status: logged in
    Catalyst license: none
    Insider build toggle: off
    Live preview: on
    Base theme: adapt to system
    Community theme: none
    Snippets enabled: 4
    Restricted mode: off
    Plugins installed: 36
    Plugins enabled: 2
        1: Excalidraw v2.0.21
        2: Github Publisher v6.15.5

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.
Mara-Li commented 8 months ago

I don't think it's from my repo, as I don't touch the excalidraw plugin in any way? Like, I just use the API from the official excalidraw…

mathisgauthey commented 8 months ago

I don't think it's from my repo, as I don't touch the excalidraw plugin in any way? Like, I just use the API from the official excalidraw…

I was quite surprised as well, but using a new vault with only the two plugins, the issue is reproduced. Maybe some CSS issue ? That's weird, but I'd be glad to help.

Mara-Li commented 8 months ago

OIkay, I can reproduce it on a blank vault.

(Top 10 of the most strange bug I created in my spaghetti code)

Mara-Li commented 8 months ago

Okay, I think it's because Publisher use an older version of Excalidraw : With Publisher: image

Without: image

Mara-Li commented 8 months ago

should be fixed in f2e38a3

Note: I load the export settings from the plugin settings directly, but more option can be used.

mathisgauthey commented 8 months ago

Yup, I confirm, this is now fixed. Thanks for being so quick to help like last time. Still enjoying your work, now using mkdocs for a much better user experience.