web-monetization-extension
web-monetization-extension copied to clipboard
[BUG] UI not updating properly after updating budget
Steps to reproduce
- Go to settings -->budget
- update the budget
- Click on submit changes button
- accept changes on wallet
- open extension again after update on wallet is complete
- Notice on submit changes button is still disabled
Expected result
Submit changes button should go back to its initial state and in the background extension should complete the operation of updating the budget
Actual result
Screen seems to be stuck
Screenshots or videos
Additional context
No response
Operating system
Windows
Operating system version
No response
Browsers
Firefox
Browser version
No response
Extension version
v0.4
@RabebOthmani I think the original intended behavior is that since the budget update grant was successful, there is no point in enabling the "Submit changes" button to re-approve the exact same amount as the remaining balance.
However this issue ticket can be an improvement to re-enable the "Submit changes" approval for the same unchanged amount once the remaining balance gets immediately spent.
@DarianM I understand what you're saying but usually a button state goes to default once an operation is successfully completed. Keeping the button disabled felt like the UI is hanging. We shouldn't wait for the user to change the amount again which may not happen to enable the button again. It's highly unlikely a user would click submit changes without making changes and in the edge case they do whether accidently or not, nothing bad would happen
Given the popup gets closed to accept the new grant, we can't really distinguish (popup is stateless for open/close except during connection phase) between whether this is a fresh edit budget intent (submit button disabled by default), or user came to the budget page immediately after accepting grant (where I understand correctly, you want the button to be shown as enabled). Given popup closes, that's why we show the messages on the /welcome screen.
@DarianM We can perhaps store a temporary value (for like a minute or less?) in the localStorage of popup to differentiate between these intents.
@DarianM @sidvishnoi Did we handled this at all?
Should run this through our UX expert, Radu M, if we should do this, and how other extensions handle these things.