Skip to content

Part 1: the statement and the widget end on one line - #8

Merged
devmtnaing merged 2 commits into
mainfrom
part1-layout
Sep 28, 2026
Merged

devmtnaing merged 2 commits into
mainfrom
part1-layout

Conversation

@devmtnaing

Copy link
Copy Markdown
Owner

What this changes

Item 9 from the x-sum UI/UX review: on desktop, the gap beside the shorter of Part 1's two cards. This is a one-line change to src/styles/lesson.css (.question goes from align-items: start to stretch), so it applies to all 46 lessons.

Stacked on #3–#7. Until those merge, this diff also shows their commits. Merge in order and it shrinks to its own commit.

Why this option

  • I measured both cards on every lesson at 1440px. Which one is taller varies: the statement on 20 lessons, the widget on 26, with a median difference of 11px. The big cases go both ways: x-sum's statement is 165px taller, and invert-binary-tree's widget is 277px taller.
  • Options I tried and dropped:
    • Examples in the right column: this made the gap about 700px on most lessons.
    • A sticky shorter column: it can only move as far as the gap, so it barely shows, and the gap ends up at the top instead.
    • Equal height with footers pinned to the bottom: this left a hole in the middle of short statements.
  • Equal-height cards fix the gap in both directions. The spare space stays inside the shorter card, and both cards end on the same line as the example cards below them. At 900px and below the cards stack as before.

Checked

@coderabbitai

coderabbitai Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: ed0d7b9e-66a0-4958-a8c6-52654dea789d


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.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ ac6cac0 2026-09-28T06:25:39.425Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ ffdeaa7 2026-09-27T04:59:19.089Z Visit the dashboard ↗

- Each part 3 solution's heading is a disclosure button (aria-expanded,
  aria-controls). The approach chosen in 2·1 starts open, the others fold
  to their heading; choosing another approach opens it too. Folds hold
  across the five language panes, a page-language switch and deep links.
  Copy still copies a folded solution.
- The part 3 language tabs stick under the masthead until part 3 ends.
- On phones the language tabs keep to one row (two rows of touch-sized
  tabs made a 94px sticky bar) and scroll sideways only at ~320px, where
  the selected tab is kept in view without moving the page.
The two cards stretch to their row's height instead of aligning to the
top, so the shorter one keeps its spare room inside its own card rather
than leaving a hole beside the taller one. Which is taller varies by
lesson (the statement on 20 of 46, the widget on 26), so this fixes both
directions; below 900px they stack as before.
@devmtnaing
devmtnaing merged commit c126c14 into main Sep 28, 2026
52 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.

1 participant