Skip to content

[Plugin API] Missing payload.uuid when executing onMacroRendererSlotted from :macro #8904

@stdword

Description

@stdword

Search first

  • I searched and no similar issues were found

What Happened?

  • payload.uuid is empty when executing onMacroRendererSlotted API call inside :macro

Demo

Reproduce the Bug

  1. Create :macro in config.edn:
  2. Create a plugin with API call:
  3. Open Logseq with running plugin
  4. Open DevTools → Console
  5. Create a block with {{test}} content
  6. Console output reflect the problem:

Expected Behaviour

  • payload.uuid has the uuid value of the block rendering occurs for. Just like now for non-macro case (see the gif demo)
  • However now this bug could be used to distinguish rendering state: inside macro or not → it would be nice to have a flag for that purpose when bug will be fixed: payload.isInsideMacro: boolean

Desktop or Mobile Platform Information

  • MacOS latest
  • Desktop Logseq v0.8.18
  • @logseq/lib v0.0.14

Are you willing to submit a PR? If you know how to fix the bug.

  • I'm willing to submit a PR (Thank you!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    :type/bugSomething isn't working. Affects daily use.plugins

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions