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

refactor: load user info before main content flow #528

Merged
merged 5 commits into from
Nov 2, 2023

Conversation

marfavi
Copy link
Member

@marfavi marfavi commented Oct 24, 2023

This commit ensures that the user is loaded from the "splash router" before the home page is shown.
This means everything below the "home page" widget will have access to a loaded user cubit state.

Extracted from #413 and therefore also a prerequesite for that PR.

This commit ensures that the user is loaded from the "splash router" before the home page is shown.
This means everything below the "home page" widget will have access to a loaded user cubit state.

Extracted from #413 and therefore also a prerequesite for that PR.
@marfavi marfavi requested a review from fredpetersen October 24, 2023 22:03
@ghost
Copy link

ghost commented Oct 24, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

@codecov
Copy link

codecov bot commented Oct 24, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (ba459b3) 73.93% compared to head (39f98ad) 74.18%.

❗ Current head 39f98ad differs from pull request most recent head a9b8eb8. Consider uploading reports for the commit a9b8eb8 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #528      +/-   ##
==========================================
+ Coverage   73.93%   74.18%   +0.24%     
==========================================
  Files         128      128              
  Lines        1527     1534       +7     
==========================================
+ Hits         1129     1138       +9     
+ Misses        398      396       -2     
Flag Coverage Δ
unittests 74.18% <100.00%> (+0.24%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...b/features/user/presentation/cubit/user_cubit.dart 72.97% <100.00%> (+3.27%) ⬆️
...b/features/user/presentation/cubit/user_state.dart 100.00% <100.00%> (+20.00%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@marfavi marfavi mentioned this pull request Oct 24, 2023
@marfavi marfavi self-assigned this Oct 24, 2023
Copy link
Member Author

@marfavi marfavi left a comment

Choose a reason for hiding this comment

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

Should ensure test coverage in changed lines before proceeding

@marfavi marfavi marked this pull request as draft October 24, 2023 22:24
test initialize()
simplify initialize() to reduce cope duplication
user cubit state: convert constructor parameters to positional + make constructors const
@marfavi marfavi marked this pull request as ready for review October 26, 2023 18:20
Copy link
Contributor

@fredpetersen fredpetersen left a comment

Choose a reason for hiding this comment

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

👍

@fredpetersen fredpetersen merged commit 31a0adb into main Nov 2, 2023
@fredpetersen fredpetersen deleted the load-user-in-splash branch November 2, 2023 16:08
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