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-8909: Preprocess refactoring #173

Merged
merged 7 commits into from
Jul 30, 2024
Merged

UHF-8909: Preprocess refactoring #173

merged 7 commits into from
Jul 30, 2024

Conversation

khalima
Copy link
Contributor

@khalima khalima commented Jul 26, 2024

UHF-8909

What was done

  • Added hook_template_preprocess_default_variables_alter() function, where we can add the current page language and alternate language as default variables for each preprocess, but in a cheaper way.

How to install

  • Make sure your instance is up and running on correct branch.
    • git checkout UHF-8909
    • make fresh
  • Run make drush-cr

How to test

  • Check any template and dump {{ language.id }} and/or {{ alternative_language }}
  • Check that code follows our standards

Continuous documentation

  • This feature has been documented/the documentation has been updated
  • This change doesn't require updates to the documentation

Automatic- / Regression tests

  • This PR makes no changes that effects any tests. (This will be caught in automatic testing later on, but please, please run regression tests always on PR before asking for a review)
  • This PR passes regression tests. (make test-pw)

Other PRs

…ter, of which we can add the current page language and alternative language as default variables to each preprocess, but with less expensive way.
@codecov-commenter
Copy link

codecov-commenter commented Jul 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.00%. Comparing base (4165398) to head (115ce4d).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #173   +/-   ##
=========================================
  Coverage     89.00%   89.00%           
  Complexity      518      518           
=========================================
  Files            76       76           
  Lines          2064     2064           
=========================================
  Hits           1837     1837           
  Misses          227      227           

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

Copy link

sonarcloud bot commented Jul 29, 2024

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