Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
f8838dc
feat(l10n): add descriptions for admin settings expansion tiles
fulleni Dec 13, 2025
9fa5c05
build(l10n): sync
fulleni Dec 13, 2025
15e263a
feat(app_configuration): enhance features configuration tab design
fulleni Dec 13, 2025
1fe308c
feat(app_configuration): enhance system configuration tab with subtit…
fulleni Dec 13, 2025
06d10e8
refactor(app_configuration): improve user configuration tab layout an…
fulleni Dec 13, 2025
c76cb93
refactor(app_configuration): wrap ad platform config in ExpansionTile
fulleni Dec 13, 2025
033df18
refactor(app_configuration): remove unused imports and code
fulleni Dec 13, 2025
9486de8
refactor(app_configuration): remove redundant padding
fulleni Dec 13, 2025
9baf809
feat(feed_ad_settings): add descriptive subtitle to ad settings form
fulleni Dec 13, 2025
ab1aa2d
feat(app_configuration): add description to navigation ad settings
fulleni Dec 13, 2025
0c83289
refactor(app_configuration): move ExpansionTile description to subtitle
fulleni Dec 13, 2025
c5a7735
refactor(app_configuration): conditionally render reporting settings
fulleni Dec 13, 2025
442d078
feat(app_configuration): add expandable tile to saved filter limits form
fulleni Dec 13, 2025
d576449
refactor(app_configuration): remove user content limits description text
fulleni Dec 13, 2025
200d8a0
style: format filter dialog code
fulleni Dec 13, 2025
829aff1
feat(l10n): add descriptions for new feed decorator prompts
fulleni Dec 13, 2025
6c1877e
build(l10n): sync
fulleni Dec 13, 2025
02f2049
feat(app_configuration): add descriptions to feed decorator settings
fulleni Dec 13, 2025
9549d28
refactor(app_configuration): improve ad platform config form layout
fulleni Dec 13, 2025
c30a516
refactor(app_configuration): disable initiallyExpanded property for E…
fulleni Dec 13, 2025
77d6e0f
fix(app_configuration): display engagement mode options based on config
fulleni Dec 13, 2025
04df17e
style(app_configuration): add padding to user limits config form
fulleni Dec 13, 2025
6a99aa3
resx: Update localization descriptions and add new settings
fulleni Dec 13, 2025
3a0eab8
build(l10n): sync
fulleni Dec 13, 2025
0cdd422
feat(app_configuration): add description to global ads switch
fulleni Dec 13, 2025
22bf217
feat(app_configuration): add subtitles to app review settings form
fulleni Dec 13, 2025
39a3623
feat(app_configuration): add descriptions to feed ad settings switches
fulleni Dec 13, 2025
912fb36
feat(feed_decorator): add description to enable switch
fulleni Dec 13, 2025
33a3ffa
feat(app_configuration): add descriptions to navigation ad settings s…
fulleni Dec 13, 2025
48dddbe
feat(push-notification): add description to delivery type switcher
fulleni Dec 13, 2025
e319ec6
feat(app_configuration): add descriptions to reporting settings
fulleni Dec 13, 2025
f2971ed
feat(app_configuration): add leading icons to expansion tiles
fulleni Dec 13, 2025
74e5ef1
feat(app_configuration): add icons to expansion tiles
fulleni Dec 13, 2025
1ad415f
feat(app_configuration): add icon to user limits tile
fulleni Dec 13, 2025
2e3b317
feat(l10n): update app configuration translations and labels
fulleni Dec 13, 2025
e2e9abb
feat(l10n): update app config save success messages
fulleni Dec 13, 2025
7773304
chore: misc
fulleni Dec 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
128 changes: 102 additions & 26 deletions lib/app_configuration/view/tabs/features_configuration_tab.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,27 @@ class _FeaturesConfigurationTabState extends State<FeaturesConfigurationTab> {
super.dispose();
}

String _getDecoratorDescription(
BuildContext context,
FeedDecoratorType type,
) {
final l10n = AppLocalizationsX(context).l10n;
switch (type) {
case FeedDecoratorType.linkAccount:
return l10n.feedDecoratorLinkAccountDescription;
case FeedDecoratorType.upgrade:
return l10n.feedDecoratorUpgradeDescription;
case FeedDecoratorType.rateApp:
return l10n.feedDecoratorRateAppDescription;
case FeedDecoratorType.enableNotifications:
return l10n.feedDecoratorEnableNotificationsDescription;
case FeedDecoratorType.suggestedTopics:
return l10n.feedDecoratorSuggestedTopicsDescription;
case FeedDecoratorType.suggestedSources:
return l10n.feedDecoratorSuggestedSourcesDescription;
}
}

