NotePlan / NotePlan/plugins

Extend HTMLView to work as dialog box returning data

Offen
#366 8 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@EduardMe arbeitet bereits daran.

Seit 29.11.2022.

API enhancement P-7
Vorherrschende Sprache
JavaScript
Sterne
204
Forks
82
Ø Merge
22 Std. 27 Min.
Gemergte PRs (30 T.)
3

Beschreibung

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)

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.