Skip to content

Fix tablet responsive breakpoints (768px-1024px)#392

Merged
Junman140 merged 1 commit into
Pi-Defi-world:devfrom
willy-de7:fix/tablet-responsive-breakpoints
May 29, 2026
Merged

Fix tablet responsive breakpoints (768px-1024px)#392
Junman140 merged 1 commit into
Pi-Defi-world:devfrom
willy-de7:fix/tablet-responsive-breakpoints

Conversation

@willy-de7

@willy-de7 willy-de7 commented May 27, 2026

Copy link
Copy Markdown

closes #362

Description

This PR fixes issue #362 by implementing proper responsive design for tablet devices (768px-1024px). Previously, tablets received the desktop layout with no adjustments, causing overcrowded sidebars and tiny touch targets.

Changes Made

Layout & Spacing

  • Added tablet-specific padding and margins across all pages
  • Implemented max-width constraint (4xl/896px) to center content on tablets
  • Increased spacing between elements (gaps, padding) for less crowded layouts
  • Enhanced PageContainer with tablet-optimized spacing (px-6, py-6, pb-28)

Touch Targets & Navigation

  • Increased minimum touch target size from 44px to 48px on tablets
  • Enhanced mobile navigation bar height from 80px to 96px (h-24) on tablets
  • Enlarged navigation icons and labels for better visibility
  • Added proper spacing and centering for navigation items

Typography

  • Scaled up headers, labels, and body text appropriately for tablet screens
  • Improved readability with larger font sizes (text-sm → text-base, etc.)
  • Enhanced visual hierarchy with better size differentiation

Grid Layouts

  • Updated features grid from 2 columns to 3 columns on tablets
  • Adjusted card padding and icon sizes for better proportions
  • Improved spacing between grid items

Component Updates

  • app/globals.css: Added tablet-specific responsive utilities
  • components/mobile-nav.tsx: Enhanced navigation bar for tablets
  • components/app-layout.tsx: Adjusted bottom padding for taller nav
  • components/layout/page-container.tsx: Added tablet spacing and max-width
  • app/page.tsx: Updated home page with tablet-responsive elements
  • app/me/page.tsx: Enhanced profile page for tablet displays

Testing Recommendations

Test on devices/viewports in the 768px-1024px range:

  • iPad (768x1024)
  • iPad Pro 9.7" (768x1024)
  • iPad Pro 10.5" (834x1112)
  • Surface Pro (912x1368)
  • Generic tablet landscape (1024x768)

Verify:

  • ✅ Touch targets are at least 48px
  • ✅ Content is centered with appropriate margins
  • ✅ Text is readable without zooming
  • ✅ Navigation bar is properly sized
  • ✅ Grids and cards have appropriate spacing
  • ✅ No horizontal scrolling occurs

Summary by CodeRabbit

  • Enhancement
    • Improved responsive design with optimized spacing and padding adjustments for tablets and larger screens.
    • Enhanced touch target sizing and refined navigation bar layout for better usability.
    • Updated profile and dashboard page layouts with improved spacing consistency across screen sizes.

Review Change Stack

- Add tablet-specific spacing and sizing adjustments across all pages
- Increase touch targets from 44px to 48px on tablets for better usability
- Enhance mobile navigation bar with larger icons and text on tablets (h-24)
- Add max-width constraint (4xl) to center content on tablets
- Improve typography scaling: headers, labels, and body text
- Adjust grid layouts: features grid now 3 columns on tablets
- Increase padding and gaps throughout for less crowded layouts
- Update PageContainer with tablet-optimized spacing (px-6, py-6, pb-28)
- Add tablet-specific styles to global CSS components

Fixes Pi-Defi-world#362
@drips-wave

drips-wave Bot commented May 27, 2026

Copy link
Copy Markdown

@willy-de7 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@coderabbitai

coderabbitai Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This PR adds tablet-specific responsive styling (768px–1024px) to the entire app through global CSS media queries and Tailwind's md: breakpoint classes. The changes update layout containers, navigation, and both dashboard and profile pages to properly scale spacing, padding, touch targets, and typography on tablets.

