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

Breaking down the Profile Section into Multiple Pages/Tabs #1501

Closed
Tracked by #960
Raj2503 opened this issue Apr 6, 2022 · 13 comments · Fixed by #1797
Closed
Tracked by #960

Breaking down the Profile Section into Multiple Pages/Tabs #1501

Raj2503 opened this issue Apr 6, 2022 · 13 comments · Fixed by #1797

Comments

@Raj2503
Copy link

Raj2503 commented Apr 6, 2022

Problem

As mentioned in Setting #960, the profile section has become over-clustered as it contains the following options:

  • Sign In
  • Analytics Request
  • Food Preference
  • Allergies
  • App Settings like (Themes, Light/Dark Mode)
  • FAQ, Support, etc.

Proposed solution

Separate the "User/App settings" and "User Food Preferences" in the bottom Navigation bar, shifting the App Settings like themes and sign-in options under the new tab.
So I was thinking of either creating a slider App-Drawer for settings or adding A New Button in BottomNavigation for the same.

Before starting off with the idea, I would like to discuss with the community whether to make the changes or not and also to take in more suggestions.

Part of

@monsieurtanuki
Copy link
Contributor

I do agree that the profile page is crowded.

My suggestion is perhaps simpler than yours:

  1. keep a "main" profile page, with all the current "sections" but in a read-only/collapsed mode (for instance 3 lines max for each "collapsed" button)
  2. when clicking on a section button, open a new page with read/write mode for only the selected section

@Raj2503
Copy link
Author

Raj2503 commented Apr 6, 2022

Indeed it is a very brilliant and minimalistic idea.

I will work on implementing it and get back to you ✌️

@Raj2503
Copy link
Author

Raj2503 commented Apr 7, 2022

@monsieurtanuki I am running into an error. For some reason, I am not able to make changes to the app_localizations.dart.

Every time I add an element ' String get app_personalization; ' and run the app, my changes get reverted and it gives an error that app_personalization isn't defined.

Can you guide me through what do I need to do to add new elements in app_localizations.dart.

@monsieurtanuki
Copy link
Contributor

@Raj2503 I'm not an expert on localizations, but I'm pretty sure you should NOT edit app_localizations.dart.
If you want to add translations, you need to go to app_en.arb and add an entry.
Then, when you flutter run, the field will be automagically added to app_localizations.dart.

If you want my opinion, don't bother with translations in a first approach: if ever we finally decide that your code stinks, you would have put confusion in the translation files, where each entry is replicated into dozens of language-specific files.
First, do an interface we agree on with hard-coded English strings. Then maybe, later, localization.

@teolemon
Copy link
Member

@Raj2503 @monsieurtanuki here's a mockup. Consent toggles go in app settings, food preferences in food preferences, all the app settings to … app settings ;-)
Infotips

@monsieurtanuki
Copy link
Contributor

Thank you @teolemon!
@Raj2503 It's up to you to code that, now :)

@Raj2503
Copy link
Author

Raj2503 commented Apr 17, 2022

Thank you for the mockup @teolemon.

Sure @monsieurtanuki, I have already some progress. Now that I have a mockup, I will have a greater overview to refer to.

@teolemon
Copy link
Member

Marking as in progress as a result

@teolemon
Copy link
Member

hey @Raj2503 , are you still working on this one ?

@Raj2503
Copy link
Author

Raj2503 commented Apr 28, 2022

@teolemon yeah I am implementing the idea you and @monsieurtanuki provided.

I ran into the following error:

The background of the new page section for App themes is not dynamically changing.
Apart from that, all other sections have been covered.

I have not been able to work at my full pace due to my University exams. But I assure you I will get back to it straight away as soon as I am done with my exams.

@monsieurtanuki
Copy link
Contributor

Hi @Raj2503!
Perhaps there's a little misunderstanding: the point is not to have single items in full screen mode when in modification. The point is to have paragraphs (with several items) in full screen when in modification mode, instead of all paragraphs being editable at the same time on the same page.

