-
-
Notifications
You must be signed in to change notification settings - Fork 299
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
Link the on-page add category button now that the dedicated section is working #2244
Comments
@teolemon Actually I'm a bit stuck here, as I'm a bit in conflict with @cli1005's #2201, the current Main question: should it be possible to edit data when offline? Related question: should we have a different behavior for image uploads? |
@AshAman999 for the Offline Smoothie reflexion |
For the GSoC 22, https://docs.google.com/document/d/1qRkbZwtkASM3_BNhZSkFEekkhrllddR4Tv69bCdquPs/edit?usp=sharing A possible solution that I am thinking of is to keep a queue of the edited tasks For the case of refreshing the product, we can either update the local cache when we actually send the edits to the server and get the response or maybe precisely when the edit is done(assuming the server returns a successful status ). That being said, here now comes again the question of the selection #1840 (comment) for @monsieurtanuki, @teolemon @g123k , @M123-dev |
@AshAman999 Thank you for your message. What you unfortunately don't deal with are
Regarding the product refresh, we already send the changes and get the fresh product back. I don't think we're talking about a large volume of data: we're only talking about atomic changes on products. So far I don't see a good reason in disqualifying Besides, the pictures are dealt with in another issue - there we're talking about
|
@monsieurtanuki Thanks for your reply
Apart from not just storing the atomic changes on products, there has been proposed to keep a local DB for the top most used products in a country, that value I am guessing would be a bit large in number is to be done within this 3 months, Analyzing and looking at your earlier comments left along many PRs I got the conclusion that hive will perform well till the DB is small, but since the local DB dump might be large here the startup time for the app can be big, so to reduce that SQFLite should be bought back.
I believe we can just a snack bar that the data will be refreshed as soon as they connect to the network, and since we get a full product when we send the changes to the server that means we can then just update the local DB with the same updated details for that barcode/product
Had a look at the comments related to |
Then it's another topic, much more ambitious, that would deserve its own github issue, wouldn't it?
That could be tested again regarding
Therefore if it's just about storing atomic changes we can keep
OK for the warning snackbar. Regardless, my initial questions were just about an "add categories" button, and I don't think we should wait until all your 3K products / sqflite / offline code is merged. |
For the record I'm currently working on a more flutter-ish method, based on providers, in the spirit of https://docs.flutter.dev/development/data-and-backend/state-mgmt/simple |
…t provider refactoring New file: * `up_to_date_product_provider.dart`: Provider that reflects all the user changes on [Product]s. Impacted files: * `add_basic_details_page.dart`: refactoring * `category_picker_page.dart`: refactoring * `edit_ingredients_page.dart`: refactoring around `UpToDateProductProvider` * `edit_product_page.dart`: refactoring around `UpToDateProductProvider` * `knowledge_panel_page_template.dart`: refactored for code clarity * `knowledge_panels_builder.dart`: refactored for code clarity * `main.dart`: added `UpToDateProductProvider` in the provider list * `new_product_page.dart`: refactoring around `UpToDateProductProvider`; removed deprecated code on "additional button" * `Podfile.lock`: wtf * `product_list_page.dart`: refactored around `UpToDateProductProvider` * `product_refresher.dart`: refactored around `UpToDateProductProvider` * `simple_input_page.dart`: refactored * `summary_card.dart`: implemented "add categories" button; refactored around `UpToDateProductProvider`
…factoring (#2276) New file: * `up_to_date_product_provider.dart`: Provider that reflects all the user changes on [Product]s. Impacted files: * `add_basic_details_page.dart`: refactoring * `category_picker_page.dart`: refactoring * `edit_ingredients_page.dart`: refactoring around `UpToDateProductProvider` * `edit_product_page.dart`: refactoring around `UpToDateProductProvider` * `knowledge_panel_page_template.dart`: refactored for code clarity * `knowledge_panels_builder.dart`: refactored for code clarity * `main.dart`: added `UpToDateProductProvider` in the provider list * `new_product_page.dart`: refactoring around `UpToDateProductProvider`; removed deprecated code on "additional button" * `Podfile.lock`: wtf * `product_list_page.dart`: refactored around `UpToDateProductProvider` * `product_refresher.dart`: refactored around `UpToDateProductProvider` * `simple_input_page.dart`: refactored * `summary_card.dart`: implemented "add categories" button; refactored around `UpToDateProductProvider`
What
The text was updated successfully, but these errors were encountered: