web-monetization-extension icon indicating copy to clipboard operation
web-monetization-extension copied to clipboard

[BUG] UI not updating properly after updating budget

Open RabebOthmani opened this issue 10 months ago • 5 comments

Steps to reproduce

  1. Go to settings -->budget
  2. update the budget
  3. Click on submit changes button
  4. accept changes on wallet
  5. open extension again after update on wallet is complete
  6. 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

Image

Additional context

No response

Operating system

Windows

Operating system version

No response

Browsers

Firefox

Browser version

No response

Extension version

v0.4

RabebOthmani avatar Jan 24 '25 12:01 RabebOthmani

@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 avatar Jan 27 '25 12:01 DarianM

@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

RabebOthmani avatar Jan 27 '25 12:01 RabebOthmani

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.

sidvishnoi avatar Jan 27 '25 12:01 sidvishnoi

@DarianM @sidvishnoi Did we handled this at all?

RabebOthmani avatar Aug 05 '25 11:08 RabebOthmani

Should run this through our UX expert, Radu M, if we should do this, and how other extensions handle these things.

sidvishnoi avatar Aug 05 '25 11:08 sidvishnoi