Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(v2): allow search page swizzle #3280

Merged
merged 5 commits into from Aug 14, 2020
Merged

Conversation

Ako92
Copy link
Contributor

@Ako92 Ako92 commented Aug 13, 2020

Motivation

To Improve SearchPage to make swizzle cli work on it.

Have you read the Contributing Guidelines on pull requests?

I Did it.

Test Plan

Naviagate to website directory and run:
npm run swizzle @docusaurus/theme-search-algolia SearchPage

@docusaurus-bot
Copy link
Contributor

docusaurus-bot commented Aug 13, 2020

Deploy preview for docusaurus-2 ready!

Built with commit b5c2ff6

https://deploy-preview-3280--docusaurus-2.netlify.app

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Aug 13, 2020
@@ -128,6 +128,7 @@ const swizzleAllowedComponents = [
'SearchBar',
'hooks/useTheme',
'prism-include-languages',
'SearchPage',
Copy link
Contributor

Choose a reason for hiding this comment

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

add it to search plugin itself.

module.exports.getSwizzleComponentList = () =>['SearchPage']

Copy link
Contributor Author

Choose a reason for hiding this comment

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

what do you mean?
where should i add this?
this file?
image

Copy link
Contributor

Choose a reason for hiding this comment

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

in docusaurus-theme-search-algolia/index.js

Copy link
Collaborator

Choose a reason for hiding this comment

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

@anshulrgoyal for now I think we should just allow swizzle, not recommend it, as it's likely we change a bit the implementation of this page, so not adding this array is fine

Copy link
Collaborator

Choose a reason for hiding this comment

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

But yes it shuld not be added to this list in the classic theme anyway

@slorber slorber changed the title Search page swizzle feat(v2): allow search page swizzle Aug 14, 2020
@slorber slorber added the pr: bug fix This PR fixes a bug in a past release. label Aug 14, 2020
@slorber slorber changed the title feat(v2): allow search page swizzle fix(v2): allow search page swizzle Aug 14, 2020
@slorber slorber merged commit 0cc78fd into facebook:master Aug 14, 2020
@slorber slorber linked an issue Aug 14, 2020 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: bug fix This PR fixes a bug in a past release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow Search page to be swizzled
5 participants