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: new feature structure #572

Draft
wants to merge 24 commits into
base: main
Choose a base branch
from
Draft

refactor: new feature structure #572

wants to merge 24 commits into from

Conversation

marfavi
Copy link
Member

@marfavi marfavi commented Feb 4, 2024

No description provided.

Centralised and simplified the product module's file structure. Moved models and functions to their respective directories and unified export through a single `product.dart` barrel file. This change makes imports cleaner across the codebase and eases future development as all product-related components and models are now accessible from a single import point.

Resolves: #12345 (if there's a relevant issue to link)
Add a new export file inside the features folder that points towards the new location of the product feature folder in src. This ensures that the developer always imports the barrel file when auto-importing for a better DX.
todo: fix naming is tests
- fix test names & clean up tests
- changed tests to generate nice mocks
- add test util for matching against a request's auth header
- remove the need for GetIt mocking in retry_authenticator_test
- changed throttler extension to return task instead of future
- add withMinimumDuration extension method on Task
- add getAuthenticationToken method in repository
- refactor AuthenticationInterceptor.onRequest
- hugely simplify RetryAuthenticator
- add withBearerToken extension method on Request
- rename repository.dart to repository_test.dart
@ghost
Copy link

ghost commented Feb 4, 2024

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

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

Copy link

codecov bot commented Feb 4, 2024

Codecov Report

Attention: 81 lines in your changes are missing coverage. Please review.

Comparison is base (2ff7085) 68.76% compared to head (3e96941) 48.95%.

Files Patch % Lines
...ib/src/environment/widgets/environment_button.dart 4.34% 22 Missing ⚠️
.../src/login/presentation/pages/login_page_base.dart 0.00% 18 Missing ⚠️
lib/core/widgets/components/scaffold.dart 0.00% 13 Missing ⚠️
lib/src/shared/form/widgets/form.dart 0.00% 6 Missing ⚠️
lib/src/login/presentation/cubit/login_cubit.dart 0.00% 3 Missing ⚠️
...src/login/presentation/pages/login_page_email.dart 0.00% 3 Missing ⚠️
lib/src/environment/bloc/environment_state.dart 83.33% 2 Missing ⚠️
lib/src/environment/environment_repository.dart 88.23% 2 Missing ⚠️
lib/src/shared/form/bloc/form_event.dart 60.00% 2 Missing ⚠️
lib/src/shared/form/bloc/form_state.dart 0.00% 2 Missing ⚠️
... and 7 more
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #572       +/-   ##
===========================================
- Coverage   68.76%   48.95%   -19.82%     
===========================================
  Files         133      168       +35     
  Lines        1697     2482      +785     
===========================================
+ Hits         1167     1215       +48     
- Misses        530     1267      +737     
Flag Coverage Δ
unittests 48.95% <70.75%> (-19.82%) ⬇️

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

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

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.

None yet

1 participant