-
Notifications
You must be signed in to change notification settings - Fork 16.6k
fix(com/grid-comp/markdown): pin remark-gfm to v3 to allow inline code block by backticks in Markdown
#32420
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(com/grid-comp/markdown): pin remark-gfm to v3 to allow inline code block by backticks in Markdown
#32420
Conversation
…ode block by backticks in Markdown Signed-off-by: hainenber <dotronghai96@gmail.com>
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've completed my review and didn't find any issues.
Need a new review? Comment
/korbit-reviewon this PR and I'll review your latest changes.Korbit Guide: Usage and Customization
Interacting with Korbit
- You can manually ask Korbit to review your PR using the
/korbit-reviewcommand in a comment at the root of your PR.- You can ask Korbit to generate a new PR description using the
/korbit-generate-pr-descriptioncommand in any comment on your PR.- Too many Korbit comments? I can resolve all my comment threads if you use the
/korbit-resolvecommand in any comment on your PR.- Chat with Korbit on issues we post by tagging @korbit-ai in your reply.
- Help train Korbit to improve your reviews by giving a 👍 or 👎 on the comments Korbit posts.
Customizing Korbit
- Check out our docs on how you can make Korbit work best for you and your team.
- Customize Korbit for your organization through the Korbit Console.
Current Korbit Configuration
General Settings
Setting Value Review Schedule Automatic excluding drafts Max Issue Count 10 Automatic PR Descriptions ❌ Issue Categories
Category Enabled Documentation ✅ Logging ✅ Error Handling ✅ Readability ✅ Design ✅ Performance ✅ Security ✅ Functionality ✅ Feedback and Support
Note
Korbit Pro is free for open source projects 🎉
Looking to add Korbit to your team? Get started with a free 2 week trial here
…-gfm` until reaching React 18 Signed-off-by: hainenber <dotronghai96@gmail.com>
mistercrunch
left a comment
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.
LGTM
…ode block by backticks in Markdown (#32420) Signed-off-by: hainenber <dotronghai96@gmail.com>
…ode block by backticks in Markdown (#32420) Signed-off-by: hainenber <dotronghai96@gmail.com>
This commit addresses a critical dependency incompatibility that causes the "Cannot set properties of undefined (setting 'inTable')" error when rendering tables in Markdown components. ## Problem - remark-gfm v4.0.1 requires remark-parser v11+ (unified v11) - react-markdown v8.0.7 uses remark-parser v10 (unified v10) - This version mismatch breaks table rendering in Markdown components ## Solution 1. Downgraded remark-gfm from ^4.0.1 to ^3.0.1 in @superset-ui/core 2. Added npm override in root package.json to prevent auto-upgrades 3. Regenerated package-lock.json to reflect the downgrade ## Related Issues - This issue was previously fixed in PR apache#32420 (March 2025) - Dependabot re-introduced the bug by auto-bumping to v4.0.1 (July 2025) - The npm override prevents this from happening again ## Alternative Solution Upgrading to react-markdown v9+ would allow remark-gfm v4+, but that would be a larger change requiring broader testing. ## Testing Tables in Markdown components now render correctly without errors.
Add automated tests to prevent future dependency upgrades from breaking markdown rendering functionality. These tests will fail if remark-gfm is upgraded to v4+ without upgrading react-markdown to v9+ (requires React 18). Tests cover: 1. **Table rendering** - The critical regression from PR apache#32945 - Verifies tables render without "Cannot set properties of undefined" error - Tests table structure (headers, rows, cells) 2. **Inline code blocks** - Original issue from PR apache#32420 (apache#32416) - Ensures backticks work correctly 3. **Additional GFM features** - Comprehensive coverage - Strikethrough text - Task lists with checkboxes 4. **Complex integration** - Real-world scenario - Multiple GFM features together - Mimics actual dashboard markdown usage Each test includes detailed comments explaining: - Why remark-gfm is pinned to v3 - The dependency compatibility constraints - Historical context (PRs apache#32420, apache#32945) - What will break if upgraded incorrectly These tests address reviewer concerns from @sadpandajoe about preventing future breakage and demonstrating the root cause of the incompatibility.
This commit addresses a critical dependency incompatibility that causes the "Cannot set properties of undefined (setting 'inTable')" error when rendering tables in Markdown components. ## Problem - remark-gfm v4.0.1 requires remark-parser v11+ (unified v11) - react-markdown v8.0.7 uses remark-parser v10 (unified v10) - This version mismatch breaks table rendering in Markdown components ## Solution 1. Downgraded remark-gfm from ^4.0.1 to ^3.0.1 in @superset-ui/core 2. Added npm override in root package.json to prevent auto-upgrades 3. Regenerated package-lock.json to reflect the downgrade ## Related Issues - This issue was previously fixed in PR apache#32420 (March 2025) - Dependabot re-introduced the bug by auto-bumping to v4.0.1 (July 2025) - The npm override prevents this from happening again ## Alternative Solution Upgrading to react-markdown v9+ would allow remark-gfm v4+, but that would be a larger change requiring broader testing. ## Testing Tables in Markdown components now render correctly without errors.
Add automated tests to prevent future dependency upgrades from breaking markdown rendering functionality. These tests will fail if remark-gfm is upgraded to v4+ without upgrading react-markdown to v9+ (requires React 18). Tests cover: 1. **Table rendering** - The critical regression from PR apache#32945 - Verifies tables render without "Cannot set properties of undefined" error - Tests table structure (headers, rows, cells) 2. **Inline code blocks** - Original issue from PR apache#32420 (apache#32416) - Ensures backticks work correctly 3. **Additional GFM features** - Comprehensive coverage - Strikethrough text - Task lists with checkboxes 4. **Complex integration** - Real-world scenario - Multiple GFM features together - Mimics actual dashboard markdown usage Each test includes detailed comments explaining: - Why remark-gfm is pinned to v3 - The dependency compatibility constraints - Historical context (PRs apache#32420, apache#32945) - What will break if upgraded incorrectly These tests address reviewer concerns from @sadpandajoe about preventing future breakage and demonstrating the root cause of the incompatibility.
This commit addresses a critical dependency incompatibility that causes the "Cannot set properties of undefined (setting 'inTable')" error when rendering tables in Markdown components. ## Problem - remark-gfm v4.0.1 requires remark-parser v11+ (unified v11) - react-markdown v8.0.7 uses remark-parser v10 (unified v10) - This version mismatch breaks table rendering in Markdown components ## Solution 1. Downgraded remark-gfm from ^4.0.1 to ^3.0.1 in @superset-ui/core 2. Added npm override in root package.json to prevent auto-upgrades 3. Regenerated package-lock.json to reflect the downgrade ## Related Issues - This issue was previously fixed in PR apache#32420 (March 2025) - Dependabot re-introduced the bug by auto-bumping to v4.0.1 (July 2025) - The npm override prevents this from happening again ## Alternative Solution Upgrading to react-markdown v9+ would allow remark-gfm v4+, but that would be a larger change requiring broader testing. ## Testing Tables in Markdown components now render correctly without errors.
Add automated tests to prevent future dependency upgrades from breaking markdown rendering functionality. These tests will fail if remark-gfm is upgraded to v4+ without upgrading react-markdown to v9+ (requires React 18). Tests cover: 1. **Table rendering** - The critical regression from PR apache#32945 - Verifies tables render without "Cannot set properties of undefined" error - Tests table structure (headers, rows, cells) 2. **Inline code blocks** - Original issue from PR apache#32420 (apache#32416) - Ensures backticks work correctly 3. **Additional GFM features** - Comprehensive coverage - Strikethrough text - Task lists with checkboxes 4. **Complex integration** - Real-world scenario - Multiple GFM features together - Mimics actual dashboard markdown usage Each test includes detailed comments explaining: - Why remark-gfm is pinned to v3 - The dependency compatibility constraints - Historical context (PRs apache#32420, apache#32945) - What will break if upgraded incorrectly These tests address reviewer concerns from @sadpandajoe about preventing future breakage and demonstrating the root cause of the incompatibility.
This commit addresses a critical dependency incompatibility that causes the "Cannot set properties of undefined (setting 'inTable')" error when rendering tables in Markdown components. ## Problem - remark-gfm v4.0.1 requires remark-parser v11+ (unified v11) - react-markdown v8.0.7 uses remark-parser v10 (unified v10) - This version mismatch breaks table rendering in Markdown components ## Solution 1. Downgraded remark-gfm from ^4.0.1 to ^3.0.1 in @superset-ui/core 2. Added npm override in root package.json to prevent auto-upgrades 3. Regenerated package-lock.json to reflect the downgrade ## Related Issues - This issue was previously fixed in PR apache#32420 (March 2025) - Dependabot re-introduced the bug by auto-bumping to v4.0.1 (July 2025) - The npm override prevents this from happening again ## Alternative Solution Upgrading to react-markdown v9+ would allow remark-gfm v4+, but that would be a larger change requiring broader testing. ## Testing Tables in Markdown components now render correctly without errors.
Add automated tests to prevent future dependency upgrades from breaking markdown rendering functionality. These tests will fail if remark-gfm is upgraded to v4+ without upgrading react-markdown to v9+ (requires React 18). Tests cover: 1. **Table rendering** - The critical regression from PR apache#32945 - Verifies tables render without "Cannot set properties of undefined" error - Tests table structure (headers, rows, cells) 2. **Inline code blocks** - Original issue from PR apache#32420 (apache#32416) - Ensures backticks work correctly 3. **Additional GFM features** - Comprehensive coverage - Strikethrough text - Task lists with checkboxes 4. **Complex integration** - Real-world scenario - Multiple GFM features together - Mimics actual dashboard markdown usage Each test includes detailed comments explaining: - Why remark-gfm is pinned to v3 - The dependency compatibility constraints - Historical context (PRs apache#32420, apache#32945) - What will break if upgraded incorrectly These tests address reviewer concerns from @sadpandajoe about preventing future breakage and demonstrating the root cause of the incompatibility.
fix(com/grid-comp/markdown): pin
remark-gfmto v3 to allow inline code block by backticks in MarkdownSUMMARY
Fixes #32416
According to this
remark-gfmissue post,react-markdownv8 (current version in Superset) only plays well withremark-gfmv3, hence the downgrade. The other alternative is to upgradereact-markdownto v9 but that has breaking change of React 18 requirement.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before
Screen.Recording.2025-02-28.at.12.24.40.mov
After
https://github.com/user-attachments/assets/5d861226-c98f-4687-b9e8-8e90da2a847a
TESTING INSTRUCTIONS
Sales dashboardexample dashboardVehicle Sales DashboardMarkdown section.ADDITIONAL INFORMATION