microsoft / fast

The adaptive interface system for modern web experiences.
https://www.fast.design
Other
9.23k stars 590 forks source link

Fix/React wrapper props fix #6940

Closed bennyrags closed 3 months ago

bennyrags commented 4 months ago

Pull Request

📖 Description

The current React.createElement function takes as an parameter the object newReactProps to pass props to the created React component. But we have noticed that some props are not being passed to our React components. When I tested this, I noticed these attributes were not getting passed to newElementProps object but not the newReactProps.

This fix changes the second parameter passed in React.createElement to an object that includes both objects, spread. After making this fix, all attributes passed from our web components to their React counterparts.

This is my first attempt at contributing and I realize this change may have performance or other implications. I'm not sure this is the correct fix, but it does solve this issue for us. I'd be happy to test performance or anything else with a bit of guidance from your team.

🎫 Issues

6826

👩‍💻 Reviewer Notes

Please let me know if there's anything more you need from me or if there's something you think I'm missing.

📑 Test Plan

I ran Lerna tests (and noted this below in the checkbox for tests) I'd like to test the performance implicaitons of this, but I'm not sure how to do that

✅ Checklist

General

bennyrags commented 4 months ago

@microsoft-github-policy-service agree company="Thomson Reuters"

janechu commented 3 months ago

Closing this issue as we are no longer supporting this package, this is part of ongoing work to re-align the project. My apologies for not addressing this issue beforehand, see #6963.