-
Notifications
You must be signed in to change notification settings - Fork 464
Merge type domProps and type props in JsxDOM #5706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
When is this expected to land? In the next 10.1 release? |
I expect that it depends on how the tests are going. Let me run on a larger project, then how about another round of test from the forum? |
Should be |
This will be the breaking change against the
|
Can you write this file in |
Also how about aria props, do they work with record representation? Better test them. |
💡💡💡 |
I'll cherry-pick and make the base to |
92fea47
to
ebfc870
Compare
Cherry-picked and rebased to |
jscomp/others/jsxDOM.res
Outdated
/* accessibility */ | ||
/* https://www.w3.org/TR/wai-aria-1.1/ */ | ||
/* https://accessibilityresources.org/<aria-tag> is a great resource for these */ | ||
/* [@optional] [@as "aria-current"] ariaCurrent: page|step|location|date|time|true|false, */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Want to update the stuff in comments too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I will.
What was history left aria-*
as comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why it is a comment.
And not sure why things are in multiple clusters of things where each cluster is in alphabetical order.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5b2554f uncomment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a comment on comments.
There are a few more things that are keywords only in OCaml. Perhaps provide also the version without underscore?
|
Something weird. I uncommented let _ = ReactDOM.createDOMElementVariadic("div", ~props={ariaCurrent: #page}, [])
// The field ariaCurrent does not belong to type JsxDOM.domProps |
"make lib" locally |
"make clean" -> "npm install" -> "make lib" a7ae475 I guess that |
@mattdamon108 there's a problem. Added commit to also build |
Should I revert to .ml back? |
Probably. |
Or, to make |
Agreed. How about making just |
E.g. do we really need |
How about |
Probably. As build dependencies both ways are missing. |
Btw I'm not sure it's a good idea, just asking if possible at all. |
Probably best to go back to .ml for now. Longer term: an observation. |
Totally agreed. I'll revert |
Can I reset to the commit |
6008633
to
1d5cac8
Compare
.res would be very nice to have because of the enums for the missing aria attributes. |
That would be great! |
Added #5708 for tracking. |
With all changes in PRs, I ran on my company project. It works fine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably good to go.
Is there a way to make git diff less confused? The diff shows domProps changed a lot while it has not. Mostly just removal.
d0b4399
to
684c4d4
Compare
Explored many paths and tried, but finally, ended up removing |
This PR is to merge two props type for dom element into one.
type JsxDOM.domProps
andtype JsxDOM.props
has only difference which isref
type. Theref: domRef => unit
is for the callback refs which was recommended in the earlier release of React 16.3. Furthermore, JSX ppx v3 and v4 don't use type props anymore.