Skip to content

Conversation

@arty0928
Copy link
Contributor

@arty0928 arty0928 commented Oct 28, 2025

Resolves #460


Problem 1: Table not horizontally scrollable on mobile devices

The props table in component documentation pages was not horizontally scrollable on mobile devices, causing content to be cut off when the table width exceeded the viewport width.

Root Cause

The Table component wrapper had overflow="hidden", which prevented horizontal scrolling:

// apps/landing/src/components/mdx/components/Table/index.tsx
export const Table = ({ ...props }: ComponentProps<'table'>) => {
  return (
    <Box borderRadius="0.5rem" overflow="hidden">  // Blocked scrolling
      <Box {...props} as="table" borderCollapse="collapse" borderSpacing={0} />
    </Box>
  )
}

Solution

  1. Added scroll container to PropsTable with overflow="auto" and set minimum table width
  2. Changed Table wrapper overflow from hidden to visible
// apps/landing/src/components/PropsTable.tsx
<Box maxWidth="100%" overflow="auto" width="100%">
  <Table border={0} style={{ minWidth: '600px' }}>
// apps/landing/src/components/mdx/components/Table/index.tsx
<Box borderRadius="0.5rem" overflow="visible">  //  hidden → visible

Files modified:

  • apps/landing/src/components/PropsTable.tsx
  • apps/landing/src/components/mdx/components/Table/index.tsx

Result

Before After
image image
❌ Table content cut off ✅ Horizontal scroll enabled

Problem 2: Inline code not visible in light mode

Inline code (backtick-wrapped) was not visible in light mode due to insufficient contrast between background and text colors.

Light Mode (Before) Dark Mode (Before)
image image
❌ Code barely visible ✅ Works correctly

Root Cause

CustomCodeBlock component used $containerBackground which was #FFF in light mode, providing no contrast with the surrounding content.

Solution

Added dedicated codeBackground color token to avoid affecting other components:

  • Light mode: #F5F5F5
  • Dark mode: #2E2E2E
// CustomCodeBlock.tsx
<Box bg="$codeBackground">  // Changed from $containerBackground

Files modified:

  • apps/landing/devup.json
  • packages/components/devup.json
  • apps/landing/src/components/mdx/components/CustomCodeBlock.tsx

Result

Light Mode (After) Dark Mode (After)
image image
✅ Code now visible with proper contrast ✅ Maintains correct appearance

@changeset-bot
Copy link

changeset-bot bot commented Oct 28, 2025

⚠️ No Changeset found

Latest commit: 051eb24

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@owjs3901 owjs3901 marked this pull request as draft October 28, 2025 16:47
@arty0928 arty0928 changed the title [Draft PR] Bug Report: Table Component Scroll & Light Mode Color Issues Bug Report: Table Component Scroll & Light Mode Color Issues Oct 31, 2025
@arty0928 arty0928 changed the title Bug Report: Table Component Scroll & Light Mode Color Issues Fix Table Component Scroll & Light Mode Color Issues Oct 31, 2025
@arty0928 arty0928 marked this pull request as ready for review October 31, 2025 03:44
@codecov
Copy link

codecov bot commented Oct 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
see 7 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@owjs3901 owjs3901 merged commit 810ac5a into dev-five-git:main Oct 31, 2025
3 checks passed
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.

Bug Report: Table Component Scroll & Light Mode Color Issues

2 participants