Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Open diagram via button #110

Open
Tracked by #112
lonix1 opened this issue Sep 7, 2021 · 2 comments
Open
Tracked by #112

[Feature Request] Open diagram via button #110

lonix1 opened this issue Sep 7, 2021 · 2 comments

Comments

@lonix1
Copy link

lonix1 commented Sep 7, 2021

It would be nice to have a button to open the preview (instead of doing that manually from the command palette).

Exactly like in this extension. It has an "eye" icon on the top right which opens the preview to the right (like we have when opening .md previews).

Thanks for this great extension!

@vstirbu
Copy link
Collaborator

vstirbu commented Sep 8, 2021

Thanks for the suggestion!

This makes sense for stand alone .mmd files, but a markdown file can contain multiple diagrams. What should be the behaviour? Preview the diagram where the cursor is, if inside a fence?

@lonix1
Copy link
Author

lonix1 commented Sep 9, 2021

Didn't think of that, good point!

I'm unsure. At first thought I'd say it should only be for .mmd files, but that may lead to poor usability (user expects that preview button even when it's not showing).

Showing a preview when the cursor is inside a fence is a good option, but wouldn't that lead to higher CPU usage? Because the extension would need to track the cursor. Then again lots of extensions do that already... Tough call.

Options so far:

  • .mmd files: preview available
  • .md files: preview available only inside fence

The simplest option is to not implement this feature! 😄

@vstirbu vstirbu mentioned this issue Sep 1, 2022
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants