Skip to content

WEB-8153: Calendar today indicator + disabled-day polish + audit cleanup#229

Open
codingwolf-at wants to merge 3 commits into
mainfrom
WEB-8153/calendar-design-docs
Open

WEB-8153: Calendar today indicator + disabled-day polish + audit cleanup#229
codingwolf-at wants to merge 3 commits into
mainfrom
WEB-8153/calendar-design-docs

Conversation

@codingwolf-at

@codingwolf-at codingwolf-at commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a current-date indicator to Calendar, sharpens the disabled-day treatment, and folds in a production-readiness audit pass ahead of locking the component.

Features

  • Today dot — the current date now carries a 6px icon/accent/subtle dot, centered 4px above the bottom edge of the 40px day cell (Figma spec). Renders in every state, including inside a selected pill and mid-range.
  • Disabled days — added opacity-60 on top of the text-disabled tone so disabled days clearly recede from enabled ones (they were nearly indistinguishable before).

Audit cleanup

  • API scopeCalendarProps now drops numberOfMonths / captionLayout / showWeekNumber. calendarClassNames doesn't style those layout modes, so they would have rendered with react-day-picker's unstyled default classes. Passing them is now a compile error instead of a silent broken layout.
  • Perf — hoisted the Chevron render to module scope. It was defined inline in components, giving it a new identity every render, which made react-day-picker remount the chevron subtree each time.
  • Nav disabled state — the States element story pinned native disabled, but the class dims via aria-disabled: and react-day-picker sets aria-disabled (not native disabled) at the month bounds — so the dimmed nav state never actually rendered. Fixed the pinned attribute and added canary coverage (previously untested).
  • Consistency — deduped the two identical nav-button class strings into one navButton const, and aligned its disabled opacity 5060 to match the system-wide disabled convention.

Testing

  • vp check — clean (format, lint, types).
  • Story tests green: TodayIndicator, Behavior, KeyboardNavigation (components); States / StatesCanary (elements). Canary now asserts dot geometry (6×6, bottom 4px), disabled opacity, and nav-disabled dim.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Improvement (change that would cause existing functionality to not work as expected)
  • Code refactoring
  • Performance improvements
  • Documentation update

Snapshot

Screenshot 2026-07-15 at 5 21 50 PM Screenshot 2026-07-15 at 5 22 02 PM

Figma URL

- Introduced a new story, TodayIndicator, demonstrating the visual representation of the current date with a 6px accent dot.
- Enhanced existing tests to verify the dot's presence and dimensions when today is selected or unselected.
- Updated comments to clarify the behavior of the today indicator and its interaction with selected states.
- Refined styles for the today and disabled states to improve visual consistency and accessibility.
@github-actions

Copy link
Copy Markdown

📚 Storybook preview: https://pr-229-propel-storybook.vamsi-906.workers.dev

- Updated `CalendarProps` to omit additional props (`numberOfMonths`, `captionLayout`, `showWeekNumber`) that are not styled by propel tokens, ensuring layout consistency.
- Introduced a stable `renderChevron` function to optimize the rendering of navigation chevrons, preventing unnecessary remounts.
- Modified calendar button styles to use a shared `navButton` class for consistent disabled state representation using `aria-disabled`.
- Updated stories to reflect changes in button accessibility and visual behavior when disabled.
@codingwolf-at codingwolf-at changed the title Add TodayIndicator story to Calendar component with accent dot behavior [WIP] WEB-8153: Calendar today indicator + disabled-day polish + audit cleanup Jul 14, 2026
@makeplane

makeplane Bot commented Jul 14, 2026

Copy link
Copy Markdown

Linked to Plane Work Item(s)

References

This comment was auto-generated by Plane

@@ -30,12 +50,7 @@ export function Calendar(props: CalendarProps) {
classNames={calendarClassNames}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The supplied spec requires a Monday-first week order, but DayPicker defaults to Sunday and the new stories render Su first. Could we set weekStartsOn={1} here, while still allowing a deliberate consumer override?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

"[&:not([aria-selected])>button]:text-accent-primary [&>button]:font-semibold after:absolute after:bottom-1 after:left-1/2 after:-translate-x-1/2 after:size-1.5 after:rounded-full after:bg-(--txt-icon-accent-subtle)",
// Disabled days read as muted, non-interactive text — `opacity-60` on top of the disabled
// tone (the propel disabled convention) so they clearly recede from enabled days.
disabled: "[&>button]:text-disabled [&>button]:opacity-60 [&>button]:pointer-events-none",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The disabled-date spec uses the text/disabled token at full opacity. Adding opacity-60 makes it materially lighter than Figma; can we rely on text-disabled alone?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

… state styles

- Set the calendar to start weeks on Monday by default (`weekStartsOn={1}`) to align with specifications.
- Enhanced comments to clarify the behavior of disabled day buttons, ensuring they match the design specifications without additional opacity.
- Adjusted styles for disabled days to maintain consistency with other disabled controls, improving visual clarity and accessibility.
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