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-9031 #899

Merged
merged 18 commits into from
Feb 1, 2024
Merged

UHF-9031 #899

merged 18 commits into from
Feb 1, 2024

Conversation

rpnykanen
Copy link
Contributor

@rpnykanen rpnykanen commented Jan 30, 2024

UHF-9031

What was done

Added toggle all functionality to accordions. Multiple usecases:

  • Multiple accordions on page, all should have own toggle button
  • Subsequent headerless accordions should only have 1 toggle button (for example SOTE terveysasemat Haaga)
    • No matter if the first item is headerless or not
  • Accordion with single item should not have toggle button
  • Hardcoded accordion should not have toggle button (for example SOTE terveysasemat Haaga)
  • First headerless accordion should have toggle button

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-9031
  • Run make drush-cr

How to test

  • Sote terveysasemat is good place to test this since it has headerless accordions and hardcoded accordions
  • Create page and add accordions with different amounts of items.
  • Try opening and closing the accordions from toggle buttons and close buttons
  • Test translations

@@ -0,0 +1,14 @@
const Translations = {
open_all: {
fi: 'Avaa kaikki',
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this twice in the code, once here and once in .po files?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Prevent title from flashing with bad translation

Copy link
Contributor

@khalima khalima left a comment

Choose a reason for hiding this comment

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

Works on multiple different scenarios. Good job! 🚀

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