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(nova/react): fix eventing for multiple nova event interceptors #132

Conversation

carmenberndt
Copy link
Contributor

When there are multiple interceptors, only the last one is called.

The interceptor is reading 'internal' which always refers to the novaEventing set by eventing provider. When setting the context in the interceptor, the same internal is used instead of creating a new one. The internal in the eventing should point to eventing/unmountEventing created by the interceptor and not the root nova eventing.

@carmenberndt
Copy link
Contributor Author

please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License Agreement

@microsoft-github-policy-service agree company="Microsoft"

Copy link
Contributor

@sjwilczynski sjwilczynski left a comment

Choose a reason for hiding this comment

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

Nice, just left a 2 comments

@alloy
Copy link
Member

alloy commented Jan 14, 2025

I have a hard time understanding the semantics. Are we now able to selectively cancel/handle certain subset of events? can you please update/add the jsdoc comments to explain this?

@carmenberndt
Copy link
Contributor Author

carmenberndt commented Jan 15, 2025

I have a hard time understanding the semantics. Are we now able to selectively cancel/handle certain subset of events? can you please update/add the jsdoc comments to explain this?

The semantics don't change with this bug fix. The event handling with the interceptor can already handle/cancel a certain subset of events. Before this PR there was just a bug that only passed events for the lowest NovaEventInterceptor in the tree.

@sjwilczynski sjwilczynski enabled auto-merge (squash) January 15, 2025 10:30
@sjwilczynski sjwilczynski merged commit 7eac482 into microsoft:main Jan 15, 2025
2 checks passed
@carmenberndt carmenberndt deleted the user/carmenberndt/fixNovaEventingInterceptor branch January 15, 2025 10:33
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.

4 participants