Problem / Current Behavior
- Button Padding / Sizing: The “Add Account” button in
AccountsPaneandAccountDialogcurrently suffers from improper padding / density configuration (OutlineButtonwithButtonDensity.compactand no explicit padding constraints), causing visual awkwardness or misalignment with adjacent section headers. - Cluttered Provider Modal: Currently, clicking “Add Account” directly opens
AddProviderAccountDialog, which bundles provider selection toggle tiles alongside username/password inputs into a single modal dialog. This adds unnecessary visual weight and interaction steps within the dialog itself.
Requirements & Proposed Changes
-
Correct Button Padding & Alignment
- Adjust the vertical and horizontal padding and alignment of the “Add Account” button in both
AccountsPane(packages/sfw_desktop/lib/widgets/accounts_pane.dart) andAccountDialog(packages/sfw_desktop/lib/widgets/account_dialog.dart) so it aligns properly with header text and follows design system button guidelines.
- Adjust the vertical and horizontal padding and alignment of the “Add Account” button in both
-
Add Account Provider Dropdown Menu
- Replace the direct modal opening on clicking “Add Account” with a contextual dropdown menu using
showDropdown/DropdownMenu. - The dropdown should list all available hymn provider types as
MenuButtonitems:- Hymns for Worship (
RadixIcons.bookmark, blue accent) - RJ Stevens Music (
RadixIcons.globe, purple accent)
- Hymns for Worship (
- Ensure the empty accounts state (“No Hymn Accounts Connected”) action button also provides this dropdown or provider selection smoothly.
- Replace the direct modal opening on clicking “Add Account” with a contextual dropdown menu using
-
Dedicated Per-Provider Login Dialog
- Selecting a provider from the dropdown menu should open a dedicated login dialog scoped specifically to that provider (e.g.,
showProviderLoginDialog(context, HymnProviderType provider)). - In this dedicated dialog:
- The header clearly indicates the target service (e.g. “Connect Hymns for Worship” or “Connect RJ Stevens Music”) with the respective provider icon and branding color.
- Remove the in-dialog provider radio/selector cards completely.
- Form fields:
- Account display name (pre-populated with
provider.defaultDisplayName) - Username or Email
- Password
- Account display name (pre-populated with
- Action buttons: Cancel and Sign In (with loading indicator and inline error banner).
- Selecting a provider from the dropdown menu should open a dedicated login dialog scoped specifically to that provider (e.g.,
-
Testing & Localization
- Add/update localization keys in
packages/sfw_desktop/lib/l10n/app_en.arbif new provider-specific dialog titles/labels are introduced. - Update
packages/sfw_desktop/test/add_provider_account_dialog_test.dartto verify the provider-specific login dialog and dropdown behavior.
- Add/update localization keys in
Affected Files
packages/sfw_desktop/lib/widgets/accounts_pane.dartpackages/sfw_desktop/lib/widgets/account_dialog.dartpackages/sfw_desktop/lib/widgets/add_provider_account_dialog.dartpackages/sfw_desktop/lib/l10n/app_en.arbpackages/sfw_desktop/test/add_provider_account_dialog_test.dart