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-9682: Add cookie check for siteimprove to be able to see inside accordions #919

Merged
merged 4 commits into from
Mar 11, 2024

Conversation

teroelonen
Copy link
Contributor

@teroelonen teroelonen commented Mar 7, 2024

UHF-9682

What was done

  • Add check to state.js for accordions that it a cookie helfi_accordions_open is set the accordions should all be open

How to install

  • Make sure your instance is up and running on latest dev branch.
    • git pull origin dev
    • make fresh
  • Update the HDBT theme
    • composer require drupal/hdbt:dev-UHF-9682
  • Update the platform config
    • composer require drupal/helfi_platform_config:dev-UHF-9682
  • Run make drush-updb drush-cr

How to test

  • Go and find a page with accordions on the instance that you are testing the feature. The accordions should be closed by default when you load the page for the first time.
  • Open inspector and go to set cookie helfi_accordions_open in the Application tab. You can set the value to true for example. Now refresh the page and the cookie shouldn't disappear like it would have before.
  • Now when you refresh the page with accordions on it should have them all opened.
  • There is one thing I am worried about here and it is varnish. I would like to make sure somehow that the cookie check result is not cached in varnish for regular people so if you have any idea how to make sure of that it is not, please do those checks as well.
  • Check that code follows our standards

Designers review

  • This PR does not need designers review

Other PRs

…_accordions_open is set the accordions should all be open
@teroelonen teroelonen marked this pull request as ready for review March 7, 2024 14:51
@teroelonen teroelonen added the recreate-reference-images Use this label to re-create reference images used by Visual regression tests label Mar 7, 2024
Copy link
Contributor

@Arkkimaagi Arkkimaagi left a comment

Choose a reason for hiding this comment

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

Tested both before and after applying the changes, This works as it should, good job!

Copy link

⚠️ Visual regression found! Please check if this change is wanted or accidental. You can check the output here: https://city-of-helsinki.github.io/drupal-hdbt/pull/919/html_report/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
recreate-reference-images Use this label to re-create reference images used by Visual regression tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants