-
Notifications
You must be signed in to change notification settings - Fork 46
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
Handle invalid values in stdcm inputs #9374
Comments
When an invalid value is entered in the consist card, the whole column gets larger to accommodate the display of the field error state. This pushes the operational points column to the right, and reduces the map's width ; all margins stay the same. |
@maelysLeratRosso Do we have a defined maximum speed limit, similar to the constraints for mass and length? Could you also provide more details about the rules for "the value computed depending on traction engine, towed rs, and composition code" ? I believe the towed rolling stock does not have a maximum speed. |
see #9712 |
We reopen this issue because of :
|
Sorry about that @maelysLeratRosso , there has been a terrible misunderstanding. A few weeks ago, as @Wadjetz tried to implement the issue with the initial AC like this one, it looked really hard to integrate in the app. We totally not integrated you in these discussions, which is really bad, I'm sorry 😕 |
ooooooooh ok no problem ! Then I reopen it only for this problem : |
Should be fixed in #10313 |
Previous bug is now solved, but there is now another one which prevents this issue from being closed : |
Should be fixed with #10413 |
The validity check should be performed on focus out, not while the user is typing. Being presented an error message because you haven't finished entering the value you want to add is not a great experience. When it happens multiple times a day, it's rough. |
Description and goal
Now that we have some inputs with number in stdcm, we need to handle some edge cases.
To be confirmed by @thibautsailly, but we probably want to handle this with the
statusWithMessage
prop in inputs and blocking the simulation button while in error like in the rest of the form.If we do that, it will need a refacto of the css of the stdcm consist part to keep matching the mockup.
Acceptance criteria
🇫🇷 "Le tonnage total doit être compris entre ... et ...t".
🇬🇧 "The total weight must be between ... and ...t"
🇫🇷 "La longueur totale doit être comprise entre ... et 750m"
🇬🇧 "The total length must be between ... and 750m"
🇫🇷 "La vitesse max. doit être comprise entre 30 et ...km/h"
🇬🇧 "The max speed must be between 30 and ...km/h"
When the value becomes valid, all columns widths go back to their default values. All these interactions happen with a transition easeinout 300ms.
The text was updated successfully, but these errors were encountered: