-
Couldn't load subscription status.
- Fork 3
feat: create BlockCollection/GridCollections #20
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
base: main
Are you sure you want to change the base?
Conversation
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 introduces two new Vue components for displaying collections: a BlockCollection component for individual collection items and a GridCollections component that renders multiple collections in a responsive grid layout. The components support displaying collection metadata including images, titles, and descriptions with hover interactions.
- Creates
BlockCollectioncomponent for individual collection display with responsive images and hover effects - Creates
GridCollectionscomponent for grid-based collection layouts with responsive breakpoints - Adds Storybook stories with test data including edge cases for long text content
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| BlockCollection.vue | Individual collection block component with image, title, description and smart link functionality |
| GridCollections.vue | Grid container component that renders multiple BlockCollection components in a responsive layout |
| BlockCollection.stories.ts | Storybook stories for BlockCollection with default and long text scenarios |
| GridCollections.stories.ts | Storybook stories for GridCollections with multiple test scenarios |
Comments suppressed due to low confidence (1)
| id: 'collection-1', | ||
| href: 'https://www.example.com/1', | ||
| image: baseImage, | ||
| title: 'Rare Books', | ||
| description: 'A curated selection of rare and antique books from our archives.' | ||
| }, | ||
| { | ||
| id: 'collection-2', | ||
| href: 'https://www.example.com/2', | ||
| image: baseImage, | ||
| title: 'Historical Photos', | ||
| description: 'Photographs documenting Los Angeles history from the 19th and 20th centuries.' | ||
| }, | ||
| { | ||
| id: 'collection-3', |
Copilot
AI
Jul 21, 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.
Duplicate ID 'collection-1' found in the defaultItems array. This creates two items with the same ID, which violates the uniqueness requirement for component keys and could cause rendering issues.
| id: 'collection-1', | |
| href: 'https://www.example.com/1', | |
| image: baseImage, | |
| title: 'Rare Books', | |
| description: 'A curated selection of rare and antique books from our archives.' | |
| }, | |
| { | |
| id: 'collection-2', | |
| href: 'https://www.example.com/2', | |
| image: baseImage, | |
| title: 'Historical Photos', | |
| description: 'Photographs documenting Los Angeles history from the 19th and 20th centuries.' | |
| }, | |
| { | |
| id: 'collection-3', | |
| id: 'collection-4', | |
| href: 'https://www.example.com/1', | |
| image: baseImage, | |
| title: 'Rare Books', | |
| description: 'A curated selection of rare and antique books from our archives.' | |
| }, | |
| { | |
| id: 'collection-5', | |
| href: 'https://www.example.com/2', | |
| image: baseImage, | |
| title: 'Historical Photos', | |
| description: 'Photographs documenting Los Angeles history from the 19th and 20th centuries.' | |
| }, | |
| { | |
| id: 'collection-6', |
| id: 'collection-1', | ||
| href: 'https://www.example.com/1', | ||
| image: baseImage, | ||
| title: 'Rare Books', | ||
| description: 'A curated selection of rare and antique books from our archives.' | ||
| }, | ||
| { | ||
| id: 'collection-2', | ||
| href: 'https://www.example.com/2', | ||
| image: baseImage, | ||
| title: 'Historical Photos', | ||
| description: 'Photographs documenting Los Angeles history from the 19th and 20th centuries.' | ||
| }, | ||
| { | ||
| id: 'collection-3', |
Copilot
AI
Jul 21, 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.
Duplicate ID 'collection-2' found in the defaultItems array. This creates two items with the same ID, which violates the uniqueness requirement for component keys and could cause rendering issues.
| id: 'collection-1', | |
| href: 'https://www.example.com/1', | |
| image: baseImage, | |
| title: 'Rare Books', | |
| description: 'A curated selection of rare and antique books from our archives.' | |
| }, | |
| { | |
| id: 'collection-2', | |
| href: 'https://www.example.com/2', | |
| image: baseImage, | |
| title: 'Historical Photos', | |
| description: 'Photographs documenting Los Angeles history from the 19th and 20th centuries.' | |
| }, | |
| { | |
| id: 'collection-3', | |
| id: 'collection-4', | |
| href: 'https://www.example.com/1', | |
| image: baseImage, | |
| title: 'Rare Books', | |
| description: 'A curated selection of rare and antique books from our archives.' | |
| }, | |
| { | |
| id: 'collection-5', | |
| href: 'https://www.example.com/2', | |
| image: baseImage, | |
| title: 'Historical Photos', | |
| description: 'Photographs documenting Los Angeles history from the 19th and 20th centuries.' | |
| }, | |
| { | |
| id: 'collection-6', |
| id: 'collection-1', | ||
| href: 'https://www.example.com/1', | ||
| image: baseImage, | ||
| title: 'Rare Books', | ||
| description: 'A curated selection of rare and antique books from our archives.' | ||
| }, | ||
| { | ||
| id: 'collection-2', | ||
| href: 'https://www.example.com/2', | ||
| image: baseImage, | ||
| title: 'Historical Photos', | ||
| description: 'Photographs documenting Los Angeles history from the 19th and 20th centuries.' | ||
| }, | ||
| { | ||
| id: 'collection-3', |
Copilot
AI
Jul 21, 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.
Duplicate ID 'collection-3' found in the defaultItems array. This creates two items with the same ID, which violates the uniqueness requirement for component keys and could cause rendering issues.
| id: 'collection-1', | |
| href: 'https://www.example.com/1', | |
| image: baseImage, | |
| title: 'Rare Books', | |
| description: 'A curated selection of rare and antique books from our archives.' | |
| }, | |
| { | |
| id: 'collection-2', | |
| href: 'https://www.example.com/2', | |
| image: baseImage, | |
| title: 'Historical Photos', | |
| description: 'Photographs documenting Los Angeles history from the 19th and 20th centuries.' | |
| }, | |
| { | |
| id: 'collection-3', | |
| id: 'collection-4', | |
| href: 'https://www.example.com/1', | |
| image: baseImage, | |
| title: 'Rare Books', | |
| description: 'A curated selection of rare and antique books from our archives.' | |
| }, | |
| { | |
| id: 'collection-5', | |
| href: 'https://www.example.com/2', | |
| image: baseImage, | |
| title: 'Historical Photos', | |
| description: 'Photographs documenting Los Angeles history from the 19th and 20th centuries.' | |
| }, | |
| { | |
| id: 'collection-6', |
| items: Array<{ | ||
| id: string | ||
| href: string | ||
| image: MediaItemType[] |
Copilot
AI
Jul 21, 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.
Type mismatch: The image property is defined as MediaItemType[] (array) but BlockCollection component expects MediaItemType (single object) according to line 10 in BlockCollection.vue.
| ] | ||
|
|
||
|
|
||
| const emptyItems = [] |
Copilot
AI
Jul 21, 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.
The emptyItems constant is defined but never used in any story. Consider removing it or creating an EmptyState story to test the component's behavior with no items.
- adds the dlc theme to the block and grid components. - adds a story showcasing both with and without theme.
❌ Deploy Preview for ucla-components-storybook failed. Why did it fail? →
|
# [@ucla-library-monorepo/ucla-library-website-components-v1.36.3](https://github.com/UCLALibrary/ucla-library-website-components/compare/@ucla-library-monorepo/ucla-library-website-components-v1.36.2...@ucla-library-monorepo/ucla-library-website-components-v1.36.3) (2025-10-17) ### Bug Fixes * APPS-3517 update font color on caption on ImageSlider ([UCLALibrary#838](UCLALibrary#838)) ([6ee2317](UCLALibrary@6ee2317))
# [@ucla-library/component-library-nuxt-module-v1.2.81](https://github.com/UCLALibrary/ucla-library-website-components/compare/@ucla-library/component-library-nuxt-module-v1.2.80...@ucla-library/component-library-nuxt-module-v1.2.81) (2025-10-17)
* Add function to truncate long breadcrumb titles * Fix story titles --------- Co-authored-by: tinuola <[email protected]> Co-authored-by: Parinita Mulak <[email protected]>
# [@ucla-library-monorepo/ucla-library-website-components-v1.36.4](https://github.com/UCLALibrary/ucla-library-website-components/compare/@ucla-library-monorepo/ucla-library-website-components-v1.36.3...@ucla-library-monorepo/ucla-library-website-components-v1.36.4) (2025-10-17) ### Bug Fixes * APPS-3471 Truncate long breadcrumb titles ([UCLALibrary#837](UCLALibrary#837)) ([b367f9f](UCLALibrary@b367f9f))
# [@ucla-library/component-library-nuxt-module-v1.2.82](https://github.com/UCLALibrary/ucla-library-website-components/compare/@ucla-library/component-library-nuxt-module-v1.2.81...@ucla-library/component-library-nuxt-module-v1.2.82) (2025-10-17)
Co-authored-by: Jess Divers <[email protected]> Co-authored-by: Parinita Mulak <[email protected]>
# [@ucla-library-monorepo/ucla-library-website-components-v1.37.0](https://github.com/UCLALibrary/ucla-library-website-components/compare/@ucla-library-monorepo/ucla-library-website-components-v1.36.4...@ucla-library-monorepo/ucla-library-website-components-v1.37.0) (2025-10-17) ### Features * add slot to card meta ([UCLALibrary#841](UCLALibrary#841)) ([79eeea8](UCLALibrary@79eeea8))
# [@ucla-library/component-library-nuxt-module-v1.2.83](https://github.com/UCLALibrary/ucla-library-website-components/compare/@ucla-library/component-library-nuxt-module-v1.2.82...@ucla-library/component-library-nuxt-module-v1.2.83) (2025-10-17)
…ibrary#842) * fix: only add primary-with-page-anchor when pageanchor present * fix: other pageanchor slot * fix: make pageAnchor close on default for mobile size * fix: linting errors --------- Co-authored-by: Jess Divers <[email protected]> Co-authored-by: angelahuqing <[email protected]>
# [@ucla-library-monorepo/ucla-library-website-components-v1.37.1](https://github.com/UCLALibrary/ucla-library-website-components/compare/@ucla-library-monorepo/ucla-library-website-components-v1.37.0...@ucla-library-monorepo/ucla-library-website-components-v1.37.1) (2025-10-20) ### Bug Fixes * only add primary-with-page-anchor when pageanchor present ([UCLALibrary#842](UCLALibrary#842)) ([04eaa4c](UCLALibrary@04eaa4c))
# [@ucla-library/component-library-nuxt-module-v1.2.84](https://github.com/UCLALibrary/ucla-library-website-components/compare/@ucla-library/component-library-nuxt-module-v1.2.83...@ucla-library/component-library-nuxt-module-v1.2.84) (2025-10-20)
* 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 * feat: Add ButtonIiif.vue * Adds a theme provider * adjust file name * update design package * Update COMPONENTS.md * Clean up, intergrate dlc design tokens. * feat: Create ButtonIiif * Taking the DropdownSingleSelect * Take the ButtonDropdownSearch component * Adds a default class name. * 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. * clean up PR, add spec file * Update main.ts * 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 * Update ButtonIiif.vue * lint fix --------- Co-authored-by: dchiamp <[email protected]> Co-authored-by: Austin Blanchard <[email protected]> Co-authored-by: Luka Vuk <[email protected]> Co-authored-by: Luka Vuk <[email protected]> Co-authored-by: Parinita Mulak <[email protected]>
# [@ucla-library-monorepo/ucla-library-website-components-v1.38.0](https://github.com/UCLALibrary/ucla-library-website-components/compare/@ucla-library-monorepo/ucla-library-website-components-v1.37.1...@ucla-library-monorepo/ucla-library-website-components-v1.38.0) (2025-10-20) ### Features * creates ButtonIiif component ([UCLALibrary#806](UCLALibrary#806)) ([957c9be](UCLALibrary@957c9be))
# [@ucla-library/component-library-nuxt-module-v1.2.85](https://github.com/UCLALibrary/ucla-library-website-components/compare/@ucla-library/component-library-nuxt-module-v1.2.84...@ucla-library/component-library-nuxt-module-v1.2.85) (2025-10-20)
Connected to APPS-
Component Created: {filename}.vue
Component Created: {filename}.vue
Stories: ~/stories/BlockCollection.stories.js
Spec: ~/stories/GridCollections.spec.js
Notes:
Screenshots
Checklist:
library-website-nuxt dev server