Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

story(sbb-calendar): week numbers and multiple selection #3370

Open
9 tasks
kyubisation opened this issue Jan 24, 2025 · 0 comments
Open
9 tasks

story(sbb-calendar): week numbers and multiple selection #3370

kyubisation opened this issue Jan 24, 2025 · 0 comments
Labels
complexity: L Can be done in a fortnight proposal: accepted

Comments

@kyubisation
Copy link
Contributor

kyubisation commented Jan 24, 2025

Feature Description

Depends on #3336

We received additional requirements from KIS (Customer Information Systems) for the sbb-calendar.
These features are specific to the sbb-calendar and are not configurable in the datepicker.

https://www.figma.com/design/mWknI2rC5DJmOgRO61WKai/Lyne-Components?m=auto&node-id=7491-17

Week Numbers:

  • We want to have a property weekNumbers: boolean = false on whether to display the week numbers in addition to the week days
  • Should have the same look and feel as the existing week days labels
  • In wide mode this should be displayed for both months (i.e. the labels are rendered in both months separately)
  • Must be calculated (see https://en.wikipedia.org/wiki/ISO_8601#Week_dates , "It defines weeks that start on a Monday. It also says Week 1 of a year is the one which contains at least 4 days from the given year.")

Multiple selection:

  • We want to have a property multiple: boolean = false on whether multiple selections should be allowed
  • Change type of property selected from SbbDateLike<T> | null to SbbDateLike<T> | SbbDateLike<T>[] | null.
    • The getter should return the following:
      • null when nothing is selected
      • a single instance of a date if only a single date is selected
      • an array if multiple dates are selected
  • The week day and week number (if configured) are now clickable and when clicked should select either the entire week or all related week days
    • When there are already selected dates in the given week day/number range, these stay selected with the previously unselected now being selected as well. If all dates in the given range are already selected, all are deselected.
  • The selection interaction needs to be extended. When pressing CTRL or CMND on macOS and selecting a date, the selection is added to the existing selection. If neither CTRL nor CMND is pressed, the new selection replaces the existing selection. Both behaviors also apply to clicks on week day/number labels.
    • When there are already selected dates in the given week day/number range, these stay selected with the previously unselected now being selected as well. If all dates in the given range are already selected, all are deselected.

Definition of Done

  • Feature is implemented
  • Documentation is provided
  • Tests are implemented
  • Storybook stories are implemented
  • Navigation via keyboard is tested
  • Screen reader output is tested
  • High-contrast is tested
  • Remaining accessibility is tested
  • UX approved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complexity: L Can be done in a fortnight proposal: accepted
Projects
Development

No branches or pull requests

1 participant