UCLALibrary / ucla-library-website-components

This is a library of Vue components that will be used in UCLA Library Nuxt websites.
Other
4 stars 1 forks source link

feat: APPS-2076 Create DateFilter component and install Vue3Datepicker #476

Closed farosFreed closed 3 months ago

farosFreed commented 3 months ago

Connected to APPS-2076

Component Created: DateFilter.vue

Stories: ~/stories/DateFilter.stories.js

Spec: ~/stories/DateFilter.spec.js

Notes: Our custom DateFilter.vue component implements the Vue3Datepicker component and makes use of the slots and methods to create a custom datepicker that matches these mockups from design.

DATA IN

DateFilter.vue has 3 optional props: eventDates - an array of strings representing Dates ex: ['2/29/2024', '2/29/2024', '2/29/2024', '2/29/2024', '3/1/2024', '3/2/2024', '3/2/2024', '3/4/2024', '3/6/2024', '3/8/2024', '3/19/2024', '3/19/2024', '3/19/2024', '3/19/2024', '3/19/2024', '3/19/2024',] If it is difficult to get the event data from Craft CMS in this format, we may need to rework parts of this component.

hideInput - If true, the datepicker will be shown in 'inline' mode I created a story to show this behavior. The default is false, so the input field will be shown by default.

initialDates - an object representing a selected date when the datefilter is initially loaded. It looks like { startDate: Date | null, endDate: Date | null }

DATA OUT

DateFilter.vue emits the 'input-selected' event and passes the currently selected Date or Date(s) when the user presses the 'done' button after selecting a date.

Before passing the selected Date, it will be formatted into the same format as the initialDate, ex: { startDate: Date | null, endDate: Date | null }

Checklist:

github-actions[bot] commented 3 months ago

Percy Screenshots

In order to conserve our percy screenshot allowance, percy is not configured to run automatically. Please make sure the PR is ready and all other checks are passing, then start it manually:

  1. Visit https://github.com/UCLALibrary/ucla-library-website-components/actions/workflows/percy.yml 2. Click the 'Run workflow' button in the blue bar. 3. Select the correct branch for this PR and click 'Run workflow' again to confirm.
github-actions[bot] commented 3 months ago

🚀 Deployed on https://deploy-preview-476--ucla-library-storybook-vue3x.netlify.app

farosFreed commented 3 months ago
Screenshot 2024-03-20 at 2 12 20 PM
farosFreed commented 3 months ago

Met with Axa and Selena Mar 20th for a design review, these changes / bugs were brought up during review:

I'll work on these changes next 🛠️

farosFreed commented 3 months ago

Reviewed with developer team March 25th, these revisions were requested and added:

pghorpade commented 3 months ago

:tada: This PR is included in version 2.39.0-alpha.54 :tada:

The release is available on:

Your semantic-release bot :package::rocket: