Skip to content

feat(noResults): allow providing URL to report missing results#1289

Merged
shortcuts merged 3 commits into
nextfrom
feat/noResults-missingResultsURL
Feb 2, 2022
Merged

feat(noResults): allow providing URL to report missing results#1289
shortcuts merged 3 commits into
nextfrom
feat/noResults-missingResultsURL

Conversation

@shortcuts

@shortcuts shortcuts commented Jan 31, 2022

Copy link
Copy Markdown
Member

Summary

This PR provides an option for the user to define a link to report the missing results, nothing is rendered by default.

With the deprecation of our legacy infra (follow up of algolia/docsearch-configs#5069), the current value of this link (https://github.com/algolia/docsearch-configs) does not make sense anymore.

Other solutions

  • Remove this informative message
  • Allow providing a function or JSX element in order to retrieve current query
    • We did not receive feature requests to customize the noResults screen, which is also doable by importing the DocSearch components.

@netlify

netlify Bot commented Jan 31, 2022

Copy link
Copy Markdown

✔️ Deploy Preview for docsearch ready!

🔨 Explore the source changes: ac4b495

🔍 Inspect the deploy log: https://app.netlify.com/sites/docsearch/deploys/61f960ee81996600072071a1

😎 Browse the preview: https://deploy-preview-1289--docsearch.netlify.app

@codesandbox-ci

codesandbox-ci Bot commented Jan 31, 2022

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit ac4b495:

Sandbox Source
Vanilla Configuration

disableUserPersonalization = false,
initialQuery: initialQueryFromProp = '',
translations = {},
reportMissingResultsUrl,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's optional but there is are no default?
edit: the component is optional okay 🆗

Comment thread packages/docsearch-react/src/NoResultsScreen.tsx Outdated
@shortcuts shortcuts force-pushed the feat/noResults-missingResultsURL branch from bbfd921 to 0934664 Compare February 1, 2022 09:59
@shortcuts shortcuts force-pushed the feat/noResults-missingResultsURL branch from 4f1f3d2 to ced2317 Compare February 1, 2022 10:06
Comment thread packages/website/docs/api.mdx Outdated
Comment thread packages/website/docs/api.mdx Outdated
Comment thread packages/docsearch-react/src/NoResultsScreen.tsx Outdated
@shortcuts shortcuts merged commit 2c1fe7c into next Feb 2, 2022
@shortcuts shortcuts deleted the feat/noResults-missingResultsURL branch February 2, 2022 09:39
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.

3 participants