unicode-org / icu4x

Solving i18n for client-side and resource-constrained environments.
https://icu4x.unicode.org
Other
1.33k stars 173 forks source link

Wasm Demo Frontend Framework #2360

Open QnnOkabayashi opened 2 years ago

QnnOkabayashi commented 2 years ago

The wasm demo is currently written in vanilla TypeScript. This makes it difficult to add new demos to the webpage, since all the HTML and TS pieces have to be added manually, and rules for what to update when an input is updated are encoded by hand.

A frontend framework like Svelte would simplify this process, and make adding new demos as simple as "use these inputs, have them call these Diplomat bindings, and show the output here."

Currently, the demo is generated for every PR, so this would ideally enable authors to easily add a demo for their new feature that the reviewers could interact with in real time.

catull commented 1 year ago

Source link is now wasm-demo

ashu26jha commented 5 months ago

I have following rough solution:

  1. We could possibly take input in form of a JSON file, which defines input fields basically what type.
  2. Need to add setter functions for those inputs mentioned above
  3. We could setup a frontend site which will generate JSON for the developers (select number of input fields)

Thoughts/Suggestions/Tips?

If we want to eliminate the use of JSON it would be difficult as it won't be easy to resolve the dependency tree.