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

api: Use initial style when replacement-rendering a hover event #641

Merged
merged 4 commits into from
Dec 14, 2021

Conversation

rymiel
Copy link
Member

@rymiel rymiel commented Dec 14, 2021

Fixes #638

This matters if the component is entirely replaced due to an exact match (whereas a non-exact match creates an empty parent with no style)

I'm not 100% sure this won't cause more issues in the future, but i tried to follow how children are implemented with oldChildren

@kashike kashike added this to the 4.10.0 milestone Dec 14, 2021
This matters if the component is entirely replaced due to an exact match
@zml2008
Copy link
Member

zml2008 commented Dec 14, 2021

how does this handle cases where both the original component and the replacement result have different hover events?

I think the most sensible behaviour would be to use the replacement result's hover event and ignore the incoming one - could you add a test to ensure that's what happens?

@rymiel rymiel disabled auto-merge December 14, 2021 20:43
@rymiel
Copy link
Member Author

rymiel commented Dec 14, 2021

Which would be the "incoming" one here?

@zml2008
Copy link
Member

zml2008 commented Dec 14, 2021

the one from the pre-replacement component, sorry

@rymiel rymiel requested a review from zml2008 December 14, 2021 20:51
@zml2008
Copy link
Member

zml2008 commented Dec 14, 2021

nog sure I communicated thix properly in my initial comment - but I was thinking more specifically of a case where both hover events had content that matched the replacement pattern

This was referenced Feb 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TextReplacementConfig being weird
4 participants