@override
Widget build(BuildContext context) {
final l10n = AppLocalizationsX(context).l10n;
Expand All @@ -62,14 +83,28 @@ class _FeaturesConfigurationTabState extends State<FeaturesConfigurationTab> {
builder: (context, expandedIndex, child) {
const tileIndex = 0;
return ExpansionTile(
leading: Icon(
Icons.paid_outlined,
color: Theme.of(context).colorScheme.onSurface.withOpacity(
0.7,
),
),
key: ValueKey('advertisementsTile_$expandedIndex'),
title: Text(l10n.advertisementsTab),
onExpansionChanged: (isExpanded) {
subtitle: Text(
l10n.advertisementsDescription,
style: Theme.of(context).textTheme.bodySmall?.copyWith(
color: Theme.of(
context,
).colorScheme.onSurface.withOpacity(0.7),
),
),
onExpansionChanged: (bool isExpanded) {
_expandedTileIndex.value = isExpanded ? tileIndex : null;
},
initiallyExpanded: expandedIndex == tileIndex,
childrenPadding: const EdgeInsetsDirectional.only(
start: AppSpacing.lg,
start: AppSpacing.xxl,
top: AppSpacing.md,
bottom: AppSpacing.md,
),
Expand Down Expand Up @@ -106,14 +141,28 @@ class _FeaturesConfigurationTabState extends State<FeaturesConfigurationTab> {
builder: (context, expandedIndex, child) {
const tileIndex = 1;
return ExpansionTile(
leading: Icon(
Icons.notifications_active_outlined,
color: Theme.of(context).colorScheme.onSurface.withOpacity(
0.7,
),
),
key: ValueKey('pushNotificationsTile_$expandedIndex'),
title: Text(l10n.notificationsTab),
onExpansionChanged: (isExpanded) {
subtitle: Text(
l10n.notificationsDescription,
style: Theme.of(context).textTheme.bodySmall?.copyWith(
color: Theme.of(
context,
).colorScheme.onSurface.withOpacity(0.7),
),
),
onExpansionChanged: (bool isExpanded) {
_expandedTileIndex.value = isExpanded ? tileIndex : null;
},
initiallyExpanded: expandedIndex == tileIndex,
childrenPadding: const EdgeInsetsDirectional.only(
start: AppSpacing.lg,
start: AppSpacing.xxl,
top: AppSpacing.md,
bottom: AppSpacing.md,
),
Expand All @@ -135,37 +184,50 @@ class _FeaturesConfigurationTabState extends State<FeaturesConfigurationTab> {
builder: (context, expandedIndex, child) {
const tileIndex = 2;
return ExpansionTile(
leading: Icon(
Icons.dynamic_feed_outlined,
color: Theme.of(context).colorScheme.onSurface.withOpacity(
0.7,
),
),
key: ValueKey('feedTile_$expandedIndex'),
title: Text(l10n.feedTab),
onExpansionChanged: (isExpanded) {
subtitle: Text(
l10n.feedDescription,
style: Theme.of(context).textTheme.bodySmall?.copyWith(
color: Theme.of(
context,
).colorScheme.onSurface.withOpacity(0.7),
),
),
onExpansionChanged: (bool isExpanded) {
_expandedTileIndex.value = isExpanded ? tileIndex : null;
},
initiallyExpanded: expandedIndex == tileIndex,
childrenPadding: const EdgeInsetsDirectional.only(
start: AppSpacing.lg,
start: AppSpacing.xxl,
top: AppSpacing.md,
bottom: AppSpacing.md,
),
expandedCrossAxisAlignment: CrossAxisAlignment.start,
children: [
ExpansionTile(
title: Text(l10n.feedItemClickBehaviorTitle),
subtitle: Text(
l10n.feedItemClickBehaviorDescription,
style: Theme.of(context).textTheme.bodySmall?.copyWith(
color: Theme.of(
context,
).colorScheme.onSurface.withOpacity(0.7),
),
),
childrenPadding: const EdgeInsetsDirectional.only(
start: AppSpacing.lg,
top: AppSpacing.md,
bottom: AppSpacing.md,
),
expandedCrossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
l10n.feedItemClickBehaviorDescription,
style: Theme.of(context).textTheme.bodySmall?.copyWith(
color: Theme.of(
context,
).colorScheme.onSurface.withOpacity(0.7),
),
),
const SizedBox(height: AppSpacing.lg),
Align(
alignment: AlignmentDirectional.centerStart,
child: SegmentedButton<FeedItemClickBehavior>(
Expand Down Expand Up @@ -203,27 +265,35 @@ class _FeaturesConfigurationTabState extends State<FeaturesConfigurationTab> {
const SizedBox(height: AppSpacing.lg),
ExpansionTile(
title: Text(l10n.feedDecoratorsTitle),
subtitle: Text(
l10n.feedDecoratorsDescription,
style: Theme.of(context).textTheme.bodySmall?.copyWith(
color: Theme.of(
context,
).colorScheme.onSurface.withOpacity(0.7),
),
),
childrenPadding: const EdgeInsetsDirectional.only(
start: AppSpacing.lg,
top: AppSpacing.md,
bottom: AppSpacing.md,
),
expandedCrossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
l10n.feedDecoratorsDescription,
style: Theme.of(context).textTheme.bodySmall?.copyWith(
color: Theme.of(
context,
).colorScheme.onSurface.withOpacity(0.7),
),
),
const SizedBox(height: AppSpacing.lg),
for (final decoratorType in FeedDecoratorType.values)
Padding(
padding: const EdgeInsets.only(bottom: AppSpacing.md),
child: ExpansionTile(
title: Text(decoratorType.l10n(context)),
subtitle: Text(
_getDecoratorDescription(context, decoratorType),
style: Theme.of(context).textTheme.bodySmall
?.copyWith(
color: Theme.of(
context,
).colorScheme.onSurface.withOpacity(0.7),
),
),
childrenPadding: const EdgeInsetsDirectional.only(
start: AppSpacing.xl,
top: AppSpacing.md,
Expand Down Expand Up @@ -253,6 +323,12 @@ class _FeaturesConfigurationTabState extends State<FeaturesConfigurationTab> {
builder: (context, expandedIndex, child) {
const tileIndex = 3;
return ExpansionTile(
leading: Icon(
Icons.groups_outlined,
color: Theme.of(context).colorScheme.onSurface.withOpacity(
0.7,
),
),
key: ValueKey('communityTile_$expandedIndex'),
title: Text(l10n.communityAndEngagementTitle),
subtitle: Text(
Expand All @@ -263,12 +339,12 @@ class _FeaturesConfigurationTabState extends State<FeaturesConfigurationTab> {
).colorScheme.onSurface.withOpacity(0.7),
),
),
onExpansionChanged: (isExpanded) {
onExpansionChanged: (bool isExpanded) {
_expandedTileIndex.value = isExpanded ? tileIndex : null;
},
initiallyExpanded: expandedIndex == tileIndex,
childrenPadding: const EdgeInsetsDirectional.only(
start: AppSpacing.lg,
start: AppSpacing.xxl,
top: AppSpacing.md,
bottom: AppSpacing.md,
),
Expand Down
48 changes: 46 additions & 2 deletions lib/app_configuration/view/tabs/system_configuration_tab.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,43 @@ class _SystemConfigurationTabState extends State<SystemConfigurationTab> {
builder: (context, expandedIndex, child) {
const tileIndex = 0;
return ExpansionTile(
leading: Icon(
Icons.system_update_alt_outlined,
color: Theme.of(context).colorScheme.onSurface.withOpacity(
0.7,
),
),
key: ValueKey('appStatusAndUpdatesTile_$expandedIndex'),
title: Text(l10n.appStatusAndUpdatesTitle),
subtitle: Text(
l10n.appStatusAndUpdatesDescription,
style: Theme.of(context).textTheme.bodySmall?.copyWith(
color: Theme.of(
context,
).colorScheme.onSurface.withOpacity(0.7),
),
),
onExpansionChanged: (isExpanded) {
_expandedTileIndex.value = isExpanded ? tileIndex : null;
},
initiallyExpanded: expandedIndex == tileIndex,
childrenPadding: const EdgeInsetsDirectional.only(
start: AppSpacing.lg,
start: AppSpacing.xxl,
top: AppSpacing.md,
bottom: AppSpacing.md,
),
expandedCrossAxisAlignment: CrossAxisAlignment.start,
children: [
ExpansionTile(
title: Text(l10n.maintenanceModeTitle),
subtitle: Text(
l10n.maintenanceModeDescription,
style: Theme.of(context).textTheme.bodySmall?.copyWith(
color: Theme.of(
context,
).colorScheme.onSurface.withOpacity(0.7),
),
),
childrenPadding: const EdgeInsetsDirectional.only(
start: AppSpacing.lg,
top: AppSpacing.md,
Expand Down Expand Up @@ -99,6 +121,14 @@ class _SystemConfigurationTabState extends State<SystemConfigurationTab> {
const SizedBox(height: AppSpacing.lg),
ExpansionTile(
title: Text(l10n.appUpdateManagementTitle),
subtitle: Text(
l10n.updateConfigDescription,
style: Theme.of(context).textTheme.bodySmall?.copyWith(
color: Theme.of(
context,
).colorScheme.onSurface.withOpacity(0.7),
),
),
childrenPadding: const EdgeInsetsDirectional.only(
start: AppSpacing.lg,
top: AppSpacing.md,
Expand All @@ -122,14 +152,28 @@ class _SystemConfigurationTabState extends State<SystemConfigurationTab> {
builder: (context, expandedIndex, child) {
const tileIndex = 1;
return ExpansionTile(
leading: Icon(
Icons.link_outlined,
color: Theme.of(context).colorScheme.onSurface.withOpacity(
0.7,
),
),
key: ValueKey('appUrlsTile_$expandedIndex'),
title: Text(l10n.appUrlsTitle),
subtitle: Text(
l10n.appUrlsDescription,
style: Theme.of(context).textTheme.bodySmall?.copyWith(
color: Theme.of(
context,
).colorScheme.onSurface.withOpacity(0.7),
),
),
onExpansionChanged: (isExpanded) {
_expandedTileIndex.value = isExpanded ? tileIndex : null;
},
initiallyExpanded: expandedIndex == tileIndex,
childrenPadding: const EdgeInsetsDirectional.only(
start: AppSpacing.lg,
start: AppSpacing.xxl,
top: AppSpacing.md,
bottom: AppSpacing.md,
),
Expand Down
50 changes: 34 additions & 16 deletions lib/app_configuration/view/tabs/user_configuration_tab.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:core/core.dart';
import 'package:flutter/material.dart';
import 'package:flutter_news_app_web_dashboard_full_source_code/app_configuration/widgets/saved_filter_limits_section.dart';
import 'package:flutter_news_app_web_dashboard_full_source_code/app_configuration/widgets/saved_filter_limits_form.dart';
import 'package:flutter_news_app_web_dashboard_full_source_code/app_configuration/widgets/user_limits_config_form.dart';
import 'package:flutter_news_app_web_dashboard_full_source_code/l10n/l10n.dart';
import 'package:ui_kit/ui_kit.dart';
Expand Down Expand Up @@ -52,21 +52,43 @@ class _UserConfigurationTabState extends State<UserConfigurationTab> {
builder: (context, expandedIndex, child) {
const tileIndex = 0;
return ExpansionTile(
leading: Icon(
Icons.manage_accounts_outlined,
color: Theme.of(context).colorScheme.onSurface.withOpacity(
0.7,
),
),
key: ValueKey('userLimitsTile_$expandedIndex'),
title: Text(l10n.userLimitsTitle),
subtitle: Text(
l10n.userLimitsDescription,
style: Theme.of(context).textTheme.bodySmall?.copyWith(
color: Theme.of(
context,
).colorScheme.onSurface.withOpacity(0.7),
),
),
onExpansionChanged: (isExpanded) {
_expandedTileIndex.value = isExpanded ? tileIndex : null;
},
initiallyExpanded: expandedIndex == tileIndex,
childrenPadding: const EdgeInsetsDirectional.only(
start: AppSpacing.lg,
start: AppSpacing.xxl,
top: AppSpacing.md,
bottom: AppSpacing.md,
),
expandedCrossAxisAlignment: CrossAxisAlignment.start,
children: [
ExpansionTile(
title: Text(l10n.userContentLimitsTitle),
subtitle: Text(
l10n.userContentLimitsDescription,
style: Theme.of(context).textTheme.bodySmall?.copyWith(
color: Theme.of(
context,
).colorScheme.onSurface.withOpacity(0.7),
),
),
childrenPadding: const EdgeInsetsDirectional.only(
start: AppSpacing.lg,
top: AppSpacing.md,
Expand All @@ -81,20 +103,16 @@ class _UserConfigurationTabState extends State<UserConfigurationTab> {
],
),
const SizedBox(height: AppSpacing.lg),
ExpansionTile(
title: Text(l10n.savedFeedFilterLimitsTitle),
childrenPadding: const EdgeInsetsDirectional.only(
start: AppSpacing.lg,
top: AppSpacing.md,
bottom: AppSpacing.md,
),
expandedCrossAxisAlignment: CrossAxisAlignment.start,
children: [
SavedFilterLimitsSection(
remoteConfig: widget.remoteConfig,
onConfigChanged: widget.onConfigChanged,
),
],
SavedFilterLimitsForm(
remoteConfig: widget.remoteConfig,
onConfigChanged: widget.onConfigChanged,
filterType: SavedFilterType.headline,
),
const SizedBox(height: AppSpacing.lg),
SavedFilterLimitsForm(
remoteConfig: widget.remoteConfig,
onConfigChanged: widget.onConfigChanged,
filterType: SavedFilterType.source,
),
],
);
Expand Down
Loading
Loading