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

Storybook: fix gallery function in carousel lightboxes #118

Merged
merged 6 commits into from
Jan 25, 2022

Conversation

stephiescastle
Copy link
Member

Checklist

  • Include a description of your pull request and instructions for the reviewer to verify your work.
  • Link to the issue if this PR is issue-specific.
  • Create/update the corresponding story if this includes a UI component.
  • Create/update documentation. If not included, tell us why.
  • List the environments / browsers in which you tested your changes.
  • Tests, linting, or other required checks are passing.
  • PR has an informative and human-readable title
    • PR titles are used to generate the change log in releases; good ones make that easier to scan.
    • PRs will be broadly categorized in the change log, but for even easier scanning, consider prefixing with a component name or other useful categorization, e.g., "BaseButton: fix layout bug", or "Storybook: Update dependencies".
  • PR has been tagged with a SemVer label and a general category label, or skip-changelog.
    • These tags are used to do the aforementioned broad categorization in the change log and determine what the next release's version number should be.
    • Release Drafter will attempt to do the category labeling for you! Please double-check its work.

Description

Noticed when exploring #41 that the fancyboxGallery argument wasn't working as expected in Image carousels.

  • fixed the BlockImageLightboxTemplate to accept two arguments
  • updated index.html to use copied HTML from storybook for the image carousel and image block. This also now allows us to test fancybox in index.html as we didn't have any usage of it on the test page before.

Instructions to test

  1. npm run storybook
  2. Check the BlockImageCarousel or BlockImageGallery stories. When opening the lightbox, you should be able to browse the rest of the images within the lightbox
  3. npm run dev
  4. Check the index page and test the lightbox on BlockImage and BlockImageCarousel.

Tested in the following environments/browsers:

Operating System

  • macOS
  • iOS
  • iPadOS
  • Windows

Browser

  • Chrome
  • Firefox ESR
  • Firefox
  • Safari
  • Edge

@stephiescastle stephiescastle added the patch Contains bug fixes or maintenance work label Jan 25, 2022
@github-actions github-actions bot added bug Something isn't working storybook This issue relates to Storybook.js labels Jan 25, 2022
@stephiescastle
Copy link
Member Author

@Scotchester I've fixed the caption rendering in fancybox and also added some more arg descriptions to BaseImageCaption. Thanks for catching that!

Copy link
Member

@Scotchester Scotchester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch! Fix is working great.

@stephiescastle stephiescastle merged commit 61bbdf3 into main Jan 25, 2022
@stephiescastle stephiescastle deleted the storybook/fancybox-fix branch January 25, 2022 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working patch Contains bug fixes or maintenance work storybook This issue relates to Storybook.js
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants