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

TMS-1044: Accordion-block open all / close all functionality #511

Merged
merged 5 commits into from
Jun 4, 2024
Merged

Conversation

eebbi
Copy link
Contributor

@eebbi eebbi commented May 30, 2024

Severa-ID: 2108
Severa-kuvaus: TMS-1044 Haitarilohkoon kehitystä
Task: https://hiondigital.atlassian.net/browse/TMS-1044

Description

  • Add "Collapse all" & "Open all" buttons & functionalities to accordion block
  • Add "Close" & "Open" texts for single accordion dropdowns

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@eebbi eebbi requested a review from a team May 30, 2024 09:43
@vloy vloy self-assigned this May 31, 2024
/**
* Opens all dropdowns.
*
* @param {HTMLButtonElement} mainContainer Main container for accordion dropdowns.
Copy link

Choose a reason for hiding this comment

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

Suggested change
* @param {HTMLButtonElement} mainContainer Main container for accordion dropdowns.
* @param {HTMLDivElement} mainContainer Main container for accordion dropdowns.

?

/**
* Closes all dropdowns.
*
* @param {HTMLButtonElement} mainContainer Main container for accordion dropdowns.
Copy link

Choose a reason for hiding this comment

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

Suggested change
* @param {HTMLButtonElement} mainContainer Main container for accordion dropdowns.
* @param {HTMLDivElement} mainContainer Main container for accordion dropdowns.

/**
* Updates "Close all" or "Open all" -button states depending on open accordion dropdowns.
*
* @param {HTMLButtonElement} mainContainer Main container for accordion dropdowns.
Copy link

Choose a reason for hiding this comment

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

Suggested change
* @param {HTMLButtonElement} mainContainer Main container for accordion dropdowns.
* @param {HTMLDivElement} mainContainer Main container for accordion dropdowns.

Comment on lines +4 to +16
color: $primary !important;
background-color: transparent !important;
border: none !important;
border-radius: 0 !important;

.icon {
margin-left: $theme-spacing-three-quarters !important;
}

&:hover {
filter: none !important;
box-shadow: none !important;
text-decoration: underline !important;
Copy link

Choose a reason for hiding this comment

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

Voisi kommentoida, miksi käytetty !important.
Yliajetaanko esim. bulman tyylejä?

Comment on lines 57 to 60
'expand' => _x( 'Expand', 'theme-frontend', 'tms-theme-base' ),
'collapse' => _x( 'Collapse', 'theme-frontend', 'tms-theme-base' ),
'expand_all' => _x( 'Expand all sections', 'theme-frontend', 'tms-theme-base' ),
'collapse_all' => _x( 'Collapse all sections', 'theme-frontend', 'tms-theme-base' ),
Copy link

Choose a reason for hiding this comment

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

Suggested change
'expand' => _x( 'Expand', 'theme-frontend', 'tms-theme-base' ),
'collapse' => _x( 'Collapse', 'theme-frontend', 'tms-theme-base' ),
'expand_all' => _x( 'Expand all sections', 'theme-frontend', 'tms-theme-base' ),
'collapse_all' => _x( 'Collapse all sections', 'theme-frontend', 'tms-theme-base' ),
'expand' => \_x( 'Expand', 'theme-frontend', 'tms-theme-base' ),
'collapse' => \_x( 'Collapse', 'theme-frontend', 'tms-theme-base' ),
'expand_all' => \_x( 'Expand all sections', 'theme-frontend', 'tms-theme-base' ),
'collapse_all' => \_x( 'Collapse all sections', 'theme-frontend', 'tms-theme-base' ),

Copy link

@vloy vloy left a comment

Choose a reason for hiding this comment

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

✅ Tarkista vielä kommentit

@eebbi eebbi merged commit bd19ad4 into master Jun 4, 2024
1 of 2 checks passed
@eebbi eebbi deleted the TMS-1044 branch June 4, 2024 06:01
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