stackernews / stacker.news

Internet communities that pay you Bitcoin
https://stacker.news
MIT License
403 stars 105 forks source link

More zap undo fixes III #1228

Closed ekzyis closed 3 weeks ago

ekzyis commented 3 weeks ago

Description

Fixed two issues with the pulse animation for zap undos. See c2a526284f8cb9eba1092be39f93dd1e3d1dd680 and 173852a35bd58a4b6354be42aa7da73293f837ce.

Additional Context

I think the bug that 173852a3 fixes is what nout experienced here with delayed zaps not showing anything. It didn't show anything if you didn't zap before since the animation used the previous color for the pulse which is the same as no color in that case.

This PR is part three of a series of PRs related to fixing stuff around zap undos (#872, #962) but since this PR is really small, I am still confident that the new code for zap undos is a lot better than what we had before. I just missed these two bugs before for some reason but they made immediately sense.

The size of this PR might even be a confirmation that it's maintainable code.

update: Oh, and #1227 broke zap undos for custom zaps since now the modal isn't immediately closed so you can't undo a zap while it's pending. Will fix this while adding visual feedback back in a way that doesn't mess with the cache and thus doesn't break replies.

Checklist

Are your changes backwards compatible? Please answer below:

Yes

Did you QA this? Could we deploy this straight to production? Please answer below:

Yes

For frontend changes: Tested on mobile? Please answer below:

Did you introduce any new environment variables? If so, call them out explicitly here: