fix(ui): wrap markdown tables in responsive container for mobile#307
fix(ui): wrap markdown tables in responsive container for mobile#307vanshika2720 wants to merge 1 commit into
Conversation
✅ Deploy Preview for kmesh-net ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
7b61f3d to
d60b142
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces a custom MDX components configuration, specifically adding a scrollable wrapper for tables. The reviewer suggests adopting the theme wrapper pattern by spreading '@theme-original/MDXComponents' to improve maintainability and reduce boilerplate, while also recommending the addition of 'tabIndex={0}' to the table container for better keyboard accessibility.
d60b142 to
7acdf60
Compare
499add8 to
40655f7
Compare
40655f7 to
3739058
Compare
Signed-off-by: vanshika2720 <pahalvanshikaa@gmail.com>
3739058 to
159c2cc
Compare
|
LGTM |
|
/cc @hzxuzhonghu |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: yashisrani The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/lgtm |
[UI/UX] Audit and Fix Mobile Responsiveness for Markdown Tables
Description
Currently, large Markdown tables in the documentation can exceed the viewport width on mobile devices, breaking the page layout or making the content difficult to read.
This PR fixes the issue by customizing the Docusaurus
MDXComponentsto automatically wrap all Markdown documentation tables in a responsive container<div>styled withoverflow-x: auto. This allows users to smoothly scroll wide tables horizontally on smaller screens while preserving the overall page width and layout integrity.Changes
src/theme/MDXComponents/index.js: Swizzled the base MDX components map and added a customtablecomponent wrapper withoverflowX: "auto".Verification
Before
Before.mov
After
After.mov