-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
chore: update Ref dependency to latest version #4023
chore: update Ref dependency to latest version #4023
Conversation
The @stardust-ui/{react-component-event-listener, react-component-ref} components have been moved to @fluentui/{react-component-event-listener, react-component-ref}. Change dependency so that the new packages are used, and upgrade to their latest versions. One wrinkle: `toRefObject()` was removed from `react-component-ref` (see microsoft/fluent-ui-react#2287). I've rewritten the code that depended on this function.
💖 Thanks for opening this pull request! 💖 Here is a list of things that will help get it across the finish line:
We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can. |
Codecov Report
@@ Coverage Diff @@
## master #4023 +/- ##
=======================================
Coverage 99.84% 99.84%
=======================================
Files 183 183
Lines 3276 3276
=======================================
Hits 3271 3271
Misses 5 5
Continue to review full report at Codecov.
|
@jluxenberg that's great 🎉 However, can we also partially revert #3774 to include |
src/addons/MountNode/MountNode.js
Outdated
const nodeRef = getNodeRefFromProps(this.props) | ||
|
||
nodeRegistry.del(nodeRef, this) | ||
nodeRegistry.emit(nodeRef, handleClassNamesChange) |
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.
I don't think that it's valid to remove this part as it solves duplicated classnames issue, for example:
<MountNode className="foo" node={document.body} />
<MountNode className="foo" node={document.body} />
<MountNode className="bar" node={document.body} />
Should add only foo bar
.
This also handles unmount scenario: when one of MountNode
components with className="foo"
will be removed - foo
should still be defined on document.body
as there is another component that defines it.
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.
Got it; thanks for this additional test case. I will take a look and see if my change can be reworked.
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.
@jluxenberg do not spend cycles on MountNode
, I am working on a hook that will replace it...
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.
@jluxenberg FYI: #4027
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.
I merged the original PR and solved merge conflicts in this. Can you please check? It also seems that we have a single comment left 👍
…React into jluxenberg/stardust-ui-is-now-fluentui � Conflicts: � src/addons/MountNode/MountNode.js � src/addons/MountNode/lib/getNodeRefFromProps.js � test/specs/lib/hooks/NodeRegistry-test.js
…React into jluxenberg/stardust-ui-is-now-fluentui
The
@stardust-ui/{react-component-event-listener, react-component-ref}
components have been moved to@fluentui/{react-component-event-listener, react-component-ref}
(https://github.com/stardust-ui/react now redirects to https://github.com/microsoft/fluent-ui-react)Change dependency so that the new packages are used, and upgrade to their latest versions.
One wrinkle:
toRefObject()
was removed fromreact-component-ref
(see microsoft/fluent-ui-react#2287). I've rewritten the code that depended on this function.