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

Better countdown by computing the offset between the frontend and the backend #1763

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

smadbe
Copy link
Contributor

@smadbe smadbe commented Aug 22, 2024

Description

In order not to display a completely wrong countdown when a JS client has a completely wrong time, "compute" constantly the offset between the frontend and backend and apply it to the countdown.

Test cases

  • Case 1:
    1. Given I am a temp user
    2. When I go to a time limited content
    3. And I click on enter now
    4. Then I see the countdown
    5. And I change the clock of my computer
    6. And I see the countdown clock is wrong
    7. And I change page, for instance clicking on "some course"
    8. I see the countdown has been fixed

@smadbe smadbe force-pushed the explicit-entry branch 8 times, most recently from 422d984 to 37ef323 Compare August 23, 2024 13:59
Base automatically changed from explicit-entry to master August 23, 2024 14:56
@smadbe smadbe force-pushed the countdown-time-sync branch from 2556d53 to 43c087b Compare August 23, 2024 14:58
@smadbe smadbe changed the title compute the offset between the frontend and the backend using an inte… Better countdown by computing the offset between the frontend and the backend Aug 26, 2024
@smadbe
Copy link
Contributor Author

smadbe commented Aug 26, 2024

@smadbe smadbe marked this pull request as ready for review August 26, 2024 14:42
@smadbe smadbe requested a review from Iloveall August 26, 2024 14:45
@smadbe smadbe force-pushed the countdown-time-sync branch from 43c087b to 2f559b3 Compare September 12, 2024 13:55
@smadbe
Copy link
Contributor Author

smadbe commented Sep 12, 2024

@smadbe smadbe force-pushed the countdown-time-sync branch from 2f559b3 to 3a0935a Compare September 12, 2024 14:04
@smadbe smadbe force-pushed the countdown-time-sync branch from 3a0935a to 6da7a9b Compare September 12, 2024 14:09
@smadbe
Copy link
Contributor Author

smadbe commented Sep 12, 2024

@smadbe smadbe merged commit 173447e into master Sep 12, 2024
11 checks passed
@smadbe smadbe deleted the countdown-time-sync branch September 12, 2024 14:26
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