feat(condensed): add condensed view support for Provider components#168
feat(condensed): add condensed view support for Provider components#168garrity-miepub merged 21 commits intomainfrom
Conversation
- Add 10 data-slot attributes to ProviderCard, ProviderCardGrid - Add data-variant attribute for variant-aware CSS targeting - Add condensed CSS overrides for all 3 variants (compact, list, featured) - Condense logo, content padding, header, address, phone, services, footer - Featured variant strips p-6 padding and matches compact density
Deploying ui with
|
| Latest commit: |
01bcee5
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ce58ca1a.ui-6d0.pages.dev |
| Branch Preview URL: | https://feature-condensed-view-provi-8bpu.ui-6d0.pages.dev |
There was a problem hiding this comment.
Pull request overview
Adds condensed-mode styling hooks and CSS overrides for ProviderCard/ProviderCardGrid so the component can be density-adjusted in the existing body.condensed styling system.
Changes:
- Added
data-slothooks to keyProviderCardsub-elements (root, logo, content, header, address, phone, services, footer) plusProviderCardGrid. - Added
data-varianton theProviderCardroot for variant-aware condensed CSS targeting. - Implemented condensed CSS overrides for
compact,list, andfeaturedvariants (logo sizing, padding, typography, spacing, grid gap, and empty-state sizing).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/styles/condensed-view.css | Adds condensed CSS rules targeting the new ProviderCard/ProviderCardGrid data-slot/data-variant hooks. |
| src/components/ProviderCard/ProviderCard.tsx | Adds data-slot and data-variant attributes to ProviderCard elements for condensed-view styling. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…mponents Tooltip wraps triggers in <div class='relative inline-flex'>, breaking structural selectors (> span, > div > div). - Add data-slot='provider-card-verified' to VerifiedBadge span - Add data-slot='provider-card-safe-notice' to SafeFromWildfiresNotice div - Replace structural selectors with data-slot selectors in condensed CSS
- Add 11 data-slot attributes across all sub-components - Add condensed CSS for action bar, breadcrumb, mobile back button, logo (2.5rem), provider name, social links, verified badge, address, book button, report/claim links, compact header variant - Logo reduced from 8rem to 2.5rem in condensed mode
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Move {...props} before data-slot/data-variant in ProviderCard to prevent
consumer override of internal attributes
- Scope book button CSS to provider-detail-content instead of
provider-detail-header to avoid affecting action bar buttons
- Add 6 data-slot attributes (root, header, stats grid, stat card, quick actions card, recent activity card) - Add condensed CSS for header logo, stat cards, quick actions, recent activity items, card headers/content
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
src/components/ProviderOverview/ProviderOverview.tsx:446
StatCardusesrole="button"/tabIndex=0, but the keyboard handler only triggers on Enter. For button-like divs, Space should also activate the action (and typically callspreventDefault()on Space to avoid page scroll). Consider updatingonKeyDownto handle both Enter and Space for better keyboard accessibility.
data-slot="provider-overview-stat"
role={onClick ? 'button' : undefined}
tabIndex={onClick ? 0 : undefined}
onClick={onClick}
onKeyDown={(e) => e.key === 'Enter' && onClick?.()}
className={`rounded-lg border border-gray-200 bg-white p-4 dark:border-gray-700 dark:bg-gray-900 ${onClick ? 'cursor-pointer hover:border-gray-300 dark:hover:border-gray-600' : ''} `}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Replace gap with margin-top overrides for activity list (space-y-3 uses margins, not gap on block containers) - Add data-slot attributes to loading skeleton branch for consistent condensed styling during loading states
- Add 5 data-slots: provider-search, provider-search-input, provider-search-results, provider-search-hero, provider-search-hero-title - Condensed CSS: smaller input row (2rem buttons), compact hero variant (0.9375rem title, 0.6875rem subtitle, 20rem max-width)
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Add 4 data-slots: provider-search-filters, provider-service-select, provider-compact-filter, provider-active-filters - Condensed CSS: smaller inputs (1.75rem height), compact labels, tighter CompactFilterBar (1.5rem inputs), smaller ActiveFilters pills
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
src/components/ProviderOverview/ProviderOverview.tsx:452
StatCardusesrole="button"on a<div>but itsonKeyDownonly activates on Enter. For keyboard accessibility, Space should also activate (and should callpreventDefault()to avoid page scroll). Update the key handler to treat Space the same as Enter whenonClickis provided.
<div
data-slot="provider-overview-stat"
role={onClick ? 'button' : undefined}
tabIndex={onClick ? 0 : undefined}
onClick={onClick}
onKeyDown={(e) => e.key === 'Enter' && onClick?.()}
className={`rounded-lg border border-gray-200 bg-white p-4 dark:border-gray-700 dark:bg-gray-900 ${onClick ? 'cursor-pointer hover:border-gray-300 dark:hover:border-gray-600' : ''} `}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…iceTag selector - Scope a[href*='maps'] to provider-detail-content to avoid hitting Directions action button in ActionButtonsBar - Add data-slot='provider-service-tag' on ServiceTag span and target it directly instead of broad 'span' selector that hit dropdown options
- Add 5 data-slots: provider-settings, provider-settings-header, provider-settings-notifications, provider-settings-scheduling, provider-settings-payments (plus skeleton) - Condensed CSS: smaller header (1rem title), compact tabs, tighter cards/inputs/labels, smaller toggle rows, compact payment method cards
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…s root spacing - Wrap Quick Actions and Recent Activity Cards in div wrappers so data-slot doesn't override Card's built-in data-slot='card' - Replace gap (no effect on block container) with margin-top on provider-settings root > * + * for proper condensed spacing - Update PR description to include ProviderSearchFilters + ProviderSettings
- Add 6 data-slots: recurring-service-card, recurring-service-header, recurring-service-body, recurring-service-add, recurring-service-modal, recurring-service-grid - Condensed CSS: compact card (1px border, 0.5rem radius), smaller header/body/field values, tighter grid gap, compact modal form
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Add 7 data-slots: report-dashboard, report-dashboard-header, report-dashboard-metrics, report-dashboard-chart, report-dashboard-top-lists, report-dashboard-services, report-dashboard-employers (plus skeleton) - Chart/Services/Employers Cards wrapped in divs to preserve Card's built-in data-slot='card' - Condensed CSS: compact header, smaller metric cards (1.125rem value), shorter chart (8rem), smaller ranked items with thinner progress bars
… className
- ProviderSettings: move data-slot off TabsContent onto inner div wrappers
for Notifications, Scheduling, and Payments tabs (preserves built-in
data-slot='tabs-content')
- ProviderSettings: replace template literal className with cn() utility
- ProviderOverview: replace template literal className with cn() utility
- Both files: add import { cn } from '../../utils/cn'
- 7 data-slots: schedule-calendar, schedule-calendar-header, schedule-calendar-grid, schedule-calendar-day-headers, schedule-calendar-time-labels, schedule-calendar-appointment, schedule-calendar-legend - Condensed CSS: compact header (0.5rem padding, 1.75rem buttons), narrower time labels (2.75rem), shorter hour rows (2.5rem), smaller appointment text, compact legend - Switch className to cn() utility for safe undefined handling
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- 8 data-slots: service-accordion, service-accordion-category, service-accordion-category-header, service-accordion-category-content, service-accordion-subcategory, service-accordion-link, service-tag-cloud, service-list - Condensed CSS: compact headers (0.5rem padding), smaller text (0.8125rem), tighter content/link spacing, smaller icons, compact tag cloud pills, reduced list row height - Covers all variants (default, bordered, cards) and sub-components (ServiceTagCloud, ServiceList, ServiceLink)
…Name - Move data-slot from Card to wrapper div for both ServiceCard and AddServiceCard (preserves Card's built-in data-slot='card') - Switch template literal className to cn() utility - Update condensed CSS selectors to target [data-slot='card'] child
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
src/components/ScheduleCalendar/ScheduleCalendar.tsx:368
- This element uses
role="button"/tabIndex={0}but only activates on Enter. For keyboard accessibility it should also activate on Space (and typically calle.preventDefault()for Space to avoid page scroll).
<div
key={appointment.id}
data-slot="schedule-calendar-appointment"
role="button"
tabIndex={0}
className={`absolute right-1 left-1 cursor-pointer overflow-hidden rounded border-l-4 px-2 py-1 text-xs text-white ${getStatusColor(appointment.status)}`}
style={{
top: position.top,
height: position.height,
minHeight: '1.5rem',
}}
onClick={() => onAppointmentClick?.(appointment)}
onKeyDown={(e) =>
e.key === 'Enter' && onAppointmentClick?.(appointment)
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- 5 data-slots: service-pricing-manager, service-pricing-header, service-pricing-filters, service-pricing-table, service-pricing-row - Condensed CSS: compact header (1.125rem title), tighter filter card, smaller inputs/buttons, compact table rows and badges - Switch className to cn() utility, fix duplicate Modal open prop
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Add
data-slotattributes and condensed CSS overrides for all Provider components:data-variantfor variant-aware CSS, compact/list/featured condensed stylingAll components use structural
data-slotselectors incondensed-view.csswithbody.condensedscoping. Props spread order ensuresdata-slot/data-variantcannot be overridden by consumers.