-
-
Notifications
You must be signed in to change notification settings - Fork 326
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
Adds optional confetti to incoming payments in wallet #2231
Conversation
This is awesome!!!! Does it look good on mobile too (vertical aspect ratio)? |
Needs |
why are you creating an extra websocket connection? it should be enough to trigger the animation when we also close the popup after a successful payment. we should keep those connections to a minimum. i don't think that the animation should be disabled by default its such a good feature and every wallet has it, i don't even think its should be configurable at all! |
2024-02-05.12-11-33.mp4 |
The reason I am adding the websocket is it is far superior to the SSE (which often times out). Later I will propose we use for updating the wallet balance and doing things like easily have balances in the drawer updating Its enabled by default. People like customising stuff, the toggle switch will later turn into a select box, where a user could select from various animations. The admin could then set what animations are available, same flow as themes really |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #2231 +/- ##
==========================================
+ Coverage 59.23% 59.24% +0.01%
==========================================
Files 60 60
Lines 8992 8992
==========================================
+ Hits 5326 5327 +1
+ Misses 3666 3665 -1 ☔ View full report in Codecov by Sentry. |
How does one create (and add) a new animation? |
For now in the reactions.js file, but later I will add gif support and uploading gifs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK
can you add the library via npm and into our build? |
Nien! Its been changed, its also very small, so I think this approach is unnecessary |
2024-02-02.02-25-48.mp4
The confetti websocket can be added to any page with
eventReactionWebocket(event_id, event_function)
For the wallet example
event_id
is the wallet ID, andevent_function
is the functioneventReactionBothSidesConfetti
(eventReactionFireworksConfetti
also exists but is not used)It made sense to leave room for multiple animations the developer could summon using
eventReactionWebocket
, or the user could specify in the profile page.