status-im / status-desktop

Status Desktop client made in Nim & QML
https://status.app
Mozilla Public License 2.0
287 stars 78 forks source link

Slippage Selector Issues #15017

Closed Khushboo-dev-cpp closed 1 week ago

Khushboo-dev-cpp commented 3 months ago

Bug Report

Description

The SlippageSelector.qml is missing some behaviours and behaves incorrectly in some cases as listed below

  1. The various error messages - the reason I think this should be included in this base component is because only the component knows best the various reason for the error. FO example in case nothing is entered we should empty error and we cant know that from the outside if the slippageSelector. hence, I think this component should show the error messages too. Ive listed the various error messages below

2. https://www.figma.com/design/TS0eQX9dAZXqZtELiwKIoK/Swap---Milestone-1?node-id=3410-267460&m=dev design shows a possibility to enter letters but we aren't allowing it at all
3. Unable to enter values greater than 2 decimals points and showing error message
4. If I click on custom and switch to a predefined value without entering any value, the button should switch back to Custom cause the current behaviour seems wrong
https://github.com/status-im/status-desktop/assets/60327365/3b4f0086-c8b1-4c44-9783-365ace29728a
5. I see Unit tests missing for the  error scenarios mentioned here and would be great if UTs were added to confirm error message shown too.
caybro commented 3 months ago

I'll take this and let's discuss it tomorrow :)

noeliaSD commented 2 months ago

I'm removing the ui-team label since @Khushboo-dev-cpp is taking it and it's easier to track ui capacity then!

Khushboo-dev-cpp commented 2 months ago

can we keep it open for whoever has time to take it? as it is a bug? or maybe it doesn't work like that @noeliaSD ? and unassign me so that either me or Lukas can pick it up.

noeliaSD commented 2 months ago

can we keep it open for whoever has time to take it? as it is a bug? or maybe it doesn't work like that @noeliaSD ? and unassign me so that either me or Lukas can pick it up.

Alright, added into our ui backlog then! Thank you!!

micieslak commented 1 month ago

Screencast from 25.07.2024 13:31:16.webm

My findings recorded. Sometimes nothing is selected. Sometimes there is custom value but not applied and "Use default" button is not visible.

caybro commented 3 weeks ago

Another finding; this should not be marked as valid:

image

caybro commented 3 weeks ago

One more in SwapModal (after typing a custom value) and selecting "Use default" -> nothing is visually selected although the internal value is correct: image

caybro commented 3 weeks ago

Reset after typing the default value (0.5) manually: image

caybro commented 3 weeks ago

These won't be implemented simply because the internal validator doesn't let you enter values with more than 2 decimals or letters