# Dialog

## 2026-08-12 — Tall dialogs scroll inside themselves

**Prompted by:** Hellen Tran (PO) — a tall dialog (Request Reschedule) couldn't scroll to its footer

### What changed
- `DialogContent` now caps its height at `calc(100dvh - 2rem)` and sets `overflow-y-auto`, so a
  dialog taller than the viewport scrolls internally instead of running its Note field and footer
  buttons off the bottom of the screen.

### Why
- On short viewports (mobile, or a stacked responsive layout) a content-heavy dialog exceeded the
  viewport height. With no height cap the overflow was unreachable — the Submit/Cancel footer sat
  below the fold with no scroll. Capping to the viewport keeps the whole dialog reachable.

### Affected tokens / files
- `packages/shadcn/src/components/ui/dialog.tsx`

## 2026-08-11 — Fixed-size dialogs now shrink to fit narrow viewports

**Prompted by:** Hellen Tran (PO) — responsive dialog review

### What changed
- `DialogContent` fixed sizes (`sm`…`4xl`, `full`) now set their inline `maxWidth` as
  `min(<size>, calc(100% - 2rem))` instead of the raw size.

### Why
- The inline `style` `maxWidth` overrode the `max-w-[calc(100%-2rem)]` className guard, so a
  fixed-size dialog (e.g. `lg` = 32rem) stayed 32rem on a phone and overflowed the screen. Folding
  the viewport guard into the inline value makes every fixed size shrink to a 1rem-gutter fit on
  small screens while staying at its cap on wide screens. (`size="auto"` was already viewport-safe
  via the className.)

### Affected tokens / files
- `packages/shadcn/src/components/ui/dialog.tsx`
