Skip to content

fix(ui): wrap markdown tables in responsive container for mobile#307

Open
vanshika2720 wants to merge 1 commit into
kmesh-net:mainfrom
vanshika2720:fix-markdown-tables
Open

fix(ui): wrap markdown tables in responsive container for mobile#307
vanshika2720 wants to merge 1 commit into
kmesh-net:mainfrom
vanshika2720:fix-markdown-tables

Conversation

@vanshika2720

@vanshika2720 vanshika2720 commented May 17, 2026

Copy link
Copy Markdown

[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 MDXComponents to automatically wrap all Markdown documentation tables in a responsive container <div> styled with overflow-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 custom table component wrapper with overflowX: "auto".

Verification

  • Verified that Markdown tables render correctly and can be scrolled horizontally when the table width exceeds the container width on mobile viewports.
  • Confirmed that no unrelated changes or files were introduced and Prettier formatting adheres strictly to project standards.

Before

Before.mov

After

After.mov

Copilot AI review requested due to automatic review settings May 17, 2026 08:59
@netlify

netlify Bot commented May 17, 2026

Copy link
Copy Markdown

Deploy Preview for kmesh-net ready!

Name Link
🔨 Latest commit 159c2cc
🔍 Latest deploy log https://app.netlify.com/projects/kmesh-net/deploys/6a098b9c7d4fc400088bb9c1
😎 Deploy Preview https://deploy-preview-307--kmesh-net.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment thread src/theme/MDXComponents/index.js

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@vanshika2720 vanshika2720 force-pushed the fix-markdown-tables branch from d60b142 to 7acdf60 Compare May 17, 2026 09:14
@kmesh-bot kmesh-bot added size/S and removed size/M labels May 17, 2026
Copilot AI review requested due to automatic review settings May 17, 2026 09:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.

@kmesh-bot kmesh-bot added size/XS and removed size/S labels May 17, 2026
@vanshika2720 vanshika2720 force-pushed the fix-markdown-tables branch from 499add8 to 40655f7 Compare May 17, 2026 09:25
@kmesh-bot kmesh-bot added size/S and removed size/XS labels May 17, 2026
Copilot AI review requested due to automatic review settings May 17, 2026 09:28
@vanshika2720 vanshika2720 force-pushed the fix-markdown-tables branch from 40655f7 to 3739058 Compare May 17, 2026 09:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Signed-off-by: vanshika2720 <pahalvanshikaa@gmail.com>
@vanshika2720 vanshika2720 force-pushed the fix-markdown-tables branch from 3739058 to 159c2cc Compare May 17, 2026 09:34
@kmesh-bot kmesh-bot added size/M and removed size/S labels May 17, 2026
@yashisrani

Copy link
Copy Markdown
Contributor

LGTM

@vanshika2720

Copy link
Copy Markdown
Author

/cc @hzxuzhonghu
/cc @yashisrani
/cc @LiZhenCheng9527

@kmesh-bot kmesh-bot requested a review from LiZhenCheng9527 May 17, 2026 09:59
@kmesh-bot kmesh-bot requested a review from yashisrani May 17, 2026 09:59
@kmesh-bot

Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: yashisrani
Once this PR has been reviewed and has the lgtm label, please assign nlgwcy for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@yashisrani

Copy link
Copy Markdown
Contributor

/lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants