Skip to content

Conversation

@SebastiaanKloos
Copy link
Collaborator

Summary

  • Add a global spotlight search feature accessible via ⌘K/Ctrl+K
  • Refactor existing search modal to use spotlight-style interface
  • Add support for searching both items and projects
  • Include quick actions like creating new items from search query

Changes

  • New SpotlightSearch Livewire component with real-time search
  • Reusable Blade components for search result items and sections
  • Integration with existing header navigation
  • Support for keyboard navigation (arrow keys, Enter, Escape)
  • i18n support for EN and NL languages
  • Custom styling with dark mode support
  • Pre-fill item creation modal with search query when creating from spotlight

Technical Details

  • Uses Livewire wire:model.live for reactive search
  • Alpine.js for keyboard navigation and UI state management
  • Tailwind CSS for responsive styling
  • Supports both items and projects search with relevant metadata display

SebastiaanKloos and others added 9 commits November 26, 2025 16:37
Implement a global spotlight search component with keyboard navigation
and real-time search functionality. The component searches both items
and projects, displays results in categorized sections, and includes
quick actions for common tasks.

Features:
- Real-time search with debouncing
- Keyboard navigation (arrow keys, enter, escape)
- Search items by title and content
- Search projects by title and description
- Quick actions for creating items and accessing key pages
- Support for both authenticated and guest users
- Smooth transitions and backdrop blur effects

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Add event listeners in the Header component to handle spotlight search
interactions. When users create items from the search, the query can be
pre-filled in the submit item modal. Also add support for opening the
submit item modal without pre-filled data.

Changes:
- Add On attribute import for Livewire events
- Implement openSubmitItemWithQuery() to pre-fill item title from search
- Implement openSubmitItemModal() to open modal without data
- Remove unnecessary fillForm call from submitItemAction

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Replace the old search action with spotlight search triggers throughout
the header navigation. Add the spotlight search component to the main
app layout for global accessibility.

Changes:
- Replace searchItemAction with spotlight open event triggers
- Update keyboard shortcuts (Cmd+K/Ctrl+K) to open spotlight
- Add search button with keyboard hint in desktop navigation
- Add search button in mobile navigation menu
- Include spotlight-search component in app layout

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Add comprehensive translations for the spotlight search interface in
both English and Dutch. Includes search placeholders, section headers,
action labels, keyboard hints, and result count messages.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Add custom styles for the spotlight search modal including shadow
effects and custom scrollbar styling. The scrollbar matches the design
system with proper light/dark mode support.

Changes:
- Add spotlight-container shadow effects for light and dark modes
- Style custom scrollbar for results container
- Implement hover states for scrollbar thumb
- Ensure proper dark mode color adjustments

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Update the prefill mechanism to use Filament's mountUsing method with
action arguments instead of trying to pass form data directly. The
query is now passed as 'prefilledTitle' argument and properly fills
the title field when opening the submit item modal from search.

Also store query in variable before closing spotlight to ensure the
value is captured correctly before the component state resets.
Remove old search modal implementation and search button label
component that are no longer needed after migration to spotlight
search. These files have been replaced by the new spotlight search
functionality implemented in previous commits.

Deleted files:
- resources/views/modals/search.blade.php
- resources/views/components/search-button-label.blade.php
Reduce code duplication in spotlight-search.blade.php by creating
two reusable Blade components:

1. x-spotlight.section-header - Renders consistent section headers
2. x-spotlight.result-item - Renders search result items with:
   - Support for both links and buttons
   - Flexible icon handling (Heroicons or emoji)
   - Optional metadata and aside slots
   - Consistent styling and hover states
   - Keyboard navigation support

This refactoring improves maintainability and makes the spotlight
search view more readable while preserving all functionality.
- Combine mountUsing with currentProjectId from upstream
- Support both prefilled title from search and currentProjectId
- Remove deleted search-button-label.blade.php component
@SebastiaanKloos SebastiaanKloos marked this pull request as draft November 28, 2025 10:08
- Remove duplicate 'profile' key from both EN and NL translations
- Remove unused quick action translation keys
- Keep only the search-specific translations
- Add 'profile_title' key to avoid conflict with array-based 'profile' key
- Add back all missing translation keys needed by spotlight search
- Update spotlight-search.blade.php to use 'profile_title' instead of 'profile'
- Fixes htmlspecialchars error caused by passing array to trans()
- Add 'search_button' translation key for EN and NL
- Update header.blade.php to use trans('spotlight.search_button')
- Both desktop and mobile search buttons now use translations
@SebastiaanKloos SebastiaanKloos marked this pull request as ready for review November 28, 2025 10:14
@Cannonb4ll Cannonb4ll merged commit a673e4c into ploi:main Nov 29, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants