safe-react icon indicating copy to clipboard operation
safe-react copied to clipboard

Error messages placement for new inputs

Open francovenica opened this issue 2 years ago • 2 comments

Problem

tl;dr: UI jumps when an error message appears under an input

New outlined inputs were implemented across the entire site in all forms. The problem is that these new inputs have the error message (when a wrong value is entered) showing outside of the input, making the form wiggle up and down as the error shows/disappears:

03-02-2022_x(4430)

Solution

As per @liliiaorlenko, we need to reserve some whitespace below each input to accommodate for potential error messages w/o making the form jump.

francovenica avatar Mar 03 '22 19:03 francovenica

UX-wise, by replacing the label with the error message, we remove the 'meaning'.

We could add a margin below the field so that it doesn't 'jump' when the error (dis-)appears. What do you think? cc @liliiaorlenko

iamacook avatar Mar 04 '22 08:03 iamacook

UX-wise, by replacing the label with the error message, we remove the 'meaning'.

We could add a margin below the field so that it doesn't 'jump' when the error (dis-)appears. What do you think? cc @liliiaorlenko

If its possible to apply margin in all of the cases like this, then I would keep the error state with message on a bottom. @iamacook you right, if we will put message on top it will lose the meaning. Also each field must have a default margin on a bottom to prevent cases like this. It will give an extra space for the text in any situations. We do that in a design as well. Pls check this option!

liliiaorlenko avatar Mar 04 '22 09:03 liliiaorlenko

Fixed in web-core.

katspaugh avatar Sep 28 '22 08:09 katspaugh