Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
b35b600
feat(l10n): add translations for feed item click behavior settings
fulleni Nov 28, 2025
7acd598
build(l10n): generate
fulleni Nov 28, 2025
72a5ad4
feat(l10n): add extension to localize FeedItemClickBehavior enum
fulleni Nov 28, 2025
99d7a56
feat(app_configuration): add feed item click behavior settings
fulleni Nov 28, 2025
e979e8d
refactor(l10n): clarify descriptions for feed item click behavior
fulleni Nov 28, 2025
5c73232
build(l10n); generate
fulleni Nov 28, 2025
0938080
refactor(app_configuration): improve layout using ExpansionTile
fulleni Nov 28, 2025
fef7552
fix(l10n): refine feed item click behavior title translations
fulleni Nov 28, 2025
7c4e5f7
feat(app_configuration): enhance visual structure of expansion tiles
fulleni Nov 28, 2025
911e0a3
style(app_configuration): enhance ExpansionTile appearance
fulleni Nov 28, 2025
406cc90
feat(app_configuration): add TabBar for ad platform selection
fulleni Nov 28, 2025
4176332
style(app_configuration): improve layout of expansion tile children
fulleni Nov 28, 2025
c6e6d60
fix(app_configuration): improve feed decorator form layout
fulleni Nov 28, 2025
d6d1fc2
style(app_configuration): enhance navigation ad settings form layout
fulleni Nov 28, 2025
1faa4b8
feat(app_configuration): remove demo option from ad platform config
fulleni Nov 28, 2025
b47bba9
refactor(app_configuration): remove SingleChildScrollView from push n…
fulleni Nov 28, 2025
df7bae5
style(ad_config_form): add horizontal padding to form content
fulleni Nov 28, 2025
ba6f28d
refactor(app_configuration): improve ad platform config form UI and c…
fulleni Nov 28, 2025
4558eaf
refactor(localization): simplify ad platform titles
fulleni Nov 28, 2025
8f0d21a
refactor(app_configuration): remove horizontal padding from ad config…
fulleni Nov 28, 2025
037cac5
refactor(app_configuration): improve user configuration layout and ex…
fulleni Nov 28, 2025
8cb74d6
style(app_configuration): add padding to role limit widgets
fulleni Nov 28, 2025
1c9b212
refactor(app_configuration): improve expansion tile layout
fulleni Nov 28, 2025
9b77746
style(app_configuration): remove horizontal padding from limits descr…
fulleni Nov 28, 2025
2680dfc
feat(l10n): add Arabic and English translations for user limits
fulleni Nov 28, 2025
2514fc9
build(l10n): generated
fulleni Nov 28, 2025
8572ab2
refactor(app_configuration): improve notification fields layout
fulleni Nov 28, 2025
5aaee6b
feat(app_configuration): add localized labels and descriptions for no…
fulleni Nov 28, 2025
9e5a82b
feat(l10n): add descriptions for notification subscription limits
fulleni Nov 28, 2025
c771b94
build(l10n): generate
fulleni Nov 28, 2025
540c091
build(l10n): generate
fulleni Nov 28, 2025
5988b74
feat(l10n): add app status and updates localization
fulleni Nov 28, 2025
b92956d
build(l10n): generate
fulleni Nov 28, 2025
c7b7a61
refactor(app_configuration): restructure app status and updates settings
fulleni Nov 28, 2025
e5d0cba
refactor(app_configuration): adjust layout of general app config form
fulleni Nov 28, 2025
e1c9ec5
feat(app_configuration): reorganize update config form layout
fulleni Nov 28, 2025
c47e735
refactor(app_configuration): rename and specialize app config form
fulleni Nov 28, 2025
7da99cb
fix(localization): clarify app maintenance and update descriptions
fulleni Nov 28, 2025
920dab3
refactor(app_configuration): rename AppConfigurationTab to SystemConf…
fulleni Nov 28, 2025
ed66b85
refactor(app_configuration): rename "general" to "system" in app conf…
fulleni Nov 28, 2025
e638a7a
build(l10n): generate
fulleni Nov 28, 2025
eda3c0d
style: format
fulleni Nov 28, 2025
6a97efb
refactor(app_configuration): improve text controller initialization a…
fulleni Nov 28, 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
6 changes: 3 additions & 3 deletions lib/app_configuration/view/app_configuration_page.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_news_app_web_dashboard_full_source_code/app_configuration/bloc/app_configuration_bloc.dart';
import 'package:flutter_news_app_web_dashboard_full_source_code/app_configuration/view/tabs/app_configuration_tab.dart';
import 'package:flutter_news_app_web_dashboard_full_source_code/app_configuration/view/tabs/features_configuration_tab.dart';
import 'package:flutter_news_app_web_dashboard_full_source_code/app_configuration/view/tabs/system_configuration_tab.dart';
import 'package:flutter_news_app_web_dashboard_full_source_code/app_configuration/view/tabs/user_configuration_tab.dart';
import 'package:flutter_news_app_web_dashboard_full_source_code/l10n/l10n.dart';
import 'package:flutter_news_app_web_dashboard_full_source_code/shared/widgets/about_icon.dart';
Expand Down Expand Up @@ -65,7 +65,7 @@ class _AppConfigurationPageState extends State<AppConfigurationPage>
tabAlignment: TabAlignment.start,
isScrollable: true,
tabs: [
Tab(text: l10n.appTab),
Tab(text: l10n.systemTab),
Tab(text: l10n.featuresTab),
Tab(text: l10n.userTab),
],
Expand Down Expand Up @@ -132,7 +132,7 @@ class _AppConfigurationPageState extends State<AppConfigurationPage>
return TabBarView(
controller: _tabController,
children: [
AppConfigurationTab(
SystemConfigurationTab(
remoteConfig: remoteConfig,
onConfigChanged: (newConfig) {
context.read<AppConfigurationBloc>().add(
Expand Down
119 changes: 0 additions & 119 deletions lib/app_configuration/view/tabs/app_configuration_tab.dart

This file was deleted.

139 changes: 108 additions & 31 deletions lib/app_configuration/view/tabs/features_configuration_tab.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import 'package:flutter_news_app_web_dashboard_full_source_code/app_configuratio
import 'package:flutter_news_app_web_dashboard_full_source_code/app_configuration/widgets/push_notification_settings_form.dart';
import 'package:flutter_news_app_web_dashboard_full_source_code/l10n/l10n.dart';
import 'package:flutter_news_app_web_dashboard_full_source_code/shared/extensions/feed_decorator_type_l10n.dart';
import 'package:flutter_news_app_web_dashboard_full_source_code/shared/extensions/feed_item_click_behavior_l10n.dart';
import 'package:ui_kit/ui_kit.dart';

/// {@template features_configuration_tab}
Expand Down Expand Up @@ -66,6 +67,12 @@ class _FeaturesConfigurationTabState extends State<FeaturesConfigurationTab> {
_expandedTileIndex.value = isExpanded ? tileIndex : null;
},
initiallyExpanded: expandedIndex == tileIndex,
childrenPadding: const EdgeInsetsDirectional.only(
start: AppSpacing.lg,
top: AppSpacing.md,
bottom: AppSpacing.md,
),
expandedCrossAxisAlignment: CrossAxisAlignment.start,
children: [
AdConfigForm(
remoteConfig: widget.remoteConfig,
Expand Down Expand Up @@ -104,6 +111,12 @@ class _FeaturesConfigurationTabState extends State<FeaturesConfigurationTab> {
_expandedTileIndex.value = isExpanded ? tileIndex : null;
},
initiallyExpanded: expandedIndex == tileIndex,
childrenPadding: const EdgeInsetsDirectional.only(
start: AppSpacing.lg,
top: AppSpacing.md,
bottom: AppSpacing.md,
),
expandedCrossAxisAlignment: CrossAxisAlignment.start,
children: [
PushNotificationSettingsForm(
remoteConfig: widget.remoteConfig,
Expand All @@ -115,54 +128,118 @@ class _FeaturesConfigurationTabState extends State<FeaturesConfigurationTab> {
),
const SizedBox(height: AppSpacing.lg),

// Feed Decorators
// Feed
ValueListenableBuilder<int?>(
valueListenable: _expandedTileIndex,
builder: (context, expandedIndex, child) {
const tileIndex = 2;
return ExpansionTile(
key: ValueKey('feedDecoratorsTile_$expandedIndex'),
title: Text(l10n.feedDecoratorsTitle),
key: ValueKey('feedTile_$expandedIndex'),
title: Text(l10n.feedTab),
onExpansionChanged: (isExpanded) {
_expandedTileIndex.value = isExpanded ? tileIndex : null;
},
initiallyExpanded: expandedIndex == tileIndex,
childrenPadding: const EdgeInsetsDirectional.only(
start: AppSpacing.lg,
top: AppSpacing.md,
bottom: AppSpacing.md,
),
expandedCrossAxisAlignment: CrossAxisAlignment.start,
onExpansionChanged: (isExpanded) {
_expandedTileIndex.value = isExpanded ? tileIndex : null;
},
initiallyExpanded: expandedIndex == tileIndex,
children: [
Text(
l10n.feedDecoratorsDescription,
style: Theme.of(context).textTheme.bodySmall?.copyWith(
color: Theme.of(
context,
).colorScheme.onSurface.withOpacity(0.7),
ExpansionTile(
title: Text(l10n.feedItemClickBehaviorTitle),
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>(
segments: FeedItemClickBehavior.values
.where(
(b) => b != FeedItemClickBehavior.defaultBehavior,
)
.map(
(behavior) =>
ButtonSegment<FeedItemClickBehavior>(
value: behavior,
label: Text(behavior.l10n(context)),
),
)
.toList(),
selected: {
widget.remoteConfig.features.feed.itemClickBehavior,
},
onSelectionChanged: (newSelection) {
widget.onConfigChanged(
widget.remoteConfig.copyWith(
features: widget.remoteConfig.features.copyWith(
feed: widget.remoteConfig.features.feed
.copyWith(
itemClickBehavior: newSelection.first,
),
),
),
);
},
),
),
],
),
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)),
childrenPadding: const EdgeInsetsDirectional.only(
start: AppSpacing.xl,
top: AppSpacing.md,
bottom: AppSpacing.md,
ExpansionTile(
title: Text(l10n.feedDecoratorsTitle),
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),
),
expandedCrossAxisAlignment: CrossAxisAlignment.start,
children: [
FeedDecoratorForm(
decoratorType: decoratorType,
remoteConfig: widget.remoteConfig,
onConfigChanged: widget.onConfigChanged,
),
],
),
),
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)),
childrenPadding: const EdgeInsetsDirectional.only(
start: AppSpacing.xl,
top: AppSpacing.md,
bottom: AppSpacing.md,
),
expandedCrossAxisAlignment: CrossAxisAlignment.start,
children: [
FeedDecoratorForm(
decoratorType: decoratorType,
remoteConfig: widget.remoteConfig,
onConfigChanged: widget.onConfigChanged,
),
],
),
),
],
),
],
);
},
Expand Down
Loading
Loading