feat(theme-search-algolia): allow overriding transformSearchClient#11581
Conversation
|
Hi @hugohaggmark! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
✅ [V2]
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
slorber
left a comment
There was a problem hiding this comment.
Agree that could be convenient for some advanced use-cases
Ideally we'd need to split this large legacy component into many smaller parts
| } | ||
|
|
||
| export default function SearchBar(): ReactNode { | ||
| export default function SearchBar(props: Partial<DocSearchV4Props>): ReactNode { |
There was a problem hiding this comment.
I made the prop type more permissive so that we can override everything (at your own risk)
| const docSearchProps: DocSearchV4Props = { | ||
| ...(siteConfig.themeConfig.algolia as DocSearchV4Props), | ||
| // Let props override theme config | ||
| // See https://github.com/facebook/docusaurus/pull/11581 |
There was a problem hiding this comment.
useful comment to remember the purpose
|
Thanks @slorber for getting this merged 🙌 . Do you have an idea of when this might be released? |
|
Likely before the end of the year But you can use today with a canary: https://docusaurus.io/community/canary |
|
Thanks 👍 |
Pre-flight checklist
Motivation
See #11580
Test Plan
transformSearchClientfunctiontransformSearchClientfunction should be calledTest links
Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/
Related issues/PRs
Closes #11580