Skip to content

feat: update app spacing#2444

Open
Wutche wants to merge 1 commit into
getAlby:masterfrom
Wutche:feat/1011-update-app-spacing
Open

feat: update app spacing#2444
Wutche wants to merge 1 commit into
getAlby:masterfrom
Wutche:feat/1011-update-app-spacing

Conversation

@Wutche

@Wutche Wutche commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Description

Updates inner-page layouts and card collections to consistently use 16px spacing across desktop and mobile.

Also removes extra Connections page padding and prevents App Store cards from overflowing on smaller screens.

Fixes #1011

Summary by CodeRabbit

  • Style
    • Enhanced spacing and layout consistency across the application by adjusting component gaps and margins throughout the UI for improved visual spacing between cards, grids, and sections.

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This PR standardizes layout spacing across the frontend by updating Tailwind gap utilities from gap-3 (12px) to gap-4 (16px), matching the updated design spec. It also includes structural improvements to connection and app card layouts, such as adding explicit flex wrappers and better text truncation constraints.

Changes

Spacing Standardization to gap-4

Layer / File(s) Summary
Connection component spacing updates
frontend/src/components/connections/AlbyConnectionCard.tsx, frontend/src/components/connections/AppDetailConnectedApps.tsx, frontend/src/components/connections/AppUsage.tsx
AlbyConnectionCard, AppDetailConnectedApps, and AppUsage grid containers update spacing from gap-3 to gap-4 across isolated/balance and totals sections.
Connected apps and app store layout refactoring
frontend/src/components/connections/ConnectedApps.tsx, frontend/src/components/connections/AppStore.tsx
ConnectedApps replaces fragment wrapper with flex flex-col gap-4 container and removes mt-6 spacing wrapper; AppStore wraps return in explicit flex flex-col gap-4 div; both update recommended apps grid to gap-4.
Suggested apps card sizing and spacing
frontend/src/components/connections/SuggestedApps.tsx
AppCard adds min-w-0 to Link, Card, and text container for improved text truncation; category badges remove margin utilities; category list changes from gap-8 to gap-4 and section grids from gap-3 to gap-4.
Settings layout modernization
frontend/src/components/layouts/SettingsLayout.tsx
Main container switches from space-y-8/lg:space-x-4/lg:space-y-0 to gap-4 with lg:flex-row and h-full; content grid reduces from gap-6 to gap-4.
Screen-level spacing standardization
frontend/src/screens/ConnectAlbyAccount.tsx, frontend/src/screens/Home.tsx, frontend/src/screens/ai/AI.tsx, frontend/src/screens/alby/SupportAlby.tsx, frontend/src/screens/apps/AppDetails.tsx, frontend/src/screens/apps/AppsCleanup.tsx, frontend/src/screens/apps/Connections.tsx, frontend/src/screens/appstore/AppStoreDetail.tsx, frontend/src/screens/channels/Channels.tsx, frontend/src/screens/internal-apps/Tictactoe.tsx, frontend/src/screens/internal-apps/ZapPlanner.tsx, frontend/src/screens/subwallets/SubwalletList.tsx
All screen containers, grids, and card layouts update gap and margin utilities: gap-3gap-4, *:mb-3*:mb-4, mt-8 removed where consolidating spacing logic; Connections tab layout restructured with gap-4 applied to Tabs and margin removed from TabsList.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • getAlby/hub#2154: Modifies the same frontend connection and app components' Tailwind spacing/gap classes, though in opposite direction (gap-3 vs. gap-4).

Suggested reviewers

  • reneaaron
  • rolznz
  • im-adithya

Poem

🐰 Hop, skip, and a gap to the right,
Spacing grows from three to four with delight,
Cards and containers now breathe with more room,
Sixteen pixels chase the gloom,
Design dreams take flight!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.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 title 'feat: update app spacing' directly and concisely describes the main change: updating spacing values throughout the codebase from gap-3 to gap-4 (and related spacing adjustments).
Linked Issues check ✅ Passed The PR successfully implements the objective from issue #1011 by systematically updating margins and spacing across inner pages and card components from 12px (gap-3) to 16px (gap-4) in Tailwind.
Out of Scope Changes check ✅ Passed All changes are directly related to the spacing update objective. The layout wrapper modifications (e.g., fragment to div in AppStore, ConnectedApps, and SettingsLayout) are necessary adjustments to properly apply the new gap-4 spacing throughout the application.

✏️ 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

🤖 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 `@frontend/src/screens/apps/Connections.tsx`:
- Around line 44-45: The Tabs spacing change removed the previous responsive
vertical rhythm and horizontal padding—update the Tabs/TabsList usage so spacing
matches previous behavior across breakpoints: either replace the fixed
className="gap-4" on Tabs with responsive gap classes (e.g., gap-2 lg:gap-6) or
re-add the prior responsive margins on TabsList (e.g., mb-2 lg:mb-6) and ensure
Tabs retains appropriate horizontal padding (px-2 lg:px-0) so alignment with
AppLayout's p-4 on mobile remains unchanged; adjust in the component where Tabs,
TabsList and TabsContent are rendered to restore responsive spacing.
🪄 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: 37253cf9-e3b2-40a9-8d85-7753891a0a95

