MM-70684 Update GitHub plugin for React 19 in Mattermost v12 - #1061
MM-70684 Update GitHub plugin for React 19 in Mattermost v12#1061cpoile wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (5)
Included review availability: 3 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour. 📝 WalkthroughWalkthroughThe plugin now requires Mattermost 12.0.0, externalizes React 19 runtime modules, uses development mode for debug builds, documents compatibility requirements, and renders Markdown links with secure new-tab attributes. ChangesReact 19 compatibility and link handling
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The compatibility and Markdown changes introduce no confirmed merge-blocking risk. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
A rabbit hops through React’s bright runtime, Comment |
| )} | ||
| <div className='markdown-text mt-1 mb-1'> | ||
| <ReactMarkdown linkTarget='_blank'>{description}</ReactMarkdown> | ||
| <ReactMarkdown |
There was a problem hiding this comment.
The installed react-markdown v9 removed linkTarget. Passing it throws when a tooltip renders a description.
The replacement uses its supported components.a API to preserve opening links in a new tab.
This is a pre-existing dependency bug, uncovered during testing—not a React 19 requirement.
Summary
Fixes the GitHub plugin startup crash on Mattermost v12 / React 19. The plugin already used the host's React, but dependencies could bundle React 18's JSX runtime. That older runtime accesses React internals such as
ReactCurrentOwnerthat are no longer available in React 19, causing the plugin bundle to fail during startup.Externalizes
react/jsx-runtimeandreact/jsx-dev-runtimetoReactJSXRuntimeandReactJSXDevRuntime, keeping JSX helpers aligned with the host's React. Also mapsreact-dom/clientto the host's ReactDOM, requires Mattermost 12.0.0, and sets the debug build to development mode. Requires the host exports from mattermost/mattermost#38489.Replaces react-markdown's removed
linkTargetprop with a custom link renderer, preserving links opening in a new tab and fixing an existing tooltip-rendering failure.Ticket Link
https://mattermost.atlassian.net/browse/MM-70684
Release Note
Change Impact: 🟡 Medium
Reasoning: The changes affect plugin startup, Webpack dependency mapping, and Markdown link rendering. The scope is limited to the plugin, but compatibility depends on Mattermost v12 host exports.
Regression Risk: Medium. Incorrect external mappings or link rendering can cause startup failures or user-facing rendering issues.
QA Recommendation: Perform focused manual QA on plugin startup, debug builds, Markdown links, tooltips, and Mattermost v12 compatibility. Skipping manual QA has moderate risk.
Generated by CodeRabbitAI