feat: remove recipes section, add redevelopment TODO
The recipes tab (recommendations + saved recipes + detail screen) is removed from the app UI and all feature files are deleted. The section will be redesigned from scratch. - Remove /recipes and /recipe-detail routes from app_router.dart - Remove Recipes tab from BottomNavigationBar - Delete client/lib/features/recipes/ entirely - Keep shared/models/recipe.dart and saved_recipe.dart for later reuse - Add "Раздел рецептов (переработка с нуля)" section to docs/TODO.md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -18,13 +18,9 @@ import '../../features/scan/recognition_confirm_screen.dart';
|
||||
import '../../features/scan/recognition_service.dart';
|
||||
import '../../features/menu/menu_screen.dart';
|
||||
import '../../features/menu/shopping_list_screen.dart';
|
||||
import '../../features/recipes/recipe_detail_screen.dart';
|
||||
import '../../features/recipes/recipes_screen.dart';
|
||||
import '../../features/profile/profile_screen.dart';
|
||||
import '../../features/products/user_product_provider.dart';
|
||||
import '../../features/scan/recognition_history_screen.dart';
|
||||
import '../../shared/models/recipe.dart';
|
||||
import '../../shared/models/saved_recipe.dart';
|
||||
|
||||
// Notifies GoRouter when auth state or profile state changes.
|
||||
class _RouterNotifier extends ChangeNotifier {
|
||||
@@ -104,20 +100,6 @@ final routerProvider = Provider<GoRouter>((ref) {
|
||||
path: '/onboarding',
|
||||
builder: (_, __) => const OnboardingScreen(),
|
||||
),
|
||||
// Full-screen recipe detail — shown without the bottom navigation bar.
|
||||
GoRoute(
|
||||
path: '/recipe-detail',
|
||||
builder: (context, state) {
|
||||
final extra = state.extra;
|
||||
if (extra is Recipe) {
|
||||
return RecipeDetailScreen(recipe: extra);
|
||||
}
|
||||
if (extra is SavedRecipe) {
|
||||
return RecipeDetailScreen(saved: extra);
|
||||
}
|
||||
return const _InvalidRoute();
|
||||
},
|
||||
),
|
||||
// Add product — shown without the bottom navigation bar.
|
||||
GoRoute(
|
||||
path: '/products/add',
|
||||
@@ -155,8 +137,6 @@ final routerProvider = Provider<GoRouter>((ref) {
|
||||
path: '/products',
|
||||
builder: (_, __) => const ProductsScreen()),
|
||||
GoRoute(path: '/menu', builder: (_, __) => const MenuScreen()),
|
||||
GoRoute(
|
||||
path: '/recipes', builder: (_, __) => const RecipesScreen()),
|
||||
GoRoute(
|
||||
path: '/profile', builder: (_, __) => const ProfileScreen()),
|
||||
],
|
||||
@@ -174,18 +154,6 @@ class _SplashScreen extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
class _InvalidRoute extends StatelessWidget {
|
||||
const _InvalidRoute();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
if (context.mounted) Navigator.of(context).pop();
|
||||
});
|
||||
return const Scaffold(body: SizedBox.shrink());
|
||||
}
|
||||
}
|
||||
|
||||
class MainShell extends ConsumerWidget {
|
||||
final Widget child;
|
||||
|
||||
@@ -195,7 +163,6 @@ class MainShell extends ConsumerWidget {
|
||||
'/home',
|
||||
'/products',
|
||||
'/menu',
|
||||
'/recipes',
|
||||
'/profile',
|
||||
];
|
||||
|
||||
@@ -234,10 +201,6 @@ class MainShell extends ConsumerWidget {
|
||||
icon: const Icon(Icons.calendar_month),
|
||||
label: l10n.menu,
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: const Icon(Icons.menu_book),
|
||||
label: l10n.navRecipes,
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: const Icon(Icons.person),
|
||||
label: l10n.profileTitle,
|
||||
|
||||
Reference in New Issue
Block a user