Changes

Tablet breakpoint responsive styling

Layer / File(s) Summary
Global tablet CSS and layout foundation
app/globals.css, components/layout/page-container.tsx, components/app-layout.tsx, components/mobile-nav.tsx
Tablet media query overrides for .page-header-row, .page-title, and .touch-target establish base styling. PageContainer gains responsive padding (md:px-6 md:py-6 md:pb-28) and centering (md:max-w-4xl md:mx-auto). AppLayout adds md:pb-28 bottom padding for non-public routes. MobileNav container and link items gain responsive height/sizing (md:h-auto, md:h-24, md:gap-2, md:w-7 md:h-7).
Dashboard page responsive styling
app/page.tsx
Header, balance card, and recent activity sections updated with responsive layout and typography classes. Welcome text, ACBU/USD display rows, fiat messages, transaction list container, transaction icons, type/date text, and status badges all gain md: overrides for improved tablet presentation.
Profile page responsive styling
app/me/page.tsx
Profile header spacing and LocalKycBadge placement updated with responsive classes. Balance summary cards and menu items reworked with responsive grid/gap, padding, and typography for tablet layout.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • Pi-Defi-world/acbu-frontend#380: Main PR's tablet-specific @media overrides in app/globals.css directly adjust the same extracted component classes (.page-header-row, .page-title, .touch-target) introduced in retrieved PR #380.

Poem

🐰 The tablet gap is closed at last,
With media queries holding fast,
From 768 to 1024's embrace,
Touch targets bloom with breathing space,
Responsive styles make spacing right—
The middle ground now sees the light! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title clearly and directly summarizes the main change: implementing tablet-specific responsive behavior for the 768px-1024px breakpoint range.
Linked Issues check ✅ Passed All code changes implement the objectives from issue #362: tablet-specific padding/margins, increased touch targets (48px), navigation adjustments, typography scaling, grid layout updates, and max-width constraints for centering content.
Out of Scope Changes check ✅ Passed All changes directly address tablet responsiveness within the 768px-1024px range. No out-of-scope modifications were detected; updates to CSS, navigation, layout components, and page styling are all aligned with the stated objectives.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
components/mobile-nav.tsx (1)

76-78: 💤 Low value

Icon wrapper may not increase actual icon size as expected.

The span wrapper sets md:w-7 md:h-7 (28px), but the actual icon components defined at lines 15-24 remain hardcoded at w-5 h-5 (20px). This creates a 28px container with a 20px icon centered inside, adding spacing but not increasing the icon visual size.

If the intent is to increase icon size at the tablet breakpoint, the icon definitions at lines 15-24 should also receive responsive sizing:

const navItems: NavItem[] = [
-  { name: "Home", href: "/", icon: <Home className="w-5 h-5" /> },
+  { name: "Home", href: "/", icon: <Home className="w-5 h-5 md:w-6 md:h-6" /> },
  // ... repeat for other icons
];

If the current behavior (larger container, same icon size) is intentional for consistent spacing, this can be ignored.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@components/mobile-nav.tsx` around lines 76 - 78, The span wrapper sets
md:w-7/md:h-7 but the actual icon JSX (item.icon) remains hardcoded to w-5 h-5,
so increase the icon size at the tablet breakpoint by either updating the icon
components to accept and apply a className prop or override the rendered icon’s
classes when rendering item.icon; for example, when rendering item.icon, use
React.cloneElement(item.icon, { className:
concatExistingClasses(item.icon.props.className, "w-5 h-5 md:w-7 md:h-7") }) so
the visual icon scales to match the md container rather than only centering a
smaller icon.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/globals.css`:
- Around line 177-190: The tablet-only media query causes .page-header-row,
.page-title and .touch-target to revert on desktop; change the CSS rule that
targets "`@media` (min-width: 768px) and (max-width: 1024px)" to be unbounded from
the top (e.g., "`@media` (min-width: 768px)") so the increased padding/text
size/touch-targets apply the same way Tailwind's md: utilities used by
PageContainer do; update the selectors for .page-header-row, .page-title, and
.touch-target accordingly so their md-equivalent styles match PageContainer's
md:px/md:py and text sizing on all widths >=768px.

---

Nitpick comments:
In `@components/mobile-nav.tsx`:
- Around line 76-78: The span wrapper sets md:w-7/md:h-7 but the actual icon JSX
(item.icon) remains hardcoded to w-5 h-5, so increase the icon size at the
tablet breakpoint by either updating the icon components to accept and apply a
className prop or override the rendered icon’s classes when rendering item.icon;
for example, when rendering item.icon, use React.cloneElement(item.icon, {
className: concatExistingClasses(item.icon.props.className, "w-5 h-5 md:w-7
md:h-7") }) so the visual icon scales to match the md container rather than only
centering a smaller icon.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5838bfad-c54e-4db0-95f4-d7b3e551b69e

📥 Commits

Reviewing files that changed from the base of the PR and between 7292a13 and 3a4e15e.

📒 Files selected for processing (6)
  • app/globals.css
  • app/me/page.tsx
  • app/page.tsx
  • components/app-layout.tsx
  • components/layout/page-container.tsx
  • components/mobile-nav.tsx

Comment thread app/globals.css
Comment on lines +177 to +190
@media (min-width: 768px) and (max-width: 1024px) {
.page-header-row {
@apply px-6 py-4;
}

.page-title {
@apply text-xl;
}

/* Increase touch targets for tablet */
.touch-target {
@apply min-w-[48px] min-h-[48px];
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find all usages of the global utility classes that have tablet-only media queries

echo "=== Pages using .page-header-row ==="
rg -n --type=tsx --type=ts -C2 'page-header-row'

echo -e "\n=== Pages using .page-title ==="
rg -n --type=tsx --type=ts -C2 'page-title'

echo -e "\n=== Pages using .touch-target ==="
rg -n --type=tsx --type=ts -C2 'touch-target'

echo -e "\n=== Components using PageContainer (affected by spacing mismatch) ==="
rg -n --type=tsx --type=ts -C2 'PageContainer'

Repository: Pi-Defi-world/acbu-frontend

Length of output: 377


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== globals.css relevant section ==="
ls -la app/globals.css
sed -n '150,220p' app/globals.css | nl -ba

echo
echo "=== Locate PageContainer implementation ==="
# Find the file that defines PageContainer
fd -a "page-container.*" . || true
fd -a "PageContainer" . || true

# Prefer common path; if not found, fall back to rg
pc_file="$(rg -l --hidden --glob '!*node_modules/*' --glob '!*dist/*' "PageContainer" . || true | head -n 1)"
echo "First match file for 'PageContainer': ${pc_file:-<none>}"

if [[ -n "${pc_file}" ]]; then
  echo "=== PageContainer lines around first occurrence ==="
  rg -n --glob '*.tsx' --glob '*.ts' --hidden --glob '!*node_modules/*' --glob '!*dist/*' "PageContainer" "$pc_file" || true
  sed -n '1,220p' "$pc_file" | nl -ba | head -n 220
fi

echo
echo "=== Search for .page-header-row / .page-title / .touch-target usages (tsx/ts only) ==="
rg -n --hidden --glob '!**/node_modules/**' --glob '!**/dist/**' --glob '*.tsx' --glob '*.ts' -C2 'page-header-row' . || true
rg -n --hidden --glob '!**/node_modules/**' --glob '!**/dist/**' --glob '*.tsx' --glob '*.ts' -C2 'page-title' . || true
rg -n --hidden --glob '!**/node_modules/**' --glob '!**/dist/**' --glob '*.tsx' --glob '*.ts' -C2 'touch-target' . || true

Repository: Pi-Defi-world/acbu-frontend

Length of output: 234


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== globals.css tablet media query section ==="
# Show with line numbers using cat -n (nl not available)
cat -n app/globals.css | sed -n '150,220p'

echo
echo "=== Locate PageContainer definition ==="
# Search for definition/exports
rg -n --hidden --glob '!**/node_modules/**' --glob '!**/dist/**' --glob '*.tsx' --glob '*.ts' -S 'PageContainer' app || true

# Try locating the likely file by name first
echo
echo "=== Candidate files containing 'page-container' in name ==="
find app -maxdepth 6 -type f \( -iname '*page-container*' \) 2>/dev/null || true

echo
echo "=== Usage counts (tsx/ts) ==="
for cls in page-header-row page-title touch-target; do
  echo "--- $cls ---"
  rg -n --hidden --glob '!**/node_modules/**' --glob '!**/dist/**' --glob '*.tsx' --glob '*.ts' -S "${cls}" app || true
done

Repository: Pi-Defi-world/acbu-frontend

Length of output: 15380


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Find PageContainer file explicitly by path pattern
find . -type f \( -iname '*page-container*' -o -path '*page-container*' \) | head -n 50

echo
# Print PageContainer component implementation (first match)
pc_file="$(find . -type f \( -iname 'page-container.tsx' -o -iname 'page-container.ts' \) | head -n 1)"
echo "Using: ${pc_file:-<none>}"
if [[ -n "${pc_file:-}" ]]; then
  sed -n '1,200p' "$pc_file" | cat -n
  echo
  rg -n "className=|md:px|px-|md:py|py-" "$pc_file" || true
fi

echo
echo "=== Inspect globals.css around tablet media query (for exact snippet) ==="
cat -n app/globals.css | sed -n '140,210p'

Repository: Pi-Defi-world/acbu-frontend

Length of output: 2624


Critical: Tablet-only (max-width) media query makes header styles revert on desktop vs PageContainer’s md:* spacing

In app/globals.css, .page-header-row / .page-title (and .touch-target) are only increased inside @media (min-width: 768px) and (max-width: 1024px). PageContainer uses unbounded md:px-6 md:py-6 ..., so on widths >1024px the content wrapper stays at px-6 while the header row reverts to base px-4 py-3 and the title to base text-lg (e.g., app/rates/page.tsx).

Recommended fix (align with Tailwind `md:` behavior)
-  `@media` (min-width: 768px) and (max-width: 1024px) {
+  `@media` (min-width: 768px) {
     .page-header-row {
       `@apply` px-6 py-4;
     }
 
     .page-title {
       `@apply` text-xl;
     }
 
     /* Increase touch targets for tablet */
     .touch-target {
       `@apply` min-w-[48px] min-h-[48px];
     }
   }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
@media (min-width: 768px) and (max-width: 1024px) {
.page-header-row {
@apply px-6 py-4;
}
.page-title {
@apply text-xl;
}
/* Increase touch targets for tablet */
.touch-target {
@apply min-w-[48px] min-h-[48px];
}
}
`@media` (min-width: 768px) {
.page-header-row {
`@apply` px-6 py-4;
}
.page-title {
`@apply` text-xl;
}
/* Increase touch targets for tablet */
.touch-target {
`@apply` min-w-[48px] min-h-[48px];
}
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/globals.css` around lines 177 - 190, The tablet-only media query causes
.page-header-row, .page-title and .touch-target to revert on desktop; change the
CSS rule that targets "`@media` (min-width: 768px) and (max-width: 1024px)" to be
unbounded from the top (e.g., "`@media` (min-width: 768px)") so the increased
padding/text size/touch-targets apply the same way Tailwind's md: utilities used
by PageContainer do; update the selectors for .page-header-row, .page-title, and
.touch-target accordingly so their md-equivalent styles match PageContainer's
md:px/md:py and text sizing on all widths >=768px.

@Junman140 Junman140 merged commit 1ef50bf into Pi-Defi-world:dev May 29, 2026
1 check 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.

Responsive breakpoints not tested on tablet (768px-1024px) – T

3 participants