Workbench icon indicating copy to clipboard operation
Workbench copied to clipboard

Move previewer to introspectable library

Open sonnyp opened this issue 3 years ago • 2 comments

Right now we have 2 previewers:

one in JavaScript called Previewer/Internal.js for "inline preview" (preview directly in the Workbench window)

one in Vala called Previewer/External.js for "out of process" preview (preview in a separate process)

The idea here would be to rewrite the previewer as an introspectable library that can be used in different context such as workbench inline preview, windowed preview and out-of-process.

  • Reduce maintenance effort by not having to implement things twice – see for example issues with "vala" tag https://github.com/sonnyp/Workbench/issues?q=is%3Aissue+is%3Aopen+label%3Avala
  • Remove code duplication
  • Cleaner architecture for async/out-of-process use cases
  • Can be used in GNOME Builder
  • Can be used easily to support more languages

sonnyp avatar Sep 15 '22 11:09 sonnyp

Wouldn't an "introspectable library" need to be written in something other than JavaScript. Maybe Vala?

vixalien avatar Mar 06 '24 15:03 vixalien

Correct, most likely in C.

sonnyp avatar Mar 06 '24 16:03 sonnyp