Skip to content

Fix duplicate createRoot warning - #8249

Merged
labkey-alan merged 4 commits into
developfrom
fb_duplicate_createRoot
Oct 29, 2026
Merged

labkey-alan merged 4 commits into
developfrom
fb_duplicate_createRoot

Conversation

@labkey-alan

@labkey-alan labkey-alan commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Rationale

This PR fixes the warning that React emits about createRoot being used on the same element multiple times as observed by @labkey-adam. The problem is that calling loadApp triggers the onInit callback passed to App.registerApp from @labkey/api, and we were calling this every time the user hovered over the product navigation icon or clicked outside of the icon when the menu is open.

Related Pull Requests

  • n/a

Changes

  • ProductNavigation/app.tsx: only call createRoot once
  • ProductNavigationHeader.js: use bootstrap events to toggle menu show state
  • header.jsp: default the header dropdown content as loading

Tasks

  • Claude Code Review
  • Manual Testing

@labkey-alan
labkey-alan requested a review from cnathe October 28, 2026 15:54
@labkey-alan labkey-alan self-assigned this Oct 28, 2026
@labkey-alan
labkey-alan marked this pull request as draft October 28, 2026 16:00
@labkey-alan
labkey-alan marked this pull request as ready for review October 28, 2026 18:03

@cnathe cnathe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

and manual testing done. looks good

@labkey-alan
labkey-alan merged commit addad6c into develop Oct 29, 2026
10 of 11 checks passed
@labkey-alan
labkey-alan deleted the fb_duplicate_createRoot branch October 29, 2026 15:46
XingY pushed a commit that referenced this pull request Oct 29, 2026
- `ProductNavigation/app.tsx`: only call createRoot once
- `ProductNavigationHeader.js`: use bootstrap events to toggle menu show
state
- `header.jsp`: default the header dropdown content as loading
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.

2 participants