Skip to content

Conversation

@Daksh-Jain08
Copy link

Description

Add a keyboard-activated search modal to the resource detail page, allowing users to quickly search resources without navigating back to the resource list.

Fixes #870

Changes

  • Added new resource_search_modal.html template with a search form
  • Added keyboard event listener in resource_detail.html for opening the modal
  • Search input is pre-populated with the current resource path

Features

  • Ctrl+K: Opens search modal from anywhere on the page
  • /: Opens search modal when not focused on an input field
  • Esc: Closes the search modal
  • Enter: Submits the search and redirects to resource list with results

Screenshot

screenshot

Testing

  • Navigate to any resource detail page
  • Press Ctrl+K or / to open the search modal
  • Verify the current path is pre-filled in the search input
  • Enter a search term and press Enter
  • Confirm redirection to resource list with search applied
  • Press Esc to close the modal without searching

… resources upon pressing Ctrl+K or /. Fixes aboutcode-org#870

Signed-off-by: Daksh Jain <jain.daksh0808@gmail.com>

Signed-off-by: Daksh Jain <jain.daksh0808@gmail.com>
Signed-off-by: Daksh Jain <jain.daksh0808@gmail.com>
@Daksh-Jain08 Daksh-Jain08 force-pushed the feature/search-on-resource-detail branch from 3e1abc9 to 0106859 Compare February 6, 2026 21:26
@Daksh-Jain08
Copy link
Author

@tdruez @AyanSinhaMahapatra Please review the changes and suggest improvments if any.

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.

When I look at a resource details, I want to search resources

1 participant