UCLALibrary / ucla-library-website-components

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

feat: APPS-2946 Create Two Column Layout component #614

Closed farosFreed closed 2 months ago

farosFreed commented 2 months ago

Connected to APPS-2946

Component Created: TwoColLayoutWStickySidebar.vue

Stories: ~/stories/TwoColLayoutWStickySidebar.stories.js

Notes:

This component uses slots to place content within a 2 column layout. When on desktop sized screens, it places sidebar content in a sidebar column. When on mobile sized screens, it splits the sidebar content into 2 distinct groups and places it inbetween the main column content. The exact behavior has been documented visually with a drawio file and an svg exported from that file.

Originally I had planned to get the content of the sidebar slots and use JS to append it to a different div, but I found that was not necessary, as we can duplicate the slot names in the layout to duplicate the elements into both the sidebar and the primary columns. Then, we use the isMobile ref to determine which to render.

Checklist:

Screenshot 2024-09-20 at 11 12 36 AM Screenshot 2024-09-20 at 11 06 09 AM
github-actions[bot] commented 2 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 2 months ago

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

pghorpade commented 2 months ago

:tada: This PR is included in version 3.21.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: