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

UHF-10555: Deprecated image style cleanup #856

Merged
merged 26 commits into from
Dec 5, 2024
Merged

UHF-10555: Deprecated image style cleanup #856

merged 26 commits into from
Dec 5, 2024

Conversation

khalima
Copy link
Contributor

@khalima khalima commented Nov 28, 2024

UHF-10555

What was done

  • Removed deprecated image styles.
  • Removed deprecated responsive image styles.
  • Removed references to the deprecated image and responsive image styles that were still found in the code.
  • Removed unused media display image_content_area
  • Moved the helfi news entity view mode configurations from optional configuration folder to install folder.
  • Added tpr_unit.wide_teaser configuration to helfi_tpr_config module so that it can be rewritten around the site since it still has references to the deprecated styles.

How to install

  • Make sure your instance is up and running on latest dev branch.
  • make fresh
  • Check if the instance you are testing has a feature branch from the Other PRs list below. If it has, check out the branch.
    • git fetch && git checkout UHF-10555
  • Checkout the correct branch for helfi_platform_config.
    • composer require drupal/helfi_platform_config:dev-UHF-10555
  • Run make drush-cr drush-cim drush-updb
  • Login to the site make drush-uli

How to test

  • Make sure the database updates run smoothly and there is no errors.
  • Go to /admin/config/media/image-styles and /admin/config/media/responsive-image-style and make sure no more deprecated image or responsive image styles are listed.
  • Check a bit around the site that image styles still work (this might be a bit hard since for me at least the images on local don't really work unless I upload something new).
  • You can try running the make drush-cex and checking that the exported configurations seem correct for what has been done here.
  • Check the instance specific PRs from below.
  • Check that code follows our standards.

Other PRs

How to search the image styles and responsive image styles from codebase

Go to https://github.com/search and copy and paste from the following list the style you are looking check where it is used. I checked all of them but especially after this feature has been merged these could prove to be useful.

Image styles

1_1_l (org:City-of-Helsinki 1_1_l AND NOT path:image.style.1_1_l*.yml OR path:responsive_image.styles.list_of_links__thumbnail.yml)
1_1_l_2x

1_1_m (org:City-of-Helsinki 1_1_m AND NOT path:image.style.1_1_m*.yml OR path:responsive_image.styles.list_of_links__thumbnail.yml)
1_1_m_2x

1_1_s (org:City-of-Helsinki 1_1_s AND NOT path:image.style.1_1_s*.yml OR path:responsive_image.styles.list_of_links__thumbnail.yml)
1_1_s_2x

1_1_thumbnail (org:City-of-Helsinki 1_1_thumbnail AND NOT path:image.style.1_1_thumbnail*.yml OR path:responsive_image.styles.gallery_thumbnail.yml)
1_1_thumbnail_2x

1_1_xl (org:City-of-Helsinki 1_1_xl AND NOT path:image.style.1_1_xl*.yml OR path:responsive_image.styles.list_of_links__thumbnail.yml)
1_1_xl_2x

1_1_xs (org:City-of-Helsinki 1_1_xs AND NOT path:image.style.1_1_xs*.yml OR path:responsive_image.styles.list_of_links__thumbnail.yml)
1_1_xs_2x

23_10_l (org:City-of-Helsinki 23_10_l AND NOT path:image.style.23_10_l*.yml OR path:responsive_image.styles.hero__background.yml)
23_10_l_2x

23_10_m (org:City-of-Helsinki 23_10_m AND NOT path:image.style.23_10_m*.yml OR path:responsive_image.styles.hero__background.yml)
23_10_m_2x

23_10_s (org:City-of-Helsinki 23_10_s AND NOT path:image.style.23_10_s*.yml OR path:responsive_image.styles.hero__background.yml)
23_10_s_2x

23_10_xl (org:City-of-Helsinki 23_10_xl AND NOT path:image.style.23_10_xl*.yml OR path:responsive_image.styles.hero__background.yml)
23_10_xl_2x

23_10_xs (org:City-of-Helsinki 23_10_xs AND NOT path:image.style.23_10_xs*.yml OR path:responsive_image.styles.hero__background.yml)
23_10_xs_2x

23_10_xxs (org:City-of-Helsinki 23_10_xxs AND NOT path:image.style.23_10_xxs*.yml OR path:responsive_image.styles.hero__background.yml)
23_10_xxs_2x

3_2_l (org:City-of-Helsinki 3_2_l AND NOT path:image.style.3_2_l*.yml OR path:responsive_image.styles.image__3_2.yml)
3_2_l_2x

3_2_m (org:City-of-Helsinki 3_2_m AND NOT path:image.style.3_2_m*.yml OR path:responsive_image.styles.image__3_2.yml OR path:responsive_image.styles.image__3_2_content_area.yml)
3_2_m_2x

3_2_s (org:City-of-Helsinki 3_2_s AND NOT path:image.style.3_2_s*.yml OR path:responsive_image.styles.image__3_2.yml OR path:responsive_image.styles.image__3_2_content_area.yml)
3_2_s_2x

3_2_xl (org:City-of-Helsinki 3_2_xl AND NOT path:image.style.3_2_xl*.yml OR path:responsive_image.styles.image__3_2.yml OR path:responsive_image.styles.image__3_2_content_area.yml)
3_2_xl_2x

3_2_xs (org:City-of-Helsinki 3_2_xs AND NOT path:image.style.3_2_xs*.yml OR path:responsive_image.styles.image__3_2.yml OR path:responsive_image.styles.image__3_2_content_area.yml)
3_2_xs_2x

3_2_xxs (org:City-of-Helsinki 3_2_xxs AND NOT path:image.style.3_2_xxs*.yml OR path:responsive_image.styles.image__3_2.yml OR path:responsive_image.styles.image__3_2_content_area.yml)
3_2_xxs_2x

og_image (org:City-of-Helsinki og_image AND NOT path:image.style.og_image.yml OR path:metatag.metatag_defaults.*.yml)

original_l (org:City-of-Helsinki original_l AND NOT path:image.style.original_l*.yml OR path:responsive_image.styles.original.yml OR original_lang OR original_link OR ORIGINAL_LOCATION OR original_label)
original_l_2x

original_m (org:City-of-Helsinki original_m AND NOT path:image.style.original_m*.yml OR path:responsive_image.styles.original.yml)
original_m_2x

original_s (org:City-of-Helsinki original_s AND NOT path:image.style.original_s*.yml OR path:responsive_image.styles.original.yml OR original_slug OR original_svg OR original_status OR original_strings)
original_s_2x

original_xs (org:City-of-Helsinki original_xs AND NOT path:image.style.original_xs*.yml OR path:responsive_image.styles.original.yml)
original_xs_2x

original_xxs (org:City-of-Helsinki original_xxs AND NOT path:image.style.original_xxs*.yml OR path:responsive_image.styles.original.yml)
original_xxs_2x

tiny_square_image (org:City-of-Helsinki tiny_square_image AND NOT path:image.style.tiny_square_image.yml)

Responsive image styles

gallery_thumbnail (org:City-of-Helsinki gallery_thumbnail AND NOT path:responsive_image.styles.gallery_thumbnail.yml)

hero__background (org:City-of-Helsinki hero__background AND NOT path:responsive_image.styles.hero__background.yml)

image__3_2 (org:City-of-Helsinki image__3_2 AND NOT path:responsive_image.styles.image__3_2.yml OR path:responsive_image.styles.image__3_2_content_area.yml)

image__3_2_content_area (org:City-of-Helsinki image__3_2_content_area AND NOT path:responsive_image.styles.image__3_2_content_area.yml)

list_of_links__thumbnail (org:City-of-Helsinki list_of_links__thumbnail AND NOT path:responsive_image.styles.list_of_links__thumbnail.yml)

original (not really easily possible to check this one)

@teroelonen teroelonen changed the title UHF-10555: Helfi news list view modes UHF-10555: Deprecated image style cleanup Nov 29, 2024
@codecov-commenter
Copy link

codecov-commenter commented Dec 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 14.46%. Comparing base (6c57a10) to head (84b51c3).
Report is 33 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #856      +/-   ##
============================================
- Coverage     14.49%   14.46%   -0.03%     
- Complexity      271      272       +1     
============================================
  Files            33       33              
  Lines          1035     1037       +2     
============================================
  Hits            150      150              
- Misses          885      887       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

sonarqubecloud bot commented Dec 4, 2024

Copy link
Contributor

@teroelonen teroelonen left a comment

Choose a reason for hiding this comment

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

Very nice work Tero and Markus 🦖

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.

3 participants