📥 Commits

Reviewing files that changed from the base of the PR and between bf9c346 and 59be99e.

📒 Files selected for processing (19)
  • frontend/src/components/connections/AlbyConnectionCard.tsx
  • frontend/src/components/connections/AppDetailConnectedApps.tsx
  • frontend/src/components/connections/AppStore.tsx
  • frontend/src/components/connections/AppUsage.tsx
  • frontend/src/components/connections/ConnectedApps.tsx
  • frontend/src/components/connections/SuggestedApps.tsx
  • frontend/src/components/layouts/SettingsLayout.tsx
  • frontend/src/screens/ConnectAlbyAccount.tsx
  • frontend/src/screens/Home.tsx
  • frontend/src/screens/ai/AI.tsx
  • frontend/src/screens/alby/SupportAlby.tsx
  • frontend/src/screens/apps/AppDetails.tsx
  • frontend/src/screens/apps/AppsCleanup.tsx
  • frontend/src/screens/apps/Connections.tsx
  • frontend/src/screens/appstore/AppStoreDetail.tsx
  • frontend/src/screens/channels/Channels.tsx
  • frontend/src/screens/internal-apps/Tictactoe.tsx
  • frontend/src/screens/internal-apps/ZapPlanner.tsx
  • frontend/src/screens/subwallets/SubwalletList.tsx

Comment on lines +44 to +45
<Tabs value={tab} onValueChange={setTab} className="gap-4">
<TabsList>

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 | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check the shadcn/ui Tabs component styling to confirm flex display and direction
fd -t f 'tabs\.(ts|tsx)' frontend/src/components/ui/ -x grep -l "display" {} \;
# Then check the actual component file
fd -t f 'tabs\.(ts|tsx)' frontend/src/components/ui/ -x cat {} \;

Repository: getAlby/hub

Length of output: 3832


🏁 Script executed:

#!/bin/bash
set -euo pipefail
# Inspect the relevant portion of Connections.tsx around the cited lines
sed -n '1,120p' frontend/src/screens/apps/Connections.tsx | cat -n | sed -n '30,100p'

Repository: getAlby/hub

Length of output: 1297


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect Connections.tsx around the cited lines (44-45) and the TabsList margin change
sed -n '1,120p' frontend/src/screens/apps/Connections.tsx | cat -n | sed -n '35,90p'

Repository: getAlby/hub

Length of output: 1198


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show more context around the Tabs in Connections.tsx to find any parent padding/wrappers
sed -n '1,140p' frontend/src/screens/apps/Connections.tsx | cat -n

# Also locate all occurrences of "px-" and "mb-" in Connections.tsx to see what spacing is applied elsewhere
rg -n --no-heading "px-|mb-" frontend/src/screens/apps/Connections.tsx

Repository: getAlby/hub

Length of output: 2526


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Look for the old/new class strings in Connections.tsx (current file may not contain them)
rg -n --no-heading "px-2 lg:px-0|mb-2 lg:mb-6" frontend/src/screens/apps/Connections.tsx

# Find any other occurrence of these exact classes across the frontend
rg -n --no-heading "px-2 lg:px-0" frontend/src | head -n 50
rg -n --no-heading "mb-2 lg:mb-6" frontend/src | head -n 50

# Inspect AppHeader to see if it provides horizontal padding for its content area
fd -t f "AppHeader\.(ts|tsx)" frontend/src/components | xargs -r -n 1 echo
fd -t f "AppHeader\.(ts|tsx)" frontend/src/components -x cat {} | head -n 200

Repository: getAlby/hub

Length of output: 37


🏁 Script executed:

#!/bin/bash
set -u

# 1) Get the exact Tabs component file path(s)
echo "== Tabs component files ==" 
fd -t f 'tabs\.(ts|tsx)' frontend/src/components/ui/ -x echo

# 2) Print the Tabs.tsx/ts file with line numbers for easier reference
echo "== Tabs component contents (first 160 lines) =="
for f in $(fd -t f 'tabs\.(ts|tsx)' frontend/src/components/ui/); do
  echo "--- $f ---"
  sed -n '1,160p' "$f" | cat -n
done

# 3) Inspect AppHeader layout (padding/margins could come from here or its wrapper)
echo "== AppHeader files =="
fd -t f "AppHeader\.(ts|tsx)" frontend/src/components | head -n 20
APP_HEADER_FILE="$(fd -t f "AppHeader\.(ts|tsx)" frontend/src/components | head -n 1 || true)"
if [ -n "${APP_HEADER_FILE:-}" ]; then
  echo "== AppHeader: $APP_HEADER_FILE (first 220 lines) =="
  sed -n '1,220p' "$APP_HEADER_FILE" | cat -n
fi

# 4) Find where Connections is rendered and whether there’s a wrapper applying px-*/mx-* around it
echo "== References to Connections component =="
rg -n "from \"src/screens/apps/Connections\"|<Connections\b|function Connections\b" frontend/src | head -n 50

Repository: getAlby/hub

Length of output: 6923


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect routes around where Connections is rendered
sed -n '250,340p' frontend/src/routes.tsx | cat -n

# Search for common page container/padding components in routes.tsx near the Connections route
rg -n --no-heading "Connections|element: <Connections|path: \"?/apps\"|layout|Page|container|max-w|px-|py-" frontend/src/routes.tsx | head -n 80

# Also inspect the immediate route block around line 299 more fully
sed -n '270,320p' frontend/src/routes.tsx | cat -n

Repository: getAlby/hub

Length of output: 5167


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Find where AppLayout is used in routes.tsx
rg -n "AppLayout" frontend/src/routes.tsx

# Show the route block near the first AppLayout usage
# (Use a wider window around the first match)
FIRST_MATCH_LINE=$(rg -n "AppLayout" frontend/src/routes.tsx | head -n 1 | cut -d: -f1)
START=$((FIRST_MATCH_LINE-120))
END=$((FIRST_MATCH_LINE+120))
sed -n "${START},${END}p" frontend/src/routes.tsx | cat -n

# Inspect AppLayout implementation
APP_LAYOUT_FILE="frontend/src/components/layouts/AppLayout.tsx"
if [ -f "$APP_LAYOUT_FILE" ]; then
  sed -n '1,220p' "$APP_LAYOUT_FILE" | cat -n
else
  echo "Missing $APP_LAYOUT_FILE"
fi

# Also inspect any generic layout wrapper that might add px, e.g., TwoColumnFullScreenLayout
for f in frontend/src/components/layouts/TwoColumnFullScreenLayout.tsx \
         frontend/src/components/layouts/SettingsLayout.tsx \
         frontend/src/components/layouts/WalletLayout.tsx; do
  if [ -f "$f" ]; then
    echo "== $f =="
    sed -n '1,260p' "$f" | cat -n
  fi
done

Repository: getAlby/hub

Length of output: 1988


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show where AppLayout is used in routes.tsx
rg -n "AppLayout" frontend/src/routes.tsx

FIRST_MATCH_LINE=$(rg -n "AppLayout" frontend/src/routes.tsx | head -n 1 | cut -d: -f1)
START=$((FIRST_MATCH_LINE-120))
if [ "$START" -lt 1 ]; then START=1; fi
END=$((FIRST_MATCH_LINE+120))

echo "== routes.tsx around AppLayout match (lines $START-$END) =="
sed -n "${START},${END}p" frontend/src/routes.tsx | cat -n

# Inspect AppLayout implementation + common layout wrappers
for f in \
  frontend/src/components/layouts/AppLayout.tsx \
  frontend/src/components/layouts/TwoColumnFullScreenLayout.tsx \
  frontend/src/components/layouts/SettingsLayout.tsx \
  frontend/src/components/layouts/WalletLayout.tsx
do
  if [ -f "$f" ]; then
    echo "== $(basename "$f") =="; sed -n '1,260p' "$f" | cat -n
  fi
done

Repository: getAlby/hub

Length of output: 27389


Check Tabs spacing after switching from padding/margins to gap-4

frontend/src/components/ui/tabs.tsx makes the default Tabs orientation (orientation="horizontal") render as a flex container with flex-col, and the passed className="gap-4" overrides the default gap-2. So the spacing between <TabsList> and <TabsContent> is now controlled by a fixed 16px gap.

Since this removes the prior responsive mb-2 lg:mb-6 behavior (if that was on <TabsList>), confirm the vertical rhythm matches across breakpoints. Also, removing px-2 lg:px-0 on <Tabs> should still leave overall horizontal padding from AppLayout’s p-4; confirm alignment on mobile is unchanged.

<Tabs value={tab} onValueChange={setTab} className="gap-4">
  <TabsList>
🤖 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 `@frontend/src/screens/apps/Connections.tsx` around lines 44 - 45, The Tabs
spacing change removed the previous responsive vertical rhythm and horizontal
padding—update the Tabs/TabsList usage so spacing matches previous behavior
across breakpoints: either replace the fixed className="gap-4" on Tabs with
responsive gap classes (e.g., gap-2 lg:gap-6) or re-add the prior responsive
margins on TabsList (e.g., mb-2 lg:mb-6) and ensure Tabs retains appropriate
horizontal padding (px-2 lg:px-0) so alignment with AppLayout's p-4 on mobile
remains unchanged; adjust in the component where Tabs, TabsList and TabsContent
are rendered to restore responsive spacing.

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.

Update app spacing and layout

1 participant