-
Notifications
You must be signed in to change notification settings - Fork 3
feat: create the year-range-slider component #31
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
Conversation
❌ Deploy Preview for ucla-components-storybook failed. Why did it fail? →
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR creates a new YearRangeFilter component for the Vue component library, providing a dual-range slider with numeric inputs for selecting year ranges or other numeric ranges.
- Implements a complete dual-range slider component with number inputs and visual range slider
- Adds comprehensive styling with hover states, focus states, and disabled states
- Includes Storybook stories for different use cases and Cypress test coverage
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| _year-range-filter.scss | Adds complete SCSS styling for the year range filter component including inputs, sliders, buttons, and responsive states |
| YearRangeFilter.stories.js | Provides Storybook stories demonstrating different configurations of the component |
| YearRangeFilter.spec.js | Adds comprehensive Cypress test coverage for all component variations and accessibility features |
| YearRangeFilter.vue | Implements the main Vue component with dual-range functionality, event handling, and proper prop validation |
| index.ts | Exports a different component name than what was actually created |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| if (!target) | ||
| return | ||
| const value = Number.parseInt(target.value) || props.min |
Copilot
AI
Sep 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using Number.parseInt() will truncate decimal values, but the component accepts a step prop that could be decimal (e.g., 0.5 in the SmallRange story). This should use Number.parseFloat() instead to properly handle decimal step values.
| if (!target) | ||
| return | ||
| const value = Number.parseInt(target.value) || props.max |
Copilot
AI
Sep 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using Number.parseInt() will truncate decimal values, but the component accepts a step prop that could be decimal (e.g., 0.5 in the SmallRange story). These should use Number.parseFloat() instead to properly handle decimal step values.
| if (!target) | ||
| return | ||
| const value = Number.parseInt(target.value) |
Copilot
AI
Sep 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using Number.parseInt() will truncate decimal values, but the component accepts a step prop that could be decimal (e.g., 0.5 in the SmallRange story). These should use Number.parseFloat() instead to properly handle decimal step values.
Co-authored-by: Copilot <[email protected]>
* adds components list * Update COMPONENTS.md * Update COMPONENTS.md * Update COMPONENTS.md * Update COMPONENTS.md * adds notes * Update COMPONENTS.md * claimed component * Update COMPONENTS.md * claim a component * claim a component * Update COMPONENTS.md * Update COMPONENTS.md * Update COMPONENTS.md * take a component * take a component * take a component * Update COMPONENTS.md * Update COMPONENTS.md * Adjust the component name - already exists * take a component * take a component * Update COMPONENTS.md - marks footer as already existing * Update COMPONENTS.md * Update COMPONENTS.md * Update COMPONENTS.md * Update COMPONENTS.md - marking BentoPod * add component * add component * Update COMPONENTS.md * Update COMPONENTS.md * take a component * take a component * fix component description * Update COMPONENTS.md Component exists * Update COMPONENTS.md * change component's name * Update COMPONENTS.md Clean up the list somewhat - added a new component for the bento-box-result, as bento-bod is allready.a different component. - removed a footer component as it doesn't really exist. - added some checkboxes to taken/completed compoents * take a component * take a component * take a component * remove AssetFeaturedImage definition * take a component * take a components * take a components * take a component * take a component * add a new line * add detailed component description * add detailed component description * take a component * update component description * Adds a button component * Update COMPONENTS.md * Update COMPONENTS.md * Update COMPONENTS.md * Clean up components.md * Taking the block-collection component * Taking the grid-collections component as well. * Update COMPONENTS.md * Clean up component list * add spacing * add spacing * update component name * Update Button definition * Update COMPONENTS.md * Update COMPONENTS.md * Remove duplicates * remove duplicates * remove duplicates * Remove already existing components * take a component * update package * add a component * Take a component * adjust prop for block anchor nav * take a component * Update COMPONENTS.md * Taking the DropdownSingleSelect * Take the ButtonDropdownSearch component * feat: create ButtonDropdownSearch * Create ButtonDropdownSearch.spec.js * Fix linter errors * Adds a prop for a longer field. * adding the correct packageMenager version for netlify to see. pnpm Netlify supports pnpm for Node.js 16.9.0 and later. If your site’s base directory includes a pnpm-lock.yaml file, we will run pnpm install to install the dependencies listed in your package.json. To specify a pnpm version, you can edit your package.json file: "packageManager": "[email protected]" This tells Corepack to use and download your preferred pnpm version instead of the default version that Netlify sets. * update component * Update COMPONENTS.md * Marking a component as taken * Remove packageManager field from package.json * Update component statuses and remove completed items Updated the status of various components to reflect their existence and removed existing components from the list. * Update COMPONENTS.md * Taking the FiltersDropdown * Update COMPONENTS.md * Add note regarding existing header component tweaks Added a note about existing similar functionality that requires tweaks. * Update RefineSearchPanel ownership in COMPONENTS.md * Update DetailMedia component owner to Svebor * Update component list * Clarify CTAHexButton entry in COMPONENTS.md * Update COMPONENTS.md to remove and modify components Removed BlockMediaViewer and updated BlockRichText entry. Adjusted completion status for DetailMedia. * Update component status and ownership in COMPONENTS.md * Update component ownership in COMPONENTS.md * adjust dropdown padding and height * lint fix * checin on component before making a PR * clean up before PR to UCLA * add dlc variant for nav search * lint fix * lint fix * dummy * adjust dropdown single select * adjust for dropdown single select * lint fix --------- Co-authored-by: dchiamp <[email protected]> Co-authored-by: Svebor Sorić <[email protected]> Co-authored-by: Austin Blanchard <[email protected]> Co-authored-by: Parinita Mulak <[email protected]>
# [@ucla-library-monorepo/ucla-library-website-components-v1.41.0](https://github.com/UCLALibrary/ucla-library-website-components/compare/@ucla-library-monorepo/ucla-library-website-components-v1.40.3...@ucla-library-monorepo/ucla-library-website-components-v1.41.0) (2025-10-27) ### Features * Add DLC theme for NavSearch ([UCLALibrary#840](UCLALibrary#840)) ([0a80b3a](UCLALibrary@0a80b3a))
# [@ucla-library/component-library-nuxt-module-v1.2.91](https://github.com/UCLALibrary/ucla-library-website-components/compare/@ucla-library/component-library-nuxt-module-v1.2.90...@ucla-library/component-library-nuxt-module-v1.2.91) (2025-10-27)
…CLALibrary#850) * fix: APPS-3515 add new social icons for FTVA footer primary * fix: linting issues * fix: add clock icon to BlockCallToAction * revert pnpm-lock.yaml --------- Co-authored-by: angelahuqing <[email protected]>
# [@ucla-library-monorepo/ucla-library-website-components-v1.41.1](https://github.com/UCLALibrary/ucla-library-website-components/compare/@ucla-library-monorepo/ucla-library-website-components-v1.41.0...@ucla-library-monorepo/ucla-library-website-components-v1.41.1) (2025-10-28) ### Bug Fixes * APPS-3521 Add clock icon in info block in FPB BlockCallToAction ([UCLALibrary#850](UCLALibrary#850)) ([92ed909](UCLALibrary@92ed909))
# [@ucla-library/component-library-nuxt-module-v1.2.92](https://github.com/UCLALibrary/ucla-library-website-components/compare/@ucla-library/component-library-nuxt-module-v1.2.91...@ucla-library/component-library-nuxt-module-v1.2.92) (2025-10-28)
# [@ucla-library-monorepo/ucla-library-website-components-v1.41.2](https://github.com/UCLALibrary/ucla-library-website-components/compare/@ucla-library-monorepo/ucla-library-website-components-v1.41.1...@ucla-library-monorepo/ucla-library-website-components-v1.41.2) (2025-10-28) ### Bug Fixes * override prettier for yaml files and add percy yml for reducing snapshots ([UCLALibrary#856](UCLALibrary#856)) ([cadbe43](UCLALibrary@cadbe43))
# [@ucla-library/component-library-nuxt-module-v1.2.93](https://github.com/UCLALibrary/ucla-library-website-components/compare/@ucla-library/component-library-nuxt-module-v1.2.92...@ucla-library/component-library-nuxt-module-v1.2.93) (2025-10-28)
…via the arrow inputs - adjusts the spec.js file - adjusts the component and its css to make room for the min/max slider handles when they are very close next to each other,
* fix: emit link click event * fix: remove emit, use watcher instead * fix: cleanup console logs * fix: one more console log * fix: remove unused vars --------- Co-authored-by: Jess Divers <[email protected]>
# [@ucla-library-monorepo/ucla-library-website-components-v1.41.3](https://github.com/UCLALibrary/ucla-library-website-components/compare/@ucla-library-monorepo/ucla-library-website-components-v1.41.2...@ucla-library-monorepo/ucla-library-website-components-v1.41.3) (2025-10-31) ### Bug Fixes * APPS-3574 emit link click event ([UCLALibrary#857](UCLALibrary#857)) ([01388a4](UCLALibrary@01388a4))
# [@ucla-library/component-library-nuxt-module-v1.2.94](https://github.com/UCLALibrary/ucla-library-website-components/compare/@ucla-library/component-library-nuxt-module-v1.2.93...@ucla-library/component-library-nuxt-module-v1.2.94) (2025-10-31)
No description provided.