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-1032: Add seconds to countdown-timer block #506

Merged
merged 4 commits into from
May 13, 2024
Merged

TMS-1032: Add seconds to countdown-timer block #506

merged 4 commits into from
May 13, 2024

Conversation

eebbi
Copy link
Contributor

@eebbi eebbi commented May 6, 2024

Severa-ID: 2108
Severa-kuvaus: TMS-1032 Sekunnit näkyviin count down -laskuriin
Task: https://hiondigital.atlassian.net/browse/TMS-1032

Description

  • Add new selection to countdown-component & -block for showing seconds
  • Change countdown js update-interval to a second when seconds are shown
  • Add fixed width to seconds-container to prevent layout changes as the counting numbers are different size

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 6, 2024 08:11
@HPiirainen HPiirainen self-assigned this May 6, 2024
Copy link
Contributor

@HPiirainen HPiirainen left a comment

Choose a reason for hiding this comment

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

Kts. huomiot

@@ -61,11 +63,13 @@ export default class Countdown {
diff = targetTime - now,
days = Math.floor( diff / ( 1000 * 60 * 60 * 24 ) ),
hours = Math.floor( ( diff % ( 1000 * 60 * 60 * 24 ) ) / ( 1000 * 60 * 60 ) ),
minutes = Math.floor( ( diff % ( 1000 * 60 * 60 ) ) / ( 1000 * 60 ) );
minutes = Math.floor( ( diff % ( 1000 * 60 * 60 ) ) / ( 1000 * 60 ) ),
seconds = Math.floor( ( diff % ( 1000 * 60 ) ) / 1000 );
Copy link
Contributor

Choose a reason for hiding this comment

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

Näissä ois varmaan voinut käyttää näitä laskettuja arvoja hyödyksi, esim. days = Math.floor( ( diff % days ) / ( 1000 * 60 * 60 ) ) tjsp. Mutta ei tarvi nyt alkaa muuttamaan.


@include from($tablet) {
&--seconds {
width: 125px;
Copy link
Contributor

Choose a reason for hiding this comment

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

Saisko laitettua remeinä?

msgstr ""

#: assets/dist/vendor.js:1
msgid "Wrong length!"
Copy link
Contributor

Choose a reason for hiding this comment

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

Nää vendor-filun käännökset kannattaisi jättää pois, mutta ei tarvi nyt muuttaa kun ei näitä kauheeta läjää tullut

'countdown' => 'Laskuri (päivät, tunnit, minuutit)',
'countdown_date' => 'Laskuri (päivät)',
'date' => 'Päivämäärä',
'countdown_seconds' => 'Laskuri (päivät, tunnit, minuutit, sekuntit)',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
'countdown_seconds' => 'Laskuri (päivät, tunnit, minuutit, sekuntit)',
'countdown_seconds' => 'Laskuri (päivät, tunnit, minuutit, sekunnit)',

@eebbi eebbi merged commit 016da42 into master May 13, 2024
1 of 2 checks passed
@eebbi eebbi deleted the TMS-1032 branch May 13, 2024 18:06
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