Skip to content
New issue

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

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

Already on GitHub? # to your account

Implement basic OnyxDatePicker #1818

Open
21 tasks
mj-hof opened this issue Aug 30, 2024 · 1 comment
Open
21 tasks

Implement basic OnyxDatePicker #1818

mj-hof opened this issue Aug 30, 2024 · 1 comment
Labels
dev Requires technical expertise

Comments

@mj-hof
Copy link
Contributor

mj-hof commented Aug 30, 2024

Depends on

Why?

We want to offer a date picker component where users can select a date or datetime, e.g. birthdays or meeting dates.
Because implementing a whole date picker from scratch is time consuming, we want to offer a "quick win" by already
offering a OnyxDatePicker component which uses the existing OnyxInput and the native HTML <input type="date" /> for the flyout.
Like this, the component mostly looks and feels like onyx and we can provide the component quicker.

Later, we can refactor it and build our own flyout with more advanced features.

Design

TODO

Acceptance criteria

  • a date can be selected
    • manually via keyboard
    • via flyout
  • a datetime can be selected
    • manually via keyboard
    • via flyout
  • the component considers the current i18n locale and the users browser preference for i18n
  • all features of the OnyxInput are supported, except properties that do not make sense for dates (e.g. type email)
  • if possible, the native HTML flyout aligns with the light/dark mode
  • a min and max date can be set
  • should work in all timezones

Implementation details

export type OnyxDatePickerProps = OnyxInputProps & {
  type?: "date" | "datetime";
};

Definition of Done

  • The following component requirements are implemented:
    • skeleton
    • density
    • example usage added to apps/demo-app/src/views/HomeView.vue
  • covered by tests
    • functional tests (Playwright or unit test)
    • visual tests (Playwright screenshots)
  • follow-up tickets were created if necessary
  • updated version + documentation is deployed
  • Storybook can show the feature
  • Storybook code snippet of new/changed examples are checked that they are generated correctly
  • Namings are aligned with Figma

Approval

  • Storybook
  • Deployed Docs
  • approved by designer @jannick-ux
  • approved by dev
@mj-hof mj-hof added the dev Requires technical expertise label Aug 30, 2024
@mj-hof mj-hof added this to the Date- & timepicker milestone Aug 30, 2024
@mj-hof mj-hof added the 0-refinement All issues that can or need to be estimated in our next refinement label Aug 30, 2024
@larsrickert
Copy link
Collaborator

Idea: Check out new temporal date API

@larsrickert larsrickert removed their assignment Nov 7, 2024
@larsrickert larsrickert removed the 0-refinement All issues that can or need to be estimated in our next refinement label Nov 7, 2024
@larsrickert larsrickert changed the title Implement basic datepicker Implement basic OnyxDatePicker Nov 11, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
dev Requires technical expertise
Projects
Status: Ready
Development

No branches or pull requests

2 participants