Status-react: Sending /request, /send commands with invalid value erases value in input field (no validation message is shown)

Created on 5 Dec 2018  Âˇ  41Comments  Âˇ  Source: status-im/status-react

Description

_Type_: Bug

_Summary_: If user uses /send or /request and enter invalid amount - input field is cleared instead of validation error.

Expected behavior

Error about invalid amount, cannot send /request and /send with wrong (invalid) value

Actual behavior

Input field became empty

Reproduction

  • Open Status
  • Start 1-1 chat
  • in 1-1 chat send command with invalid amount, i.e. /request ETH 0,1Aaa

Additional Information

backlogged bounty-xs bug chat commands medium-severity wallet

Most helpful comment

@gitcoinbot yes, currently working on it.

All 41 comments

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Still relevant

Designs for validation below. This includes:

  • Command icon to replace [/] -icon
  • Error state of Command icon (red)
  • Error tooltip; copy can be adjusted to "Invalid amount"
  • Changes to the command list items and overview of token and amount that will be send. These do not have to be implemented as part of this issue.

Send Receive in chat changes bounty

Originals can be found here: https://www.figma.com/file/aS1ct66VQ6V0cio7vSqS8UoG/Chat?node-id=144%3A237

Please ping @hesterbruikman or @errorists if you need more information.

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


__This issue now has a funding of 60.0 DAI (60.0 USD @ $1.0/DAI) attached to it.__

➤ Hester Bruikman commented:

Not sure why this was auto-updated to completed. Bounty approved, awaiting contributor

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


__Workers have applied to start work__.

These users each claimed they can complete the work by 12 months from now.
Please review their action plans below:

1) speedyfixer has applied to start work _(Funders only: approve worker | reject worker)_.

Hi, I have contributed to status project, I can do it.

  1. Check the chat code
  2. Show the error validations to chat
  3. Test the solution

Learn more on the Gitcoin Issue Details page.

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


__Workers have applied to start work__.

These users each claimed they can complete the work by 9 months, 3 weeks from now.
Please review their action plans below:

1) aj-54 has applied to start work _(Funders only: approve worker | reject worker)_.

I think I can work on this issue under guidance by mentors
2) androolloyd has applied to start work _(Funders only: approve worker | reject worker)_.

  1. Update view and icon in accordance with the related dogma,

  2. Check the user input is valid, sanitize input, check against the active wallet balance.

  3. Leverage popover tooltip to explain the issue/next steps

Learn more on the Gitcoin Issue Details page.

@speedyfixer Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

Hi @gitcoinbot, yes I'm working on this, I'm reading the chat code...

@speedyfixer Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@speedyfixer Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

Hi @gitcoinbot preparing a PR....

Hi, @hesterbruikman and @errorists , I have some questions, already exists a validation, but a code is deleting the validation errors, this occurs too quickly, so users don't be able to see any validation error and the text in the input chat is cleared after that, so this is the behavior that cause this issue.

So, I fixed the problem, lets check the result:

validation_erros

After fix the above problem, I changed the error UI with the default tooltip for errors, but I have a problem with a svg resource of that tooltip, called tooltip-triangle.svg

That svg doesn't render on Github like others. is It a problem with the svg file?

The problem is showed in the screenshot:

warning

Questions/Help:

  1. Any help for solve this problem?
  2. The default tooltip for errors in the app is different to the figma file design, should I change to the same style of the figma file or use the default tooltip for errors (The same in the screenshot)?

Hmm, @jeluard is there any chance you might be able to weigh in here?

And @errorists @hesterbruikman, can you confirm that the figma file shows the tooltip design we should be using? I would assume that's the source of truth. Perhaps we need to update the default used then.

I think it has something to do with the PR in which we removed all SVGs including the tooltip tip (didn't knew it was an image, you can get the same result with a rectangle view rotated by 45°). Yes, Figma is showing the correct tooltip design, it's an update on the one above where we removed the pink background so it's always white and only text label color changes. Should I upload the SVG then?

AFAIK @rasom will fix this issue soon

@speedyfixer Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@speedyfixer Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


@speedyfixer due to inactivity, we have escalated this issue to Gitcoin's moderation team. Let us know if you believe this has been done in error!

  • [x] reminder (3 days)
  • [x] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


@speedyfixer due to inactivity, we have escalated this issue to Gitcoin's moderation team. Let us know if you believe this has been done in error!

  • [x] reminder (3 days)
  • [x] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

Thanks Status team, I will try with new merged PR. I had problems the last time with the status build so I will try again this weekend.

@speedyfixer Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@speedyfixer Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@gitcoinbot yes, currently working on it.

@speedyfixer Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@speedyfixer Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@gitcoinbot Yes, waiting for a PR review.

@speedyfixer Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@speedyfixer Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


@speedyfixer due to inactivity, we have escalated this issue to Gitcoin's moderation team. Let us know if you believe this has been done in error!

  • [x] reminder (3 days)
  • [x] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

I'm going to update the PR with the new develop branch changes.

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


__Work for 60.0 DAI (60.0 USD @ $1.0/DAI) has been submitted by__:

  1. @speedyfixer

@StatusSceptre please take a look at the submitted work:

  • PR by @speedyFixer

@StatusSceptre not sure what we should do now with bounty, since commands are removed now in #8674

Will this fix be useful when we revive /send commands @flexsurfer? Can we pay for the effort? @StatusSceptre

I'll ask Jason over email for this thoughts.

Hi Status team, I don't know what to do with this in Gitcoin, I submitted work, because I spent time in this, but I didn't generate any fix because your parallel PR, so, should I stop the work? I was working in two issues with the same problem.

Yes, ditto issue #8407 - you can stop work and we will sort out payment for your effort.

@rachelhamlin done! thanks!

⚡️ A tip worth 36.00000 DAI (36.0 USD @ $1.0/DAI) has been granted to @speedyfixer for this issue from @StatusSceptre. ⚡️

Nice work @speedyfixer! Your tip has automatically been deposited in the ETH address we have on file.

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


__This Bounty has been completed.__

Additional Tips for this Bounty:

  • StatusSceptre tipped 36.0000 DAI worth 36.0 USD to speedyfixer.

not relevant in Status v1.0.1.

Was this page helpful?
0 / 5 - 0 ratings