Skip to content

Conversation

@adarsh-priydarshi-5646
Copy link

Fixes: #1965

Description

This PR enhances the code samples table with comprehensive responsive design and improved mobile accessibility. The changes address usability issues on small devices and provide a better user experience across all screen sizes.

Changes Made

Responsive Design Implementation

  • Added responsive CSS media queries for different device categories (desktop, tablets, mobile)
  • Implemented horizontal scroll functionality specifically for small devices (≤600px)
  • Enhanced table positioning and centering for desktop and large screens

Mobile Device Enhancements

  • Horizontal Scroll: Added touch-optimized horizontal scrolling for mobile devices
  • Sticky First Column: Title column remains visible during horizontal scroll for context preservation
  • Text Wrapping: Enabled text wrapping for Source code, Tutorial, Description, and Category columns
  • Increased Table Widths: Ensured all 7 columns are accessible via horizontal scroll
    • Large Mobile (481px-600px): 1400px table width
    • Standard Mobile (321px-480px): 1300px table width
    • Small Mobile (≤320px): 1200px table width

Visual Improvements

  • Added visual separators between columns for better content organization
  • Fixed text overlap issues with proper column spacing and padding
  • Implemented clean link hover effects (color change only, no background effects)
  • Added dark mode compatibility for link styling

Cross-Device Compatibility

  • Desktop/Large Screens: All columns visible without scrolling, enhanced column widths
  • Tablets: Responsive layout with text ellipsis for overflow content, no horizontal scroll needed
  • Mobile Devices: Full horizontal scroll access to all 7 columns with sticky first column

Files Modified

  • [website/src/css/customTheme.scss]
  • [website/docs/general/code-samples.md] - Minor content improvements

Before vs After

  • Before: Table columns cut off on Desktop & mobile, text overlap, poor readability
  • After: All 7 columns accessible, smooth horizontal scroll, no text overlap, better readability

Before vs After Screenshots

Before

Screenshot 1 Screenshot 2

After

Screenshot 3 Screenshot 4

Testing

  • Tested across multiple screen sizes and breakpoints
  • Verified horizontal scroll functionality on touch devices
  • Ensured sticky column behavior works correctly
  • Confirmed text wrapping improves readability for long content
  • Validated link hover effects in both light and dark themes

…obile responsive design

✨ Hero Section Enhancements:
- Enhanced background image visibility with CSS filters (contrast 1.1, brightness 1.05, saturation 1.1)
- Added subtle backdrop blur for better text readability
- Improved visual hierarchy while maintaining text clarity
- Enhanced button styling with proper hover effects

📱 Mobile Responsive Improvements:
- Architecture section: Fixed text overflow with proper text wrapping and container constraints
- Features section: Optimized text sizes and widths for all mobile devices
- EndCTA section: Adjusted button sizes and text for better mobile experience
- Added comprehensive breakpoint coverage (768px, 480px, 360px)

🎯 Button Enhancements:
- Standardized button styling across all sections
- Added proper hover effects with color transitions
- Optimized button sizes for different screen sizes
- Improved touch targets for mobile devices

🛠️ Technical Improvements:
- Progressive text scaling for smooth responsive transitions
- Proper CSS containment to prevent overflow issues
- Optimized performance with efficient CSS properties
- Cross-browser compatibility maintained

📊 Device Coverage:
- Desktop: Enhanced background visibility and professional styling
- Tablets (768px): Medium-sized optimizations
- Mobile (480px): Compact layouts with readable text
- Extra Small (360px): Ultra-compact designs for tiny screens

All changes maintain backward compatibility and improve user experience across all devices.
…ibility

- Added comprehensive responsive table styling for all device sizes
- Implemented horizontal scroll functionality for small devices
- Enhanced table column widths and text wrapping for better readability
- Added sticky first column for context preservation during horizontal scroll
- Improved table positioning and centering for desktop and large screens
- Fixed text overlap issues on small devices with proper column spacing
- Enabled text wrapping for Source code and Tutorial columns on mobile devices
- Increased table widths to ensure all 7 columns are accessible via horizontal scroll
- Added visual separators between columns for better content organization
- Optimized touch scrolling experience for mobile devices
- Fixed link hover effects with clean color-only changes

Table now displays properly across all screen sizes:
- Desktop/Large screens: All columns visible without scrolling
- Tablets: Responsive layout with text ellipsis for overflow content
- Mobile devices: Horizontal scroll with sticky first column and full column access
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.

[Site]: Enhance code samples table with responsive design and horizontal scroll for mobile devices

1 participant