ocsigen / ocsigen/tyxml

Provide a translation module between html and js attributes

Open
#126 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement html & svg standard syntax extension
Dominant language
OCaml
Stars
179
Forks
63
Avg merge
5h
Merged PRs (30d)
22

Description

Currently, this translation module is hardcoded in js_of_ocaml and is quite partial (according to @hhugo). Given the new reflect mechanism we have in tyxml, it seems like it would be either to maintain inside tyxml directly.

I would tend to propose the following:

  • Add [@reflect.js "foo"] annotations.
  • Use a reflect-like mecanism to provide bi-directional dictionnaires.
  • Allow either the html or the js attributes for the ppx.

Contributor guide

Open the contributing guide

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.

Research direction

Start by reading the existing hardcoded translation module in js_of_ocaml and the reflect mechanism in tyxml. Define how [@reflect.js "foo"] annotations and bi-directional dictionaries should work, including how the ppx accepts either HTML or JS attributes. Done means the proposed translation is maintained in tyxml and supports both directions.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, javascript, ocaml
Domain
frontend, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.