-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bridge back to stellar - max amount chosen by the user allow for the amount that is incompatible #506
Conversation
✅ Deploy Preview for rococo-souffle-a625f5 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
…-by-the-user-allow-for-the-amount-that-is-incompatible
I noticed another bug:
|
@ebma Excellent catch, I am working on it ✅ |
@vadaynujra can you please test once done? |
…dd important test cases for NumericInput
@ebma I refactored the whole implementation of
Please take a look and let me know if everything is right. |
I was testing again on the same deployment link @Sharqiewicz and while manual input is correct the error with the cursor jumping to the last digit is still there and additionally when clicking on max there is the infinit number as in the attachement |
@annatekl The photo isn't loading. The cursor jumps to the end of the number only if the number already has a maximum decimal and the user overwrites a new number in decimal part (without using backspace first) - otherwise the cursor doesn't jump around. What is the expected behaviour here? Now it works like this:
As the user tries to exceed the maximum number of decimal places, the decimal part of the number (starting from the changed second position) is moved by one. Therefore, the cursor has moved to the end, because the entire decimal part is changed If user uses the backspace case:
|
Based on the explanation, I could imagine this to be the expected behavior. @ebma do you expect the cursor to stay at the same place also in the first case? |
I think the input field works great now. @annatekl shared a screenshot where the input was filled with @Sharqiewicz can we maybe have a test that simulates the behaviour of MAX when a user has a balance of |
…-by-the-user-allow-for-the-amount-that-is-incompatible
…om (NumericInput 50percent MAX buttons click)
@ebma I fixed the issue with exponential notation and implemented test cases for it ✅ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works like a charm 👍 I think it's all good now and we can merge.
My only concern is that the NumericInput
component is nested quite deeply in the components/Form/From
although it's also used in other places ie. Nabla. I think we should move this component out of these folders and put it more on the top level as it's a more general component.
I absolutely agree. I will do it |
Screen.Recording.2024-07-31.at.12.38.31.PM.mov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- the cursor jumping error seems to be still there
- also if i change the input to zero and then change to non-zero the error does not go away
- max works as expected
@prayagd I implemented the error validation when clicking on 50% and MAX, very good catch ✅ |
You see in the video, when i am changing the first decimal instead of moving to the second decimal it jumps directly to the last decimal, personally find that a bit off but what do you guys think? @Sharqiewicz @ebma |
@prayagd we already discussed it here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops sorry missed it, we can go ahead and merge then. lesgo
What:
Context
When choosing 'Back to Stellar' and entering 'Max,' the amount prefilled by the system is half the available funds and correct, but the error message after the transaction is signed indicates that the amount is incompatible.
How:
✅ Implement maxDecimal to be also applied for StandardFrom AvailableActions