Skip to content

[v11] remove not needed dependency, remove not needed warning#2153

Merged
matyasf merged 1 commit intov11_rcfrom
fix_deps_refs
Sep 24, 2025
Merged

[v11] remove not needed dependency, remove not needed warning#2153
matyasf merged 1 commit intov11_rcfrom
fix_deps_refs

Conversation

@matyasf
Copy link
Collaborator

@matyasf matyasf commented Sep 23, 2025

  • some instructure/theme-registry dependencies were still there, this package was removed
  • findDOMNode tries to access elem?.props?.ref after it has tried elem.ref because accessingelem?.props?.ref triggers a warning
  • downgrade docs app React 18 because this is what most use. This also required the downgrade of @testing-library/react

to test: check things that display a popup that they work well and there are no console errors/warnings.

@matyasf matyasf self-assigned this Sep 23, 2025
@github-actions
Copy link

github-actions bot commented Sep 23, 2025

PR Preview Action v1.6.2
Preview removed because the pull request was closed.
2025-09-24 20:59 UTC

… fix some components throwing ref warnings under React 18
Comment on lines 32 to 41
function getElementRef(elem: { ref?: any; props?: { ref: any } }) {
if (elem?.props?.ref !== undefined) {
return elem.props.ref
// Note that this is added by InstUI components like Position
if (elem.ref) {
return elem.ref
}
return elem.ref
// note that trying to access this will display a warning in React 18.
// this is OK because without it React itself would show an error because
// its using findDOMNode
return elem?.props?.ref
}
Copy link
Collaborator Author

@matyasf matyasf Sep 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the main change. The issue was that BreadCrumb example was showing "ContextView: ref is not a prop" warnings with React 18

Copy link
Contributor

@balzss balzss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the code looks good. if I run the docs locally, i get this error when navigating to http://localhost:9090/#View , might be something that was already there...

Image

@matyasf
Copy link
Collaborator Author

matyasf commented Sep 24, 2025

the code looks good. if I run the docs locally, i get this error when navigating to http://localhost:9090/#View , might be something that was already there...

yes, we have this in v10 too

@matyasf matyasf merged commit 5f6cb9a into v11_rc Sep 24, 2025
8 of 9 checks passed
@matyasf matyasf deleted the fix_deps_refs branch September 24, 2025 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants