{# tag_me/templates/tag_me/tag_me_select_search_bar_mobile.html #} {% comment %} MOBILE SEARCH BAR ACTIONS - CONTEXT AWARE Shows ONE big, clear action button based on current state Priority: Creating > Can Add > Has Search > Has Selected Tags {% endcomment %}
{% comment %} TEMPLATE MIGRATION NOTES - MOBILE SEARCH BAR ============================================= Date: November 18, 2025 Migrated by: Claude MAPPING DECISIONS: LOADING SPINNER (Priority 1): - text-indigo-500 dark:text-indigo-400 → text-primary-base (brand color) ADD TAG BUTTON (Priority 2 - Primary Action): - bg-indigo-600 → bg-primary-base (primary brand background) - hover:bg-indigo-500 → hover:bg-primary-hover - text-white → text-text-on-primary (white text on colored background) - focus:ring-indigo-500 → focus:ring-focus-ring - focus:ring-offset-white dark:focus:ring-offset-gray-800 → focus:ring-offset-bg-base CLEAR SEARCH BUTTON (Priority 3 - Secondary Action): - bg-gray-200 dark:bg-gray-700 → bg-bg-hover (elevated but not primary) - text-gray-600 dark:text-gray-300 → text-text-secondary - hover:bg-gray-300 dark:hover:bg-gray-600 → hover:bg-bg-hover (same, reinforces state) - hover:text-gray-900 dark:hover:text-white → hover:text-text-primary REMOVE ALL TAGS BUTTON (Priority 4 - Secondary Action): - Same mapping as Clear Search button (consistent secondary action styling) - Badge uses: bg-primary-base + text-text-on-primary (MD3 contrast pairing) MOBILE-SPECIFIC PATTERNS: 1. TOUCH TARGETS: - All buttons: w-[44px] h-[44px] (meets 44px minimum touch target) - Larger than desktop (desktop: p-2, mobile: explicit 44px) 2. BUTTON HIERARCHY: - Primary action (Add): Full primary color bg-primary-base - Secondary actions (Clear, Remove): Subtle bg-bg-hover - Visual weight difference is more pronounced on mobile 3. ACTIVE STATE: - active:scale-95 - Provides tactile feedback on touch - Not present on desktop (mouse hover is sufficient) 4. TRANSITIONS: - Scale transitions (opacity-0 scale-90) for appearing/disappearing - Smoother than fade alone for single-button context switching 5. CONTEXT-AWARE PRIORITY: Priority 1: Loading (user feedback during async) Priority 2: Add (primary action when available) Priority 3: Clear (when user has typed but can't add) Priority 4: Remove (when tags selected but no search) DESIGN PATTERN NOTES: Mobile uses STRONGER visual differentiation than desktop: - Desktop: All buttons use subtle text colors with shared hover bg - Mobile: Primary gets full color background, secondary gets bg tint - Rationale: Single button at a time = needs clear affordance - Larger touch target = more visual weight = supports stronger styling GAPS / CONSIDERATIONS: - bg-hover token works well for secondary mobile buttons - Consider: --color-button-secondary-bg if you want different treatment - Current mapping: Secondary buttons use same surface level as hover states - This works because they're active elements, not passive surfaces ALL CHANGES: Only class="" attributes modified. No Alpine.js, HTML structure, or other attributes changed. {% endcomment %}