Skip to content

feat: Add infinite scrolling to the various Open Prices ListViews. #6561

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

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from

Conversation

AshutoshKhadse23
Copy link
Contributor

Closes: #6478

I added infinite scrolling to open the prices list view.

This is how the solution looks :

issue.6478.new.mp4

@codecov-commenter
Copy link

codecov-commenter commented Apr 21, 2025

Codecov Report

Attention: Patch coverage is 0% with 359 lines in your changes missing coverage. Please review.

Project coverage is 5.79%. Comparing base (4d9c7fc) to head (9edebe5).
Report is 846 commits behind head on develop.

Files with missing lines Patch % Lines
...mooth_app/lib/pages/prices/prices_proofs_page.dart 0.00% 103 Missing ⚠️
...oth_app/lib/pages/prices/infinite_scroll_list.dart 0.00% 71 Missing ⚠️
...ooth_app/lib/pages/prices/product_prices_list.dart 0.00% 51 Missing ⚠️
...th_app/lib/pages/prices/prices_locations_page.dart 0.00% 48 Missing ⚠️
...p/lib/pages/prices/infinite_scroll_controller.dart 0.00% 33 Missing ⚠️
...smooth_app/lib/pages/prices/prices_users_page.dart 0.00% 29 Missing ⚠️
...oth_app/lib/pages/prices/prices_products_page.dart 0.00% 24 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           develop   #6561      +/-   ##
==========================================
- Coverage     9.54%   5.79%   -3.76%     
==========================================
  Files          325     503     +178     
  Lines        16411   30130   +13719     
==========================================
+ Hits          1567    1745     +178     
- Misses       14844   28385   +13541     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@monsieurtanuki monsieurtanuki self-requested a review April 22, 2025 10:12
Copy link
Contributor

@monsieurtanuki monsieurtanuki left a comment

Choose a reason for hiding this comment

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

Hi @AshutoshKhadse23!

I have no strong opinion against your code, that seems to work. Possibly minor comments here and there.

The thing is that for the Prices (in a broad sense) we need different objects with a "load more" feature: prices (with this PR), proofs, contributors, locations and products.

Do you feel confident enough in your OOP skills? If so you should refactor your current code with generic concepts like:

  • a loading class
    • with a load method that has the page number as a parameter
    • returning a list of items, a number of items, a number of pages
  • an item display class that takes an item as a parameter and displays it
  • a "load by page" class that displays items by page, with a "loader" and an "item display" in the constructor

I'm sure there are Design Patterns around those common features.

What do you think about that?

@AshutoshKhadse23
Copy link
Contributor Author

@monsieurtanuki, I tried to implement what you suggested—looking forward to your feedback!

Copy link
Contributor

@monsieurtanuki monsieurtanuki left a comment

Choose a reason for hiding this comment

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

Hi @AshutoshKhadse23!
Good job!
Please have a look at my comments, though, for code simplification.

@AshutoshKhadse23
Copy link
Contributor Author

Hello @monsieurtanuki ,
Updated code according to the comments. And is ready for review.

Copy link
Contributor

@monsieurtanuki monsieurtanuki left a comment

Choose a reason for hiding this comment

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

Hi @AshutoshKhadse23!
Obviously something wrong in your latest push, as we have twice the same class.
The idea was to get rid of parameters that are ALWAYS the same, and that's not was you pushed.

@AshutoshKhadse23
Copy link
Contributor Author

@monsieurtanuki, changed the code according to the comment.

Copy link
Contributor

@monsieurtanuki monsieurtanuki left a comment

Choose a reason for hiding this comment

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

Hi @AshutoshKhadse23!
Please have a look at my comments.

@AshutoshKhadse23
Copy link
Contributor Author

@monsieurtanuki, changed the code according to the comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Status: 💬 To discuss and validate
Development

Successfully merging this pull request may close these issues.

Add infinite scrolling to the various Open Prices ListViews.
3 participants