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

dm-4256 refactor practice card img placeholders for pagebuilder show and facility show #723

Merged
merged 8 commits into from
Oct 19, 2023

Conversation

PhilipDeFraties
Copy link
Collaborator

@PhilipDeFraties PhilipDeFraties commented Oct 18, 2023

JIRA issue link

https://agile6.atlassian.net/browse/DM-4256

Description - what does this code do?

The main point of these changes is to make sure that practice card images always start as a background placeholder that is subsequently replaced with the practice card image. This had already been implemented everywhere but for facility and page-builder* show pages, this update adds it for said pages and refactors the involved methods a bit.

Testing done - how did you test it/steps on how can another person can test it

As logged-in admin:

  1. Create a page-builder page and add and Innovations component with some innovations, view the page and verify the practice card images load and replace background images
  2. Go to a few facility show pages that have created and adopted innovations, verify the same expected practice card image behavior as above.
  3. Check for background-replacing practice card images on the practice search page, CRH show page, and VISN show page.

Screenshots, Gifs, Videos from application (if applicable)

Link to mock-ups/mock ups (image file if you have it) (if applicable)

Acceptance criteria

  • [ ]

Definition of done

  • Unit tests written (if applicable)
  • e2e/accessibility tests written (if applicable)
  • Events are logged appropriately
  • Documentation has been updated, if applicable
  • A link has been provided to the originating JIRA issue
  • No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs

refactors to be more readable, removes argument as it will always be the same for practice cards
… `practice-card-img-placeholder` div

remove `#replaceImagePlaceholders`, `#replacePlaceholderWithImage`, and `#loadImage` functions

update invocation of `#replaceImagePlaceholders` to no longer use argument

edit invocation of `#replaceImagePlaceholders` to no longer use argument
@PhilipDeFraties PhilipDeFraties marked this pull request as ready for review October 18, 2023 23:14
@PhilipDeFraties PhilipDeFraties changed the title Dm 4256 fix practice card images dm-4256 fix practice card images Oct 18, 2023
@PhilipDeFraties PhilipDeFraties self-assigned this Oct 18, 2023
@PhilipDeFraties PhilipDeFraties changed the title dm-4256 fix practice card images dm-4256 refactor practice card img placeholders for innovation and facility show Oct 18, 2023
@camillevilla camillevilla changed the title dm-4256 refactor practice card img placeholders for innovation and facility show dm-4256 refactor practice card img placeholders for pagebuilder show and facility show Oct 19, 2023
Copy link
Collaborator

@camillevilla camillevilla left a comment

Choose a reason for hiding this comment

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

👏 good job extracting these functions! It's great that we can reuse our placeholder functionality.

@camillevilla camillevilla merged commit 298a716 into master Oct 19, 2023
3 of 4 checks passed
@camillevilla camillevilla deleted the dm-4256-fix-practice-card-images branch October 19, 2023 00:23
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