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

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
Assignees
Labels
dev Requires technical expertise

Comments

@mj-hof
Copy link
Collaborator

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

Figma

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 this to onyx Aug 30, 2024
@mj-hof mj-hof converted this from a draft issue Aug 30, 2024
@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 larsrickert moved this from New to Backlog in onyx Nov 6, 2024
@larsrickert
Copy link
Collaborator

Idea: Check out new temporal date API

@larsrickert larsrickert moved this from Backlog to Ready in onyx Nov 7, 2024
@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
@larsrickert larsrickert self-assigned this Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev Requires technical expertise
Projects
Status: In Progress
Development

No branches or pull requests

2 participants