Skip to content

Improve treatment dialog and app responsiveness for narrow screens#99

Open
michaelwschultz wants to merge 2 commits intoms/move-to-tailwindfrom
cursor/treatment-dialog-responsiveness-2226
Open

Improve treatment dialog and app responsiveness for narrow screens#99
michaelwschultz wants to merge 2 commits intoms/move-to-tailwindfrom
cursor/treatment-dialog-responsiveness-2226

Conversation

@michaelwschultz
Copy link
Copy Markdown
Owner

@michaelwschultz michaelwschultz commented Mar 15, 2026

Summary

Improves the look and feel of the app, especially the treatment dialog, with full support for narrow screens (phones). Also fixes the build for Vercel deployment.

Build Fixes (Vercel deployment)

  • JSX namespace error: Replaced JSX.Element with React.ReactElement / ReactElement across all components to fix "Cannot find namespace 'JSX'" TypeScript error in React 19 / Next.js 16
  • Node version: Updated engines.node from 22.21.x to 24.x as requested
  • Added .nvmrc with Node 24 for Vercel and local development consistency

Treatment Dialog

  • Responsive layout: Treatment type buttons use 2 columns on mobile, 3 on larger screens
  • Touch targets: Min 44px height for accessibility
  • Styling: Rounded inputs, subtle shadows, clearer hierarchy
  • Safe area: Bottom padding for notched devices

Sheet / Dialog

  • Header: Primary-colored save button, safe-area support
  • Desktop modal: 480px width, improved shadow

Home & Layout

  • Responsive padding, primary-colored header button
  • Tabs horizontal scroll, footer and table improvements
Open in Web Open in Cursor 

- Treatment dialog: responsive 2-col grid on mobile for type buttons,
  min 44px touch targets, rounded inputs, safe-area padding
- Sheet: primary-colored save button, improved header with safe-area,
  narrower centered modal (480px) on desktop
- Header: primary-colored New treatment button
- Home: responsive padding (px-4 sm:px-6), section spacing
- Tabs: horizontal scroll on overflow, reduced gap on mobile
- Footer: responsive padding
- Treatment table: responsive cell padding, pagination layout

Co-authored-by: Michael Schultz <michaelwschultz@gmail.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hemolog-com Ready Ready Preview, Comment Mar 15, 2026 3:29am

@michaelwschultz michaelwschultz marked this pull request as ready for review March 15, 2026 00:30
height: calc(100% - 2rem * 2);
width: min(calc(100vw - 2rem), 480px);
max-width: 480px;
height: auto;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Desktop modal collapses to zero height

High Severity

On desktop (≥800px), .SheetWithKeyboard-content now sets height: auto. This class is applied to the same DOM element as .SheetProvider-content, which has container-type: size. Per CSS spec, container-type: size establishes block-axis size containment, meaning the element is sized as if it has no content. Combined with height: auto, this causes the element to collapse to zero height, making the modal invisible on desktop. The previous definite height (calc(100% - 2rem * 2)) worked correctly with container-type: size.

Additional Locations (1)
Fix in Cursor Fix in Web

- Replace JSX.Element with React.ReactElement across all components to fix
  'Cannot find namespace JSX' TypeScript error in React 19/Next.js 16
- Update engines.node from 22.21.x to 24.x per request
- Add .nvmrc with Node 24 for Vercel and local dev consistency

Co-authored-by: Michael Schultz <michaelwschultz@gmail.com>
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

There are 3 total unresolved issues (including 1 from previous review).

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

>
Preventative
</button>
</div>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Border width change causes layout jitter on selection

Medium Severity

The treatment type buttons use border (1px) in their inactive state and border-2 (2px) in their active state. When a user selects a button, the border grows by 1px on each side, causing visible layout jitter as the content area shifts. This affects all four type buttons (Prophy, Bleed, Preventative, Antibody). Using a consistent border width (e.g., always border-2 with a transparent color for inactive) would prevent the shift.

Additional Locations (1)
Fix in Cursor Fix in Web

>
Preventative
</button>
<div className='p-4 sm:p-6 pb-[max(1rem,env(safe-area-inset-bottom))]'>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bottom padding doesn't scale with responsive side padding

Low Severity

The class p-4 sm:p-6 pb-[max(1rem,env(safe-area-inset-bottom))] has a conflict: on sm+ viewports the side padding scales to 1.5rem via sm:p-6, but pb-[max(1rem,...)] caps the bottom at only 1rem (when safe-area is 0). In Tailwind v4 longhand overrides shorthand regardless of responsive variant, resulting in asymmetric padding on larger screens.

Fix in Cursor Fix in Web

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.

2 participants