Skip to content

Conversation

@Haroenv
Copy link
Contributor

@Haroenv Haroenv commented Oct 7, 2024

Summary

ignore data attributes in configure

Result

fixes getsentry/sentry-javascript#12720 (comment)

I'm not yet convinced this is the right approach for all cases (may cause a slowdown possibly, although we already were spreading the props). Alternatively this could be in setQueryParameter or similar possibly, but would make that function more expensive.

In the mean time, anyone using the sentry plugin can use this patch

@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 7, 2024

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 393c969:

Sandbox Source
example-instantsearch-getting-started Configuration
example-react-instantsearch-getting-started Configuration
example-react-instantsearch-next-app-dir-example Configuration
example-react-instantsearch-next-routing-example Configuration
example-vue-instantsearch-getting-started Configuration

@JonasBa
Copy link

JonasBa commented Oct 7, 2024

Thank you @Haroenv ❤️

export function Configure(props: ConfigureProps) {
useConfigure({ ...props }, { $$widgetType: 'ais.configure' });
useConfigure(
Object.keys(props).reduce<ConfigureProps>((acc, key) => {
Copy link

Choose a reason for hiding this comment

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

Worth leaving a comment here about Sentry being the cause of this issue for future readers?

@victordelva
Copy link

Thank you, @Haroenv
I’m currently dealing with this issue between Algolia and Sentry, and this would be helpful.

Do you know of any workaround in the meantime?

@Haroenv
Copy link
Contributor Author

Haroenv commented Dec 18, 2024

@victordelva you can apply this patch in your code base using for example patch-package. For the moment it seems that sentry is more responsible for patching their code to avoid adding attributes everywhere.

@Haroenv
Copy link
Contributor Author

Haroenv commented Feb 4, 2025

can be closed now that getsentry/sentry-javascript-bundler-plugins#617 is merged

@Haroenv Haroenv closed this Feb 4, 2025
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.

reactComponentAnnotation creates Bad Requests (400) when fetching from external data source such as Algolia

4 participants