From 8a4e76fb6f1737130e99b89f1c9a223fc2ce01be Mon Sep 17 00:00:00 2001 From: laurenspriem Date: Tue, 2 Sep 2025 16:17:10 +0530 Subject: [PATCH] Small rectification --- mobile/apps/photos/CLAUDE.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mobile/apps/photos/CLAUDE.md b/mobile/apps/photos/CLAUDE.md index c6cbdb597f..0b85d26b5d 100644 --- a/mobile/apps/photos/CLAUDE.md +++ b/mobile/apps/photos/CLAUDE.md @@ -143,7 +143,7 @@ lib/ - DO NOT commit or consider work complete until `flutter analyze` passes cleanly ### 2. Component Reuse - MANDATORY -**Always reuse existing components** +**Always try to reuse existing components** - Use a subagent to search for existing components before creating new ones - Only create new components if none exist that meet the requirements - Check both UI components in `lib/ui/` and shared components in `../../packages/` @@ -152,8 +152,9 @@ lib/ **Never hardcode colors or text styles** - Always use the Ente design system for colors and typography - Use a subagent to find the appropriate design tokens -- Access colors via theme: `Theme.of(context).colorScheme.primary` -- Access text styles via theme: `Theme.of(context).textTheme.bodyLarge` +- Access colors via theme: `getEnteColorScheme(context)` +- Access text styles via theme: `getEnteTextTheme(context)` +- Call above theme getters only at the top of (`build`) methods and re-use them throughout the component - If you MUST use custom colors/styles (extremely rare), explicitly inform the user with a clear warning ## Important Notes