Skip to content

Fix app configuration UI #63

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

Merged
merged 19 commits into from
Aug 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
30cb67c
feat(app_configuration): improve role-specific settings interface
fulleni Aug 12, 2025
0eb6464
chore(pubspec.lock): update resolved-ref for auth-inmemory package
fulleni Aug 12, 2025
d087017
feat(l10n): add localization extension for AppUserRole
fulleni Aug 12, 2025
87824bc
feat(l10n): add extension for localized feed decorator type names
fulleni Aug 12, 2025
fb63cd3
feat(l10n): add new translations for app_ar.arb and app_en.arb
fulleni Aug 12, 2025
06dc69b
feat(app_configuration): improve localization and code structure
fulleni Aug 12, 2025
5106cf1
style: misc format
fulleni Aug 12, 2025
e6a55d1
fix(app_configuration): ensure remote config map is updated for feed …
fulleni Aug 12, 2025
7e497ef
feat(app_configuration): automatically select text in TextEditingCont…
fulleni Aug 12, 2025
b32fba6
feat(i18n): update description for days between views setting
fulleni Aug 12, 2025
e419a32
refactor(settings): implement supported languages filtering
fulleni Aug 12, 2025
f9f6aa5
feat(app_configuration): disable role selection for link_account deco…
fulleni Aug 12, 2025
4c8d498
feat(app_configuration): implement exclusive expansion for top-level …
fulleni Aug 12, 2025
4a561b5
refactor(settings): make expansion tiles mutually exclusive
fulleni Aug 12, 2025
89e049e
refactor(dashboard): implement responsive wrapping for summary cards
fulleni Aug 12, 2025
b3e1bb6
refactor(app): move max app width constant to shared file
fulleni Aug 12, 2025
f02776e
chore: barrel files
fulleni Aug 12, 2025
e50968b
chore: revert teh dsahoard page ui
fulleni Aug 12, 2025
7645a46
style: misc format
fulleni Aug 12, 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
22 changes: 11 additions & 11 deletions lib/app/bloc/app_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,18 @@ class AppBloc extends Bloc<AppEvent, AppState> {
displaySettings: const DisplaySettings(
baseTheme: AppBaseTheme.system,
accentTheme: AppAccentTheme.defaultBlue,
fontFamily: 'SystemDefault',
textScaleFactor: AppTextScaleFactor.medium,
fontWeight: AppFontWeight.regular,
),
language: languagesFixturesData.firstWhere(
(l) => l.code == 'en',
orElse: () => throw StateError(
'Default language "en" not found in language fixtures.',
fontFamily: 'SystemDefault',
textScaleFactor: AppTextScaleFactor.medium,
fontWeight: AppFontWeight.regular,
),
),
feedPreferences: const FeedDisplayPreferences(
headlineDensity: HeadlineDensity.standard,
language: languagesFixturesData.firstWhere(
(l) => l.code == 'en',
orElse: () => throw StateError(
'Default language "en" not found in language fixtures.',
),
),
feedPreferences: const FeedDisplayPreferences(
headlineDensity: HeadlineDensity.standard,
headlineImageStyle: HeadlineImageStyle.largeThumbnail,
showSourceInHeadlineFeed: true,
showPublishDateInHeadlineFeed: true,
Expand Down
11 changes: 7 additions & 4 deletions lib/app/view/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import 'package:flutter_news_app_web_dashboard_full_source_code/content_manageme
import 'package:flutter_news_app_web_dashboard_full_source_code/dashboard/bloc/dashboard_bloc.dart';
import 'package:flutter_news_app_web_dashboard_full_source_code/l10n/app_localizations.dart';
import 'package:flutter_news_app_web_dashboard_full_source_code/router/router.dart';
import 'package:flutter_news_app_web_dashboard_full_source_code/shared/services/throttled_fetching_service.dart';
import 'package:flutter_news_app_web_dashboard_full_source_code/shared/shared.dart';
import 'package:go_router/go_router.dart';
import 'package:kv_storage_service/kv_storage_service.dart';
import 'package:logging/logging.dart';
Expand Down Expand Up @@ -80,7 +80,9 @@ class App extends StatelessWidget {
RepositoryProvider.value(value: _countriesRepository),
RepositoryProvider.value(value: _languagesRepository),
RepositoryProvider.value(value: _kvStorageService),
RepositoryProvider(create: (context) => const ThrottledFetchingService()),
RepositoryProvider(
create: (context) => const ThrottledFetchingService(),
),
],
child: MultiBlocProvider(
providers: [
Expand Down Expand Up @@ -204,7 +206,6 @@ class _AppViewState extends State<_AppView> {
fontFamily: fontFamily,
);

const double kMaxAppWidth = 1000; // Local constant for max width
return Center(
child: Card(
margin: EdgeInsets.zero, // Remove default card margin
Expand All @@ -215,7 +216,9 @@ class _AppViewState extends State<_AppView> {
), // Match cardRadius from theme
),
child: ConstrainedBox(
constraints: const BoxConstraints(maxWidth: kMaxAppWidth),
constraints: const BoxConstraints(
maxWidth: AppConstants.kMaxAppWidth,
),
child: MaterialApp.router(
debugShowCheckedModeBanner: false,
routerConfig: _router,
Expand Down
Loading
Loading