Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

Responsive Image Component #187

Merged
merged 3 commits into from
Jan 30, 2018
Merged

Responsive Image Component #187

merged 3 commits into from
Jan 30, 2018

Conversation

evanmwillhite
Copy link
Contributor

@evanmwillhite evanmwillhite commented Jan 29, 2018

This PR adds the ability to use responsive images in a component-driven manner without affecting previous projects.

Usage is noted in themes/emulsify/components/_patterns/01-atoms/04-images/00-image/responsive-image.md

To Test:

  • Open the images section in Pattern Lab and verify markup looks accurate
  • Inside a fresh Drupal site, Create an Article and add an image. Ensure everything looks as usual.
  • Enable the Responsive Images module
  • Manage the display of the Article and select responsive images and one of the defaults (narrow, wide). These use srcset.
  • Save and verify the new markup is correct.
  • Add a new responsive image style and select Emulsify for the breakpoint group (will use picture element). In the next step, for whatever breakpoints you want select Select a single image style. and select an image style. Save this form to save the new style.
  • Go back to manage the display of the Article and select your new style and save. Verify the markup is accurate.

@ModulesUnraveled
Copy link
Contributor

@evanmwillhite The steps to review work as expected, but none of them included using the new files in an Emulsify-based theme... So, how can I verify that the new PL component will get used?

@@ -1,16 +1,16 @@
# Breakpoints - change based on site need
Copy link
Contributor

Choose a reason for hiding this comment

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

@evanmwillhite Why did you reverse the order of these? I thought they had to be largest to smallest in order for things to work correctly...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

my experience was the opposite. It didn't work until I did this. Can you confirm in your testing?

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like Core updated, and automatically inverts the breakpoints you list here. Thanks for the info!

@@ -1,16 +1,16 @@
# Breakpoints - change based on site need
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like Core updated, and automatically inverts the breakpoints you list here. Thanks for the info!

@ModulesUnraveled
Copy link
Contributor

@evanmwillhite :shipit:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants