Skip to content

Fix hide UI related to notification feature #52

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 8 commits into from
Jun 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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/account/view/account_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -130,17 +130,17 @@ class AccountPage extends StatelessWidget {
statusWidget = Column(
mainAxisSize: MainAxisSize.min, // To keep column tight
children: [
if (user?.role != null) ...[
// Show role only if available
const SizedBox(height: AppSpacing.xs),
Text(
l10n.accountRoleLabel(user!.role.name),
style: textTheme.bodyMedium?.copyWith(
color: colorScheme.onSurfaceVariant,
),
textAlign: TextAlign.center,
),
],
// if (user?.role != null) ...[
// // Show role only if available
// const SizedBox(height: AppSpacing.xs),
// Text(
// l10n.accountRoleLabel(user!.role.name),
// style: textTheme.bodyMedium?.copyWith(
// color: colorScheme.onSurfaceVariant,
// ),
// textAlign: TextAlign.center,
// ),
// ],
const SizedBox(height: AppSpacing.md), // Consistent spacing
OutlinedButton.icon(
// Changed to OutlinedButton.icon
Expand Down
2 changes: 1 addition & 1 deletion lib/authentication/view/authentication_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class AuthenticationPage extends StatelessWidget {
Padding(
padding: const EdgeInsets.only(bottom: AppSpacing.xl),
child: Icon(
Icons.security,
isLinkingContext ? Icons.sync : Icons.newspaper,
size: AppSpacing.xxl * 2, // Standardized large icon
color: colorScheme.primary,
),
Expand Down
18 changes: 9 additions & 9 deletions lib/headlines-feed/view/headlines_feed_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ class _HeadlinesFeedPageState extends State<HeadlinesFeedPage> {
style: textTheme.titleLarge?.copyWith(fontWeight: FontWeight.bold),
),
actions: [
IconButton(
icon: const Icon(Icons.notifications_outlined),
tooltip: l10n.notificationsTooltip, // Add tooltip for accessibility
onPressed: () {
context.goNamed(
Routes.notificationsName,
); // Ensure correct route name
},
),
// IconButton(
// icon: const Icon(Icons.notifications_outlined),
// tooltip: l10n.notificationsTooltip, // Add tooltip for accessibility
// onPressed: () {
// context.goNamed(
// Routes.notificationsName,
// ); // Ensure correct route name
// },
// ),
BlocBuilder<HeadlinesFeedBloc, HeadlinesFeedState>(
builder: (context, state) {
var isFilterApplied = false;
Expand Down
2 changes: 1 addition & 1 deletion lib/headlines-feed/view/headlines_filter_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ class _HeadlinesFilterPageState extends State<HeadlinesFilterPage> {
title: Text(l10n.headlinesFeedFilterTitle),
actions: [
IconButton(
icon: const Icon(Icons.clear_all),
icon: const Icon(Icons.refresh),
tooltip: l10n.headlinesFeedFilterResetButton,
onPressed: () {
context.read<HeadlinesFeedBloc>().add(
Expand Down
8 changes: 4 additions & 4 deletions lib/l10n/app_localizations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -449,25 +449,25 @@ abstract class AppLocalizations {
/// Headline for the authentication page when linking an anonymous account
///
/// In en, this message translates to:
/// **'Connect Your Account'**
/// **'Sync Your Data'**
String get authenticationLinkingHeadline;

/// Subheadline explaining the benefit of linking an anonymous account
///
/// In en, this message translates to:
/// **'Sign in with Google or Email to save your preferences and reading history across devices.'**
/// **'save your settings, content preferences and more across devices.'**
String get authenticationLinkingSubheadline;

/// Headline for the authentication page during standard sign-in
///
/// In en, this message translates to:
/// **'Sign In'**
/// **'Headlines Toolkit'**
String get authenticationSignInHeadline;

/// Subheadline for the authentication page during standard sign-in
///
/// In en, this message translates to:
/// **'Sign in or continue anonymously to personalize your feed.'**
/// **'Develop News Headlines Apps Rapidly & Reliably.'**
String get authenticationSignInSubheadline;

/// AppBar title for the email sign-in page
Expand Down
8 changes: 4 additions & 4 deletions lib/l10n/app_localizations_ar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -190,18 +190,18 @@ class AppLocalizationsAr extends AppLocalizations {
String get authenticationEmailSignInButton => 'متابعة بالبريد الإلكتروني';

@override
String get authenticationLinkingHeadline => 'ربط حسابك';
String get authenticationLinkingHeadline => 'زامن بياناتك';

@override
String get authenticationLinkingSubheadline =>
'سجل الدخول باستخدام جوجل أو البريد الإلكتروني لحفظ تفضيلاتك وسجل القراءة عبر الأجهزة.';
'إحفظ إعداداتك، تفضيلات المحتوى والمزيد عبر مختلف الأجهزة.';

@override
String get authenticationSignInHeadline => 'تسجيل الدخول';
String get authenticationSignInHeadline => 'هادلاينز تولكيت';

@override
String get authenticationSignInSubheadline =>
'سجل الدخول أو تابع كمجهول لتخصيص موجز الأخبار الخاص بك.';
'طور التطبيقات الإخبارية بسرعة وبشكل موثوق.';

@override
String get emailSignInPageTitle => 'تسجيل الدخول بالبريد الإلكتروني';
Expand Down
8 changes: 4 additions & 4 deletions lib/l10n/app_localizations_en.dart
Original file line number Diff line number Diff line change
Expand Up @@ -192,18 +192,18 @@ class AppLocalizationsEn extends AppLocalizations {
String get authenticationEmailSignInButton => 'Continue with Email';

@override
String get authenticationLinkingHeadline => 'Connect Your Account';
String get authenticationLinkingHeadline => 'Sync Your Data';

@override
String get authenticationLinkingSubheadline =>
'Sign in with Google or Email to save your preferences and reading history across devices.';
'save your settings, content preferences and more across devices.';

@override
String get authenticationSignInHeadline => 'Sign In';
String get authenticationSignInHeadline => 'Headlines Toolkit';

@override
String get authenticationSignInSubheadline =>
'Sign in or continue anonymously to personalize your feed.';
'Develop News Headlines Apps Rapidly & Reliably.';

@override
String get emailSignInPageTitle => 'Sign in with Email';
Expand Down
8 changes: 4 additions & 4 deletions lib/l10n/arb/app_ar.arb
Original file line number Diff line number Diff line change
Expand Up @@ -238,19 +238,19 @@
"@authenticationEmailSignInButton": {
"description": "نص زر بدء تدفق تسجيل الدخول بالبريد الإلكتروني"
},
"authenticationLinkingHeadline": "ربط حسابك",
"authenticationLinkingHeadline": "زامن بياناتك",
"@authenticationLinkingHeadline": {
"description": "عنوان صفحة المصادقة عند ربط حساب مجهول"
},
"authenticationLinkingSubheadline": "سجل الدخول باستخدام جوجل أو البريد الإلكتروني لحفظ تفضيلاتك وسجل القراءة عبر الأجهزة.",
"authenticationLinkingSubheadline": "إحفظ إعداداتك، تفضيلات المحتوى والمزيد عبر مختلف الأجهزة.",
"@authenticationLinkingSubheadline": {
"description": "عنوان فرعي يشرح فائدة ربط حساب مجهول"
},
"authenticationSignInHeadline": "تسجيل الدخول",
"authenticationSignInHeadline": "هادلاينز تولكيت",
"@authenticationSignInHeadline": {
"description": "عنوان صفحة المصادقة أثناء تسجيل الدخول القياسي"
},
"authenticationSignInSubheadline": "سجل الدخول أو تابع كمجهول لتخصيص موجز الأخبار الخاص بك.",
"authenticationSignInSubheadline": "طور التطبيقات الإخبارية بسرعة وبشكل موثوق.",
"@authenticationSignInSubheadline": {
"description": "عنوان فرعي لصفحة المصادقة أثناء تسجيل الدخول القياسي"
},
Expand Down
8 changes: 4 additions & 4 deletions lib/l10n/arb/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -238,19 +238,19 @@
"@authenticationEmailSignInButton": {
"description": "Button text for initiating email sign-in flow"
},
"authenticationLinkingHeadline": "Connect Your Account",
"authenticationLinkingHeadline": "Sync Your Data",
"@authenticationLinkingHeadline": {
"description": "Headline for the authentication page when linking an anonymous account"
},
"authenticationLinkingSubheadline": "Sign in with Google or Email to save your preferences and reading history across devices.",
"authenticationLinkingSubheadline": "save your settings, content preferences and more across devices.",
"@authenticationLinkingSubheadline": {
"description": "Subheadline explaining the benefit of linking an anonymous account"
},
"authenticationSignInHeadline": "Sign In",
"authenticationSignInHeadline": "Headlines Toolkit",
"@authenticationSignInHeadline": {
"description": "Headline for the authentication page during standard sign-in"
},
"authenticationSignInSubheadline": "Sign in or continue anonymously to personalize your feed.",
"authenticationSignInSubheadline": "Develop News Headlines Apps Rapidly & Reliably.",
"@authenticationSignInSubheadline": {
"description": "Subheadline for the authentication page during standard sign-in"
},
Expand Down
12 changes: 6 additions & 6 deletions lib/settings/view/settings_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ class SettingsPage extends StatelessWidget {
onTap: () => context.goNamed(Routes.settingsFeedName),
),
const Divider(indent: AppSpacing.lg, endIndent: AppSpacing.lg),
_buildSettingsTile(
context: context,
icon: Icons.notifications_outlined,
title: l10n.settingsNotificationsTitle, // Add l10n key
onTap: () => context.goNamed(Routes.settingsNotificationsName),
),
// _buildSettingsTile(
// context: context,
// icon: Icons.notifications_outlined,
// title: l10n.settingsNotificationsTitle,
// onTap: () => context.goNamed(Routes.settingsNotificationsName),
// ),
],
);
},
Expand Down
Loading