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

resultsFooterComponent example not working #2475

Open
kai687 opened this issue Jan 27, 2025 · 6 comments
Open

resultsFooterComponent example not working #2475

kai687 opened this issue Jan 27, 2025 · 6 comments
Assignees

Comments

@kai687
Copy link
Contributor

kai687 commented Jan 27, 2025

In the docs for resultsFooterComponent there's a link to a code sandbox:

You can find a working example without JSX in this sandbox

But in the DocSearch UI, you can see that the DocSearch-HitsFooter is an empty section.
So it seems that this example is broken. Can you fix it and show an example how to add a footer without using JSX?

@randombeeper
Copy link
Collaborator

@kai687 I was going to look at this but am confused by your link. I see that the link here in this issue goes to a sample which does not use resultsFooterComponent. But if I go to our docs at https://docsearch.algolia.com/docs/api/#resultsfootercomponent and click on the link there, I'm taken to https://codesandbox.io/p/sandbox/docsearch-v3-resultsfootercomponent-without-jsx-jperd5 which does show resultsFooterComponent. I'm wondering where you could have got https://codesandbox.io/p/sandbox/docsearch-v3-maxresultspergroup-without-jsx-ct9m22?file=%2Fsrc%2Findex.js from?

Thanks!

@shortcuts
Copy link
Member

@randombeeper seems like it's the playground link of the next section in the docs https://docsearch.algolia.com/docs/api/#maxresultspergroup

@kai687
Copy link
Contributor Author

kai687 commented Feb 7, 2025

Sorry, it looks like I pasted the wrong link. I'm on this code sandbox:

https://codesandbox.io/s/docsearch-v3-resultsfootercomponent-without-jsx-jperd5

I don't see any footer though. It's an empty <section>. Does it look different in your preview?

Image

@fabianrbz
Copy link

We stated to see this in our app too. The resultsFooterComponent is no longer being rendered, we are using the Javascript version fwiw.

@Mister-Hope
Copy link

Mister-Hope commented Feb 19, 2025

This also affect hitComponent in both vuepress and vitepress. We are not including a jsx env by default in vue projects.

It would be great if the team can get it fixed soon, as we can not bypass this issue and you can see that the fixes were introduced a month ago.

@shortcuts @randombeeper

In other word, JSX should never be considered available with docsearch/js package, so it's weird to have any JSX elements expected in docsearch/js pacakge.

Even if a solution without jsx is again available, I believe the docs needs an update to clearly describe what to do without jsx.

@psz-basler
Copy link

Our online documentation uses the code from the example as well. Sometimes it shows up, but rarely and unpredictable. The example sandbox that I also found in the documentation does not work. Did you change something in the docsearch library?

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

No branches or pull requests

6 participants