Skip to content

fix(explore): expert booking calendar — viewport-fit dialog, nav z-stack, per-day availability dots - #1229

Draft
teetangh wants to merge 11 commits into
devfrom
fix/explore-booking-responsive
Draft

fix(explore): expert booking calendar — viewport-fit dialog, nav z-stack, per-day availability dots#1229
teetangh wants to merge 11 commits into
devfrom
fix/explore-booking-responsive

Conversation

@teetangh

Copy link
Copy Markdown
Contributor

Problem

On the Explore Experts details page (/explore/experts/[consultantId]):

  1. Booking dialog buried under the navbar — the Book Now dialog used the shadcn default z-50 while the fixed navbar is z-[1000] and the announcement bar z-[1001], so the nav painted above the modal.
  2. Dialog/calendar cropped at the bottom — fixed-size calendar cells + unbounded slot list made the dialog grow past the viewport on short screens with no usable scroll affordance.
  3. Pricing sidebar stuck under the navsticky top-24 (96px) sat under the real chrome stack (80px nav + ~40px announcement bar ≈ 120px).
  4. No way to see which dates have slots — every calendar day rendered identically; availability was fetched only after clicking a day.

Fix

  • Dialog z-order: inline zIndex: 1002 on the Book Now DialogContent (merge-order-proof vs the z-50 base class). Matches the z-[1002] pattern already used by TrialBookingModal/SubscriptionPricingToggle.
  • Viewport-fit dialog: calendar cell size driven by a --cell: clamp(26px, 5.2dvh, 42px) CSS var so 6 rows + legend always fit; compact header/footer chrome; slot list capped (30dvh mobile / 350px desktop) with internal scroll; description + schedule note hidden on tight screens. The whole dialog now shrinks with the screen instead of overflowing it.
  • Per-day availability dots: month-wide rollup from the existing /api/slots/availability-with-allocation range endpoint (today → month end, lazy re-fetch on month flip, stale-response guard) rendered as emerald (open) / amber (partially booked) / rose (fully booked) / zinc (no slots) dots under each date, with a legend. Past and zero-slot days are disabled; fully-booked days stay clickable to show the rose slot list; prev-month arrow disabled on the current month. No backend changes.
  • Sidebar sticky offset: xl:sticky xl:top-[calc(var(--header-height,5rem)+1rem)] — header-aware and only sticky where the two-column layout exists.

Verification

  • tsc --noEmit + ESLint clean on touched files.
  • Visual checks on the Netlify preview at 375 / 768 / 1280 / 1536 px widths (screenshots in comments).

…ay availability dots

- Book Now dialog: inline zIndex 1002 so the fixed navbar (z-[1000]) and
  announcement bar (z-[1001]) can no longer paint above it; compact
  header/footer chrome; slot list capped (30dvh mobile / 350px desktop)
  with internal scroll so the dialog never grows past the viewport.
- Calendar: cell size driven by a --cell clamp(26px, 5.2dvh, 42px) var so
  all rows + legend fit on screen at any height; weekday header and grid
  center cells; description and schedule note hidden on tight screens.
- Calendar now shows which dates have slots: month-wide rollup from the
  existing availability range endpoint (today -> month end, lazy per
  month flip) rendered as emerald/amber/rose/zinc dots with a legend;
  past and zero-slot days disabled; prev-month arrow disabled on the
  current month.
- Sidebar pricing card sticks below the real header stack via
  xl:top-[calc(var(--header-height)+1rem)] instead of top-24.
@netlify

netlify Bot commented Aug 23, 2026

Copy link
Copy Markdown

Deploy Preview for familiarise ready!

Name Link
🔨 Latest commit 3dd95d1
🔍 Latest deploy log https://app.netlify.com/projects/familiarise/deploys/6a8b2fd1400e89000803d8d5
😎 Deploy Preview https://deploy-preview-1229--familiarise.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 38 (🔴 down 19 from production)
Accessibility: 90 (no change from production)
Best Practices: 83 (no change from production)
SEO: 82 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2530d09f-abb6-4a3c-966d-637448bfc109

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

💥 Parsing errors (1)
Validation error: Too big: expected string to have <=250 characters at "tone_instructions"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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

…olling

Dialog is now a fixed-height (85dvh) flex column with container-type:
size — header/footer stay fixed, the two panes flex, and only the slot
list scrolls internally. Calendar cells size off the dialog's real
height via cqh container units (--cell clamp), so the grid can never
push the dialog past the screen. Dropped the duplicate calendar legend;
the slot list legend doubles as the dot key.
8cqh-of-dialog cells ignored the chrome share of the pane, so the last
week row spilled outside the card on shorter screens. The card is now
the size container at md+ and cells derive from its real height
(clamp(22px, 16.6cqh - 30px, 48px)); card clips overflow; mobile stack
scrolls the body and caps the slot list at 40dvh.
@teetangh teetangh self-assigned this Aug 23, 2026
…h variant)

At short viewport heights the side-by-side dialog left the calendar
card ~217px — six week rows can never fit. New 'mdh' custom variant
(min-width 768px + min-height 700px) gates the two-column, no-scroll
layout; shorter screens use the stacked layout with body scroll.
Chrome slimmed (header/desc/footer/card padding) and cell formula
retuned to the card's real chrome.
… mdh layout

flex-basis:0 children of auto-height parents collapsed the stacked
fallback to ~97px, clipping the calendar. flex-1 now applies only at
mdh where the dialog has a fixed height; stacked mode sizes by content.
… full-screen on phones

Per the SaaS scheduling pattern (Cal.com/Calendly): the booking flow is
the task, so the sheet takes 92dvh and up to 1200px wide on desktop and
goes full-bleed below sm. The mdh two-column threshold drops to 620px
height — at the previously-cramped 662px viewports the side-by-side
no-scroll layout now fits with ~36px cells.
…size by content

min-h-0 let flex-shrink crush the card below its content when the body
grid's auto rows resolved small on mobile; the calendar clipped at ~4
rows. Panes/card/list now keep natural height outside mdh.
@sonarqubecloud

Copy link
Copy Markdown

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