NotePlan / NotePlan/plugins

Extend HTMLView to work as dialog box returning data

Open
#366 8 comments 0 reactions 1 assignee View on GitHub

@EduardMe is already working on this.

Since Nov 29, 2022.

API enhancement P-7
Dominant language
JavaScript
Stars
204
Forks
82
Avg merge
22h 27m
Merged PRs (30d)
3

Description

Following recent Discord discussion we realise we could use HTMLViews for more advanced dialog boxes. (They probably won't be performant compared to native controls, so this isn't a long term solution.)

They can already be used to call plugin commands, as prototyped by @dwertheimer and @EduardMe. This request is to allow return value(s) to be passed back to the calling JS, so it can act like a await CommandBar.something() call.

Further, @dwertheimer also adds that "can you please add a parameter called shouldDimMainWindow:boolean = true so I can override the dimming layer if I want?"

So we want to be able to say something like:

const [param, color] = await HTMLView.showModal(html, 'Window title', 500, 500, false)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.