This changes include some used for making it easier to extend user card functionality.
I know this is used for future customisation but I think it’ll be better to introduce when the use case for customization is clearer.
Sorry but from the PR’s title I’m not quite sure what this is fixing so it is making it slightly harder to review. Do you have the steps to repro this problem ?
I’m curious, what do you need the
lastEvent for? “future customizations” isn’t very specific
I needed it in https://github.com/discourse/discourse-user-card-on-hover.
Cards that are shown because the user hovered must disappear when the user no longer hovers over the user avatar. Cards that were shown because the user clicked must disappear when the user clicks again outside the user card. Using
lastEvent I can determine the type of the event.