expln / metamath-lamp

Metamath-lamp (Lite Assistant for Metamath Proofs) is a GUI-based proof assistant for creating formal mathematical proofs in Metamath that does not require installation (just run it directly using your web browser).
https://expln.github.io/lamp/latest/index.html
MIT License
12 stars 5 forks source link

Question on createDomProps in the file Xml_to_React.res #137

Closed billh0420 closed 1 year ago

billh0420 commented 1 year ago

The function createDomProps adds the prop fontWeight. But, createStyle also adds the prop fontWeight. The result is that fontWeight appears twice (once at the top level and once as part of "style").

Is this what is wanted? It seems that it should appear only in the "style" prop.

It seems to have no effect whether the top level fontWeight is kept or not.

I am asking this because I am working on eliminating the legacy ReactDOMRe used by createDOMElementVariadic. This module was kept for ReScript react-jsx v3 compatibility.

In particular, I can keep fontWeight in both places or I can have it appear only in the "style" prop.

expln commented 1 year ago

I think I just forgot to remove fontWeight from createDomProps. At least I cannot recall any reason why it should be in two places. So, you may remove it during the refactoring. Thanks for asking and letting me know this.