Skip to content

feat: New preferences page design #6526

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 80 commits into
base: develop
Choose a base branch
from

Conversation

PrimaelQuemerais
Copy link
Member

@PrimaelQuemerais PrimaelQuemerais commented Apr 6, 2025

What

This PR introduces a new implementation for the preferences page. Some work is still required to complete the transition, but all previously existing pages are accessible through the new design so this PR is already usable.

  • Implement new design system
    • New app bars
    • New cards and tiles
  • Search feature
  • Transition pages to new design
    • Root page
    • App settings page
    • Profile page
    • Prices page
    • Contribute page
    • Connect page
    • FAQ page
  • App bar logic
    • Logged out app bar
    • Logged in app bar
  • Implement icons from the mockup

Screenshot

Screen.Recording.2025-04-26.at.4.44.34.PM.mov

@monsieurtanuki
Copy link
Contributor

Hi @PrimaelQuemerais!
Before an actual review, please fix those warnings:
image

@teolemon
Copy link
Member

teolemon commented Jul 4, 2025

@PrimaelQuemerais linting issues

9s
Run dart format --set-exit-if-changed .
Formatted packages/smooth_app/lib/generic_lib/widgets/app_bars/app_bar_background.dart
Formatted packages/smooth_app/lib/generic_lib/widgets/app_bars/logged_in/app_bar_statistics_card.dart
Formatted packages/smooth_app/lib/generic_lib/widgets/app_bars/logged_in/logged_in_app_bar.dart
Formatted packages/smooth_app/lib/generic_lib/widgets/app_bars/logged_in/logged_in_app_bar_body.dart
Formatted packages/smooth_app/lib/generic_lib/widgets/app_bars/logged_in/logged_in_app_bar_header.dart
Formatted packages/smooth_app/lib/generic_lib/widgets/app_bars/logged_out/app_bar_authentication_button.dart
Formatted packages/smooth_app/lib/generic_lib/widgets/app_bars/logged_out/logged_out_app_bar.dart
Formatted packages/smooth_app/lib/generic_lib/widgets/app_bars/search_bottom_bar.dart
Formatted packages/smooth_app/lib/generic_lib/widgets/smooth_text_form_field.dart
Formatted packages/smooth_app/lib/pages/navigator/app_navigator.dart
Formatted packages/smooth_app/lib/pages/preferences/user_preferences_widgets.dart
Formatted packages/smooth_app/lib/pages/preferences_v2/cards/preference_card.dart
Formatted packages/smooth_app/lib/pages/preferences_v2/preferences_page.dart
Formatted packages/smooth_app/lib/pages/preferences_v2/roots/app_settings_root.dart
Formatted packages/smooth_app/lib/pages/preferences_v2/roots/default_root.dart
Formatted packages/smooth_app/lib/pages/preferences_v2/roots/dev_mode_root.dart
Formatted packages/smooth_app/lib/pages/preferences_v2/roots/preferences_root.dart
Formatted packages/smooth_app/lib/pages/preferences_v2/tiles/external_search_tiles/external_search_preference_tile.dart
Formatted packages/smooth_app/lib/pages/preferences_v2/tiles/external_search_tiles/forum_search_preference_tile.dart
Formatted packages/smooth_app/lib/pages/preferences_v2/tiles/external_search_tiles/github_search_preference_tile.dart
Formatted packages/smooth_app/lib/pages/preferences_v2/tiles/external_search_tiles/wiki_search_preference_tile.dart
Formatted packages/smooth_app/lib/pages/preferences_v2/tiles/navigation_preference_tile.dart
Formatted packages/smooth_app/lib/pages/preferences_v2/tiles/preference_tile.dart
Formatted packages/smooth_app/lib/pages/preferences_v2/tiles/toggle_preference_tile.dart
Formatted packages/smooth_app/lib/pages/preferences_v2/tiles/url_preference_tile.dart
Formatted packages/smooth_app/lib/pages/preferences_v2/tiles/value_edition_preference_tile.dart
Formatted 743 files (26 changed) in 8.07 seconds.

@teolemon
Copy link
Member

@g123k What's missing on this one to be mergeable ?

final Paint _paint;

@override
void paint(Canvas canvas, Size size) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do you need this painter?
This is just a rounded decoration

Copy link
Member Author

Choose a reason for hiding this comment

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

I use it for the top of the widget which has a inward rounded shape

Copy link
Collaborator

Choose a reason for hiding this comment

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

This one?
Screenshot 2025-07-21 at 19 35 48

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes but the top of it, cropped on your screenshot

Copy link
Collaborator

Choose a reason for hiding this comment

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

But it's already implemented in the TopBar widget

Copy link
Member Author

Choose a reason for hiding this comment

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

I missed that, I can check on my computer tomorrow.
Is this shape applied to any bottom of a TopBar?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hi @g123k

I checked the code for SmoothTopBar2 but I don't see how it could help me. I'm not sure we are talking about the same thing. I use the CustomPainter to create this shape :
Screenshot 2025-07-26 at 5 56 00 PM

I'm rounding the bottom corners, but I also need the top to have inward corners.

Copy link
Collaborator

Choose a reason for hiding this comment

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

If SmoothTopBar2 doesn't provide what you need. Then implement the footer for this Widget.
This will be used for all new screens.

@github-project-automation github-project-automation bot moved this from Backlog to Ready in 💸 Open Prices Jul 21, 2025
builder: (BuildContext context) {
final AppLocalizations appLocalizations = AppLocalizations.of(context);

return ChangeNotifierProvider<TextEditingController>.value(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use an AnimatedBuilder, instead of this ChangeNotifier + Consumer (unless this is used on another file)

class TogglePreferenceTile extends PreferenceTile {
const TogglePreferenceTile({
super.icon,
required super.title,
Copy link
Collaborator

Choose a reason for hiding this comment

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

required on top


class UrlPreferenceTile extends PreferenceTile {
const UrlPreferenceTile({
required super.icon,
Copy link
Collaborator

Choose a reason for hiding this comment

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

required on top

class ValueEditionPreferenceTile extends PreferenceTile {
const ValueEditionPreferenceTile({
super.icon,
required super.title,
Copy link
Collaborator

Choose a reason for hiding this comment

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

required on top

title: appLocalizations.crash_reporting_toggle_title,
subtitleText: appLocalizations.crash_reporting_toggle_subtitle,
state: userPreferences.crashReports,
onToggle: (bool value) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

=>

title: appLocalizations.send_anonymous_data_toggle_title,
subtitleText: appLocalizations.send_anonymous_data_toggle_subtitle,
state: userPreferences.userTracking,
onToggle: (bool value) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

=>

),
) ??
false,
onToggle: (bool value) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

=>

title: title,
titleTextStyle: Theme.of(context).textTheme.bodyLarge,
child: Column(
children: tiles
Copy link
Collaborator

Choose a reason for hiding this comment

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

What are you doing here?
You transform the same object?!?

Comment on lines +4628 to +4635
"dev_mode_enable_preferences_v2_title": "Enable Preferences V2",
"@dev_mode_enable_preferences_v2_title": {
"description": "Title for the preferences V2 preferences tile"
},
"dev_mode_enable_preferences_v2_subtitle": "Try out the new design of the preferences screen",
"@dev_mode_enable_preferences_v2_subtitle": {
"description": "Subtitle for the preferences V2 preferences tile"
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not needed.
V2 is by default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Status: Ready
Development

Successfully merging this pull request may close these issues.

New UI for "Profile" We have many settings. Allow to filter/search settings
5 participants