[PR #2697] [PM-2658] Settings Reorganization Init #3747

Closed
opened 2025-11-26 23:36:49 -06:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/bitwarden/android/pull/2697

State: closed
Merged: Yes


Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

Start settings reorganization.
This PR includes changing the Settings main view, set up new settings item blank views, create About, Vault and Other views which are the simplest.

Code changes

Note: for the moment the original Settings view and its referenced views have not been removed, just their names have changed to avoid conflicts with the new approach.

New Controls

  • ExternalLinkItemView: This view is used to display a Title with the link icon that can be tapped to perform a command that opens the link.
  • BaseSettingControlView: This is a base content view to be used by other settings controls alongside the new control template.
  • ControlTemplates (Styles): Added SettingControlTemplate that is the template to be used for each item/row of setting views.
  • SettingChooserItemView: This is the item view for choose an option that has a title, can have a subtitle and the option value displayed. This is based on BaseSettingsControlView and SettingControlTemplate
  • SwitchItemView: This is the item view that displays a toggle and has a title and can have a subtitle. This is based on BaseSettingsControlView and SettingControlTemplate. This has one caveat that is that the tap of the entire view performs the change to the Switch.IsToggle to avoid circular flow between tapping on the view and/or tapping on the switch.
  • BaseModalContentPage: New base page to handle modal logic. Now added the code to pop the modal which is used in several views on the toolbar action.
  • PickerViewModel: New ViewModel used for show an action sheet, pick a value and display the selected value based on fixed items.

General changes

  • SettingsPage/ViewModel: Changed view to display new item rows stacked with a title each. Commented / Renamed old approach to have it there to check some logics along the way.
  • AboutSettingsPage/ViewModel: New view that shows "About" things, moved and refactored a bit from Settings. There is a block of code commented that I left there if we need it to debug push notifications.
  • OtherSettingsPage/ViewModel: New view that encompasses Sync, Clear clipboard and Allow screen capture.
  • VaultSettingsPage/ViewModel: New view that encompasses Folders, Export, Import.
  • [Appearance][Autofill][Security]SettingsPage/VIewmodel: Blank new views.
  • BaseViewModel: Added a method to create a default async command. The logic is repeated everywhere so this is an attempt to reduce the code used.
  • ThemeManager: Added ControlTemplates to the merged dictionaries so it can be used in the app.
  • ExternalLinksConstants: Place to put all links that a user can be directed to.

Screenshots

Settings view

Settings view

Vault view

Vault view

Other view

Other view

About view

About view

Before you submit

  • Please check for formatting errors (dotnet format --verify-no-changes) (required)
  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If this change has particular deployment requirements - notify the DevOps team
**Original Pull Request:** https://github.com/bitwarden/android/pull/2697 **State:** closed **Merged:** Yes --- ## Type of change - [ ] Bug fix - [X] New feature development - [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [ ] Other ## Objective <!--Describe what the purpose of this PR is. For example: what bug you're fixing or what new feature you're adding--> Start settings reorganization. This PR includes changing the Settings main view, set up new settings item blank views, create About, Vault and Other views which are the simplest. ## Code changes <!--Explain the changes you've made to each file or major component. This should help the reviewer understand your changes--> <!--Also refer to any related changes or PRs in other repositories--> Note: for the moment the original Settings view and its referenced views have not been removed, just their names have changed to avoid conflicts with the new approach. **New Controls** * **ExternalLinkItemView:** This view is used to display a Title with the link icon that can be tapped to perform a command that opens the link. * **BaseSettingControlView:** This is a base content view to be used by other settings controls alongside the new control template. * **ControlTemplates (Styles):** Added `SettingControlTemplate` that is the template to be used for each item/row of setting views. * **SettingChooserItemView:** This is the item view for choose an option that has a title, can have a subtitle and the option value displayed. This is based on `BaseSettingsControlView` and `SettingControlTemplate` * **SwitchItemView:** This is the item view that displays a toggle and has a title and can have a subtitle. This is based on `BaseSettingsControlView` and `SettingControlTemplate`. This has one caveat that is that the tap of the entire view performs the change to the `Switch.IsToggle` to avoid circular flow between tapping on the view and/or tapping on the switch. * **BaseModalContentPage:** New base page to handle modal logic. Now added the code to pop the modal which is used in several views on the toolbar action. * **PickerViewModel:** New ViewModel used for show an action sheet, pick a value and display the selected value based on fixed items. **General changes** * **SettingsPage/ViewModel:** Changed view to display new item rows stacked with a title each. Commented / Renamed old approach to have it there to check some logics along the way. * **AboutSettingsPage/ViewModel:** New view that shows "About" things, moved and refactored a bit from Settings. There is a block of code commented that I left there if we need it to debug push notifications. * **OtherSettingsPage/ViewModel:** New view that encompasses Sync, Clear clipboard and Allow screen capture. * **VaultSettingsPage/ViewModel:** New view that encompasses Folders, Export, Import. * **[Appearance][Autofill][Security]SettingsPage/VIewmodel:** Blank new views. * **BaseViewModel:** Added a method to create a default async command. The logic is repeated everywhere so this is an attempt to reduce the code used. * **ThemeManager:** Added `ControlTemplates` to the merged dictionaries so it can be used in the app. * **ExternalLinksConstants:** Place to put all links that a user can be directed to. ## Screenshots <!--Required for any UI changes. Delete if not applicable--> ### Settings view <img width="314" alt="Settings view" src="https://github.com/bitwarden/mobile/assets/15682323/9953f2ed-f1ba-4d02-9487-2f8defffb7a5"> ### Vault view <img width="314" alt="Vault view" src="https://github.com/bitwarden/mobile/assets/15682323/ef68643f-8a61-48d6-908c-de22a95a5eb7"> ### Other view <img width="314" alt="Other view" src="https://github.com/bitwarden/mobile/assets/15682323/8f96d4a3-d2b4-4ede-8b91-7dff4803fa50"> ### About view <img width="314" alt="About view" src="https://github.com/bitwarden/mobile/assets/15682323/3ccdd9da-f875-46d4-817b-f2da48e10663"> ## Before you submit - Please check for formatting errors (`dotnet format --verify-no-changes`) (required) - Please add **unit tests** where it makes sense to do so (encouraged but not required) - If this change requires a **documentation update** - notify the documentation team - If this change has particular **deployment requirements** - notify the DevOps team
GiteaMirror added the pull-request label 2025-11-26 23:36:49 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#3747