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

fix(streak-count): Fix streak count calculation #28

Merged
merged 8 commits into from
Nov 8, 2024
Merged

Conversation

ZL-Asica
Copy link
Member

@ZL-Asica ZL-Asica commented Nov 8, 2024

  • count and todayCount will update every time fetching user profile.

  • Update streakUtils to calculate streak count based on continuous logic (if a day does not have a count, the streak will loss).

  • Update test accordingly.

  • Update UserContext'a type declaration accordingly.

@github-actions github-actions bot added the size/M label Nov 8, 2024
WelldoneM and others added 5 commits November 7, 2024 19:23
- count will no longer be store in user.streaks, but will be calculated on the fly.
- Update streakUtils to calculate streak count on the fly.
- Update Streak component to use streakUtils to calculate streak count.

- Update test accordingly.
- Update UserContext'a type declaration accordingly.
Copy link

github-actions bot commented Nov 8, 2024

🚀 Preview for this PR is available at: https://stepwise-bdab7--pr-28-25p915uh.web.app

🧪 Test Results

Tests Passed: All tests passed successfully!


🎨 Prettier Format Check

Prettier: No formatting issues found!

🎨 Lint Check

Lint: No linting issues found!

Copy link

github-actions bot commented Nov 8, 2024

🚀 Preview for this PR is available at: https://stepwise-bdab7--pr-28-25p915uh.web.app

🧪 Test Results

Some tests failed:

 ❯ src/hooks/useGoalsUpdater.test.js  (6 tests | 1 failed) 25ms
 Test Files  1 failed | 2 passed (3)
      Tests  1 failed | 9 passed (10)
   Duration  16.06s (transform 6.75s, setup 0ms, collect 17.17s, tests 358ms, environment 1.58s, prepare 294ms)

💥 Please review the failed tests above.


🎨 Prettier Format Check

Prettier: No formatting issues found!

🎨 Lint Check

Lint: No linting issues found!

Copy link

github-actions bot commented Nov 8, 2024

🚀 Preview for this PR is available at: https://stepwise-bdab7--pr-28-25p915uh.web.app

🧪 Test Results

Tests Passed: All tests passed successfully!


🎨 Prettier Format Check

Prettier: No formatting issues found!

🎨 Lint Check

Lint: No linting issues found!

Copy link

github-actions bot commented Nov 8, 2024

🚀 Preview for this PR is available at: https://stepwise-bdab7--pr-28-25p915uh.web.app

🧪 Test Results

Tests Passed: All tests passed successfully!


🎨 Prettier Format Check

Prettier: No formatting issues found!

🎨 Lint Check

Lint: No linting issues found!

- Count and todayCount will update at every time fetching user profile.
- Updates with task completion toggled.
- Update Home.test.jsx to fully mock the UserContext to improve speed.
@github-actions github-actions bot added size/L and removed size/M labels Nov 8, 2024
Copy link

github-actions bot commented Nov 8, 2024

🚀 Preview for this PR is available at: https://stepwise-bdab7--pr-28-25p915uh.web.app

🧪 Test Results

Tests Passed: All tests passed successfully!


🎨 Prettier Format Check

Prettier: No formatting issues found!

🎨 Lint Check

Lint: No linting issues found!

@ZL-Asica ZL-Asica enabled auto-merge (squash) November 8, 2024 02:52
@ZL-Asica ZL-Asica merged commit 8599dcf into main Nov 8, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants