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

Feature/digital 119 configure images #59

Draft
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

cathybaptista
Copy link
Contributor

@cathybaptista cathybaptista commented Dec 2, 2024

Jira ticket

DIGITAL-119

Purpose

Acceptance Criteria:

  • Allow reference media fields to be edited media_library_edit easily, all media fields need to have an edit link now, not just an x.
  • Allow WYSIWYG images to be edited edit_media_modal. When adding media image via WYSIWYG, there should be an edit button on the image.
  • Enable the Responsive Image module
  • Add the following image styles:
  • 16x16: Scale and crop to 16x16 tiny icon, convert to webp
  • 250x250: Scale and crop to a 250x250 logo, convert to webp
  • w800: Scale down to 800 width max., convert to webp
  • w1200: Scale down to 1200 width max., convert to webp
  • Add the following responsive image set that does the following: (Use your w800 & w1200 image styles)
    <img src="https://s3.amazonaws.com/digitalgov/woman-touching-the-virtual-future-interface_w1200.jpg" alt="Woman touching a virtual interface." srcset="https://s3.amazonaws.com/digitalgov/woman-touching-the-virtual-future-interface_w800.jpg 800w,https://s3.amazonaws.com/digitalgov/woman-touching-the-virtual-future-interface_w1200.jpg 1200w " sizes="(max-width: 800px) 100vw, (max-width: 1200px) 100vw, 100vw">

Local Setup

  1. Pull branch
  2. Drush CIM
  3. lando rebuild && lando si
  4. Go to modules and make sure media library edit module and edit media modal are enabled.

QA/Testing instructions

  1. After pulling branch, create a piece of test content, basic page is works well.
  2. Insert an image into the large text field. Any image will work.
  3. Insert an image in for the featured image.
  4. Save page.

Test responsive images:

  1. With web inspector on, reduce the size of the window. Ensure breakpoints occur at 1200 and 800 pixels.
  2. Edit the page.
  3. Ensure for both images (the one in the ckeditor and the one inserted) both have edit buttons when hovered over and the images can be replaced.
  4. Ensure all image types are available and configured as set out in the P.R.

Checklist for the Developer

  • A link to the JIRA ticket has been included above.
  • No merge conflicts exist with the target branch.
  • Automated tests have passed on this PR.
  • A reviewer has been designated.
  • Deployment and testing steps have been documented above, if applicable.

Checklist for the Peer Reviewers

  • The file changes are relevant to the task objective.
  • Code is readable and includes appropriate commenting.
  • Code standards and best practices are followed.
  • QA/Test steps were successfully completed, if applicable.
  • Applicable logs are free of errors.

@cathybaptista cathybaptista marked this pull request as ready for review December 2, 2024 16:14
@cathybaptista cathybaptista requested a review from mattsqd December 2, 2024 16:14
…9-configure-images

# Conflicts:
#	composer.json
#	composer.lock
#	composer.log
#	config/sync/core.entity_form_display.node.basic_page.default.yml
#	config/sync/core.entity_form_display.node.community.default.yml
#	config/sync/core.entity_form_display.node.news.default.yml
#	config/sync/core.extension.yml
@mattsqd mattsqd marked this pull request as draft December 12, 2024 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants