Skip to content

feature: Search Form Block#285

Draft
jbmoelker wants to merge 1 commit intomainfrom
feat/search-form-block
Draft

feature: Search Form Block#285
jbmoelker wants to merge 1 commit intomainfrom
feat/search-form-block

Conversation

@jbmoelker
Copy link
Copy Markdown
Member

To do

  • model actual block in CMS and use it.
  • resolve todo form instance IDs, while maintaining support for deeplinking (SearchLink component).
  • remove the hardcoded blocks from the Not Found page.

Changes

  • Adds a content block that allows editors to add a search form to any page.
  • The search form is connected to the search page.
  • The search input is pre-filled with a query from the CMS / search param / path name. See block's README for more details.

Associated issue

Resolves #165

How to test

For this WIP:

  1. Open preview link
  2. Navigate to a page that does not exist: /en/not-found/anywhere.
  3. Verify that the "Search Form block: query from CMS" contains the hardcoded query from 404.astro.
  4. Verify that the other search form inputs use the path name (prettified): not found anywhere.
  5. Change the URL to include a query search parameter, like: /en/not-found?query=some-text.
  6. Verify that the other search form inputs use this query value.

Checklist

  • I have performed a self-review of my own code
  • I have made sure that my PR is easy to review (not too big, includes comments)
  • I have made updated relevant documentation files (in project README, docs/, etc)
  • I have added a decision log entry if the change affects the architecture or changes a significant technology
  • I have notified a reviewer

todo:
- model actual block in CMS and use it
- resolve todo form instance IDs

Resolves #165
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Search Form block

1 participant