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

Unify DynamicContext callback parameters across link click, button click and form tracking plugins in v5 release #1390

Open
matus-tomlein opened this issue Nov 22, 2024 · 0 comments

Comments

@matus-tomlein
Copy link
Contributor

matus-tomlein commented Nov 22, 2024

Suggested in #1389 (review):

It's unfortunate we couldn't fit this into v4 as a breaking change, the resulting API inconsistency with the other plugins will be a bit awkward to resolve now.

Plugin Context Arg 1 Context Arg 2 Context Arg 3
Button Event Payload - (Element in this PR) -
Link Element - -
Form (Change/Focus) Element Element Type Element Value
Form (Submit) Element ElementData[] -

It might be worth planning for v5 to unify plugins onto a single object param for dynamic contexts so we can be a bit looser with the interface. For Link and Button at least, getting the actual MouseEvent/PointerEvent for information on the type of click, modifier keys, coordinates, pressure used, etc could be useful in some use cases (as suggested in #1368) so would be nice to add in at some point.

Originally posted by @jethron in #1389 (review)

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