And it's not what you display in your animated GIF:

  • we don't want the dark mode edit to take the whole screen
  • we just want the App Settings paragraph (that includes Dark mode) to be as little as a ListTile in the main settings mode, and then a click opens a full App Settings page, with the possibility to switch the Dark mode as right now as about 4 other app settings

Basically it should take one hour max to code; I'm afraid you started in a wrong direction and over-engineered the whole thing.

But first: study for you exams!

@M123-dev
Copy link
Member

M123-dev commented May 7, 2022

Any updates @Raj2503

@monsieurtanuki
Copy link
Contributor

@Raj2503 If you don't mind I'll do it now. Don't worry: it was not the most interesting issue to code, and I'm sure that after you finish your exams there will be other issues to fix.

@monsieurtanuki monsieurtanuki self-assigned this May 9, 2022
monsieurtanuki added a commit to monsieurtanuki/smooth-app that referenced this issue May 9, 2022
… pages

New file:
* `abstract_collapsible_user_preferences.dart`: Abstraction of a collapsed/expanded display for the preference pages.

Impacted files:
* `abstract_user_preferences.dart`: refactoring around the fact that now we display pages instead of collapsible List<Widget>
* `preferences_page.dart`: minor refactoring
* `user_preferences_attribute_group.dart`: minor refactoring
* `user_preferences_dev_mode.dart`: minor refactoring
* `user_preferences_food.dart`: minor refactoring
* `user_preferences_page.dart`: now we use the same `StatefulWidget` for a root page with only headers and detailed pages with bodies
* `user_preferences_profile.dart`: minor refactoring
* `user_preferences_settings.dart`: minor refactoring
monsieurtanuki added a commit to monsieurtanuki/smooth-app that referenced this issue May 9, 2022
Impacted files:
* `user_preferences_page-blue-dark.dart`: impacted by new page design
* `user_preferences_page-blue-light.dart`: impacted by new page design
* `user_preferences_page-brown-dark.dart`: impacted by new page design
* `user_preferences_page-brown-light.dart`: impacted by new page design
* `user_preferences_page-green-dark.dart`: impacted by new page design
* `user_preferences_page-green-light.dart`: impacted by new page design
monsieurtanuki added a commit to monsieurtanuki/smooth-app that referenced this issue May 10, 2022
…isual consistency

Deleted files:
* `faq_handle_view.dart`
* `list_helper.dart`
* `smooth_list_tile.dart`
* `social_handle_view.dart`
* `user_contribution_view.dart`

New files:
* `user_preferences_connect.dart`: Display of "Connect" for the preferences page.
* `user_preferences_contribute.dart`: Display of "Contribute" for the preferences page.
* `user_preferences_faq.dart`: Display of "FAQ" for the preferences page.
* `user_preferences_list_tile.dart`: Custom `ListTile` for preferences.

Impacted files:
* `abstract_user_preferences.dart`: refactored around new class `UserPreferencesListTile`.
* `user_preferences_page.dart`: created 3 new "top paragraphs" extracted from "settings".
* `user_preferences_page-blue-dark.dart`: impacted by new page design.
* `user_preferences_page-blue-light.dart`: impacted by new page design.
* `user_preferences_page-brown-dark.dart`: impacted by new page design.
* `user_preferences_page-brown-light.dart`: impacted by new page design.
* `user_preferences_page-green-dark.dart`: impacted by new page design.
* `user_preferences_page-green-light.dart`: impacted by new page design.
* `user_preferences_settings.dart`: refactored code to 3 new "top paragraphs".
monsieurtanuki added a commit to monsieurtanuki/smooth-app that referenced this issue May 10, 2022
monsieurtanuki added a commit to monsieurtanuki/smooth-app that referenced this issue May 10, 2022
monsieurtanuki added a commit to monsieurtanuki/smooth-app that referenced this issue May 10, 2022
monsieurtanuki added a commit to monsieurtanuki/smooth-app that referenced this issue May 10, 2022
New file:
* `all_user_product_list_page.dart`: Page that lists all user product lists.

Impacted files:
* `continuous_scan_model.dart`: refactored around `DaoProductList` being seldom `async`
* `dao_product_list.dart`: new method `getLength`; refactored with less `async` methods
* `new_product_page.dart`: refactored around `DaoProductList` being seldom `async`
* `product_list_import_export.dart`: refactored around `DaoProductList` being seldom `async`
* `product_list_page.dart`: refactored around `DaoProductList` being seldom `async`
* `product_list_supplier.dart`: refactored around `DaoProductList` being seldom `async`
* `product_list_user_dialog_helper.dart`: new "delete list?" dialog; refactored around `DaoProductList` being seldom `async`
* `query_product_list_supplier.dart`: refactored around `DaoProductList` being seldom `async`
* `user_preferences_list_tile.dart`: added field `onLongPress`
* `user_preferences_settings.dart`: added items "Lists"
monsieurtanuki added a commit to monsieurtanuki/smooth-app that referenced this issue May 10, 2022
Impacted files:
* `user_preferences_page.dart`: added item "Lists"
* `user_preferences_settings.dart`: removed item "Lists"
* `user_preferences_page-blue-dark.png`: impacted by new UI.
* `user_preferences_page-blue-light.png`: impacted by new UI.
* `user_preferences_page-brown-dark.png`: impacted by new UI.
* `user_preferences_page-brown-light.png`: impacted by new UI.
* `user_preferences_page-green-dark.png`: impacted by new UI.
* `user_preferences_page-green-light.png`: impacted by new UI.
monsieurtanuki added a commit that referenced this issue May 10, 2022
Deleted files:
* `faq_handle_view.dart`
* `list_helper.dart`
* `smooth_list_tile.dart`
* `social_handle_view.dart`
* `user_contribution_view.dart`

New files:
* `abstract_collapsible_user_preferences.dart`: Abstraction of a collapsed/expanded display for the preference pages.
* `all_user_product_list_page.dart`: Page that lists all user product lists.
* `user_preferences_connect.dart`: Display of "Connect" for the preferences page.
* `user_preferences_contribute.dart`: Display of "Contribute" for the preferences page.
* `user_preferences_faq.dart`: Display of "FAQ" for the preferences page.
* `user_preferences_list_tile.dart`: Custom `ListTile` for preferences.

Impacted files:
* `abstract_user_preferences.dart`: refactoring around the fact that now we display pages instead of collapsible List<Widget>
* `continuous_scan_model.dart`: refactored around `DaoProductList` being seldom `async`
* `dao_product_list.dart`: new method `getLength`; refactored with less `async` methods
* `new_product_page.dart`: refactored around `DaoProductList` being seldom `async`
* `preferences_page.dart`: minor refactoring
* `product_list_import_export.dart`: refactored around `DaoProductList` being seldom `async`
* `product_list_page.dart`: refactored around `DaoProductList` being seldom `async`
* `product_list_supplier.dart`: refactored around `DaoProductList` being seldom `async`
* `product_list_user_dialog_helper.dart`: new "delete list?" dialog; refactored around `DaoProductList` being seldom `async`
* `query_product_list_supplier.dart`: refactored around `DaoProductList` being seldom `async`
* `user_preferences_attribute_group.dart`: minor refactoring
* `user_preferences_dev_mode.dart`: minor refactoring
* `user_preferences_food.dart`: minor refactoring
* `user_preferences_page.dart`: now we use the same `StatefulWidget` for a root page with only headers and detailed pages with bodies; added item "Lists"; created 3 new "top paragraphs" extracted from "settings".
* `user_preferences_page-blue-dark.dart`: impacted by new page design
* `user_preferences_page-blue-light.dart`: impacted by new page design
* `user_preferences_page-brown-dark.dart`: impacted by new page design
* `user_preferences_page-brown-light.dart`: impacted by new page design
* `user_preferences_page-green-dark.dart`: impacted by new page design
* `user_preferences_page-green-light.dart`: impacted by new page design
* `user_preferences_profile.dart`: minor refactoring
* `user_preferences_settings.dart`: minor refactoring
monsieurtanuki added a commit to monsieurtanuki/smooth-app that referenced this issue May 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment