Skip to content

Story Share portal: live search suggestions (autocomplete) #2146

Description

@maebeale

Context

The Story Share portal (/story_shares) navbar has a keyword search that submits to a full results page (?query=…). The live WordPress site (stories.awbw.org) additionally shows an AJAX live-suggestion dropdown (JetSearch) as you type, surfacing matching story titles before you submit.

What's needed

  • As-you-type suggestions below the portal search box: matching story titles (respecting the public/publicly_visible policy scope), each linking to the story.
  • Debounced requests to a lightweight JSON/Turbo-Stream endpoint on StorySharesController (or a small suggestions action), reusing Story.search_by_params/SearchCop.
  • Keyboard navigation (up/down/enter/escape) and outside-click dismiss; accessible (ARIA combobox/listbox).
  • Prefer Turbo (frame/stream) over bespoke JS where possible; a small Stimulus controller for debounce + keyboard handling is acceptable.
  • Must work on mobile (the portal search appears in the mobile menu too).

Notes

Plain submit-to-results search already ships in the portal-parity work; this issue is the progressive-enhancement layer on top.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requeststoriesIssues related to stories feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions