This repository has been archived by the owner on Nov 7, 2024. It is now read-only.
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.
vanilla JS framework for frontend and refactoring work #207
Open
Description
We need a JS framework to deduplicate code like this:
typst-preview/addons/frontend/src/typst-doc.ts
Lines 574 to 597 in e31b29c
The JS framework should be like vanilla JS, since:
- webview doesn't like too complicated code and framework. For example, there are pain upstream bugs found in vscode-webview-ui-toolkit.
PS: we also have found some upstream bug of SVG rendering in webview, which hints that we may be better to have fully control of our code. Instead we will come into no idea on solving upstream bugs. - the JS framework should easily interoperate with vDOM of typst documents.
I personally pick https://github.com/vanjs-org/van with seeing benchmark. It is also the first googled item. But we can check other ones.
The refactoring plan and work needs participation of @Enter-tainer.
It is not quite urgent, and once we have a plan, we can break refactoring into parts and merge them into main branch. The each part of code refactoring should be simple, easy to review. And they should get separated into multiple version publish, so to avoid thrushing the stability of software?
Metadata
Assignees
Labels
No labels