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(algolia): add insights property on Algolia Theme Config object TS definition #10048

Merged

Conversation

Virgil993
Copy link
Contributor

@Virgil993 Virgil993 commented Apr 16, 2024

Pre-flight checklist

  • I have read the Contributing Guidelines on pull requests.
  • If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
  • If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation

I was working with the Docsearch integration and i noticed that the Algolia Theme Config object defined in @docusaurus/theme-search-algolia did not have the insights property that allows Docsearch to send click events to the Algolia Dashboard

Test Plan

I added an optional attribute to the Algolia Config Object called insights. Because there is no strict validation on the object. This change should allow the user to add the insights
option and because the props are passed to the docsearch modal it should work as intended. i already tested it on my project and even though i get an IDE error regarding the type, the events are sent to the algolia Dashboard

Test links

The link to the insights property as described by docsearch
https://docsearch.algolia.com/docs/docsearch-v3/#sending-events
The link to the documentation where the algolia object is defined
https://docusaurus.io/docs/search#connecting-algolia

Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/

Related issues/PRs

@facebook-github-bot
Copy link
Contributor

Hi @Virgil993!

Thank you for your pull request and welcome to our community.

Action Required

In 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.

Process

In 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 CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

Copy link

netlify bot commented Apr 16, 2024

[V2]

Name Link
🔨 Latest commit bf31d6b
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/66211e08037b820008b65470
😎 Deploy Preview https://deploy-preview-10048--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

github-actions bot commented Apr 16, 2024

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ 🔴 35 🟢 98 🟢 96 🟢 100 🟠 88 Report
/docs/installation 🟠 50 🟢 96 🟢 100 🟢 100 🟠 88 Report
/docs/category/getting-started 🟠 75 🟢 100 🟢 100 🟢 90 🟠 88 Report
/blog 🟠 66 🟢 100 🟢 100 🟢 90 🟠 88 Report
/blog/preparing-your-site-for-docusaurus-v3 🟠 62 🟢 96 🟢 100 🟢 100 🟠 88 Report
/blog/tags/release 🟠 69 🟢 100 🟢 100 🟠 80 🟠 88 Report
/blog/tags 🟠 75 🟢 100 🟢 100 🟢 90 🟠 88 Report

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Apr 16, 2024
@slorber slorber changed the title added insights property on Algolia Theme Config object fix(algolia): add insights property on Algolia Theme Config object TS definition Apr 16, 2024
@slorber slorber added the pr: bug fix This PR fixes a bug in a past release. label Apr 16, 2024
@slorber
Copy link
Collaborator

slorber commented Apr 17, 2024

Unfortunately your prettier format probably didn't use the right config 😅 all those are unexpected changes

This reverts commit 0af2583.
@Virgil993
Copy link
Contributor Author

Virgil993 commented Apr 17, 2024

Unfortunately your prettier format probably didn't use the right config 😅 all those are unexpected changes
Don't really know how to pass those lint workflows because i don't really know why they fail

@Virgil993 Virgil993 closed this Apr 17, 2024
@Virgil993 Virgil993 reopened this Apr 17, 2024
@Virgil993
Copy link
Contributor Author

Is there any way I can help with this Lint AutoFix workflow?

@slorber
Copy link
Collaborator

slorber commented Apr 18, 2024

Thanks, I'll handle the rest 👍

@Virgil993
Copy link
Contributor Author

Thank you, hope I could be of help

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.

None yet

3 participants