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

Improve support for wrapping intents for child elements #78

Open
phronmophobic opened this issue Apr 27, 2024 · 1 comment
Open

Improve support for wrapping intents for child elements #78

phronmophobic opened this issue Apr 27, 2024 · 1 comment

Comments

@phronmophobic
Copy link
Owner

In some cases, a parent component wants to be able to wrap intents that bubble up from child elements. For simple cases, bubbling works just fine. However, there are a few cases where bubbling doesn't work.

For example, if a child component returns a "complex" intent, that gets implemented by dispatch!ing to simpler effects, then those simpler events don't get wrapped.

Using algebraic effects might solve these and other similar problems.

@phronmophobic
Copy link
Owner Author

Another potential use case is higher order intents.

For example, a ::drag-start intent might have some pending intents that are used if the drag and drop cancels or it might have some intents that should be returns when the drag and drop drags far enough to trigger. However, including pending intents as part of the ::drag-start event means those pending intents won't get processed by normal bubbling.

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

1 participant