Page MenuHomePhabricator

[Cashtab] Patch addr validation error not displaying DestinationAddressMulti
ClosedPublic

Authored by kieran709 on Dec 2 2022, 20:20.

Details

Summary

Related to T2811. Increased height of DestinationAddressMultiCtn & ExpandingAddressInputCtn, padding over send button has been reduced as the taller ExpandingAddressInputCtn was pushing send button below the visible portion of the screen on smaller devices.

Test Plan

cd web/cashtab && npm start
navigate to send screen
toggle the multiple recipients switch
input an incorrect eCash address
observe that the 'Invalid XEC address: someString' error appears
remove the incorrect eCash address
observe that the 'Input must not be blank' error appears

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bytesofman requested changes to this revision.Dec 2 2022, 23:28

This corrects the issue of cutting off the entire validation msg, but issue persists that full validation msg is cut off.

Might not be possible to solve this without content jumping given the current error msgs.

image.png (270×480 px, 25 KB)

image.png (92×369 px, 13 KB)

For now, the idea of a user with a long list of addresses and balances, except one is not valid, so he needs to know exactly which one to fix -- this is mostly hypothetical. This feature is used almost entirely by copy paste from software that produces already validated outputs.

So, I think the best approach is

  1. Adjust error msgs so that they are no longer than one line
  2. Make sure that even 320px width screens can show them on one line
This revision now requires changes to proceed.Dec 2 2022, 23:28

That makes sense. The way it works right now, the error will only fire if the first address is invalid. I would like to look into updating this to highlight the invalid address, regardless of position. I will create a task to look into it for a later diff.

Responding to review feedback. Removed specific address from handleMultiAddressChange validAddress and validValueString error msgs. While this theoretically makes it harder to discern which address has an error, through testing I have learned that in its current state, the DestinationAddressMulti input only fires an error if the first address is invalid, meaning we aren't giving up too much. A task will be created to deal with this issue.

updated validValueString error msg to match validAddress

Responding to review feedback. Removed specific address from handleMultiAddressChange validAddress and validValueString error msgs. While this theoretically makes it harder to discern which address has an error, through testing I have learned that in its current state, the DestinationAddressMulti input only fires an error if the first address is invalid, meaning we aren't giving up too much. A task will be created to deal with this issue.

I'm not seeing this as an issue

image.png (259×478 px, 26 KB)

Good solution + simplification

This revision is now accepted and ready to land.Dec 3 2022, 12:25