Skip to content
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

Height on form components (mobile and desktop) #16

Open
2 of 3 tasks
ulde01 opened this issue Jan 17, 2019 · 7 comments
Open
2 of 3 tasks

Height on form components (mobile and desktop) #16

ulde01 opened this issue Jan 17, 2019 · 7 comments
Labels
developing Component is being developed reviewed/answered DMT reviewed or answered

Comments

@ulde01
Copy link
Contributor

ulde01 commented Jan 17, 2019

Q: Increase the height of input fields and medium buttons to 44 px. First, explore contexts. Are there any consequences?

A: Design change 2019-01-30

  • Form components (Input Field, Drop Down, Medium Button, Segmented Control and Stepper) all have the same height: 44 px
  • This applies to both desktop and mobile

The reasoning for this is that when labels got bigger, the form components follow in size to harmonise and match. Also, the mobile click area needed to be bigger so we want them to be the same size, to simplify and have fewer options (=easier to do it right).

See:

@ulde01 ulde01 added the discussion Open for discussion label Jan 17, 2019
@ulde01 ulde01 added this to Discussion in Design discussions Jan 17, 2019
@hjalmers
Copy link
Contributor

Personally I think it makes sense to support different sizes but I'm against making the smallest size 44px but perhaps normal/default could be increased.

Currently in bootstrap we use the following:

small 31px
normal (default) 40px
large 48px

This applies to input fields, dropdowns, buttons and everything you can use in a form and all components that use these components internally like the datepicker which uses buttons internally, tables etc.

Why not use even numbers?
Well when I and Panos fiddled around with it a bit we found that the most important thing was the padding in relation to font size and it's not always as easy as specifying a fixed height. Padding + font sizes gives a certain height and it ensures that buttons can wrap (i.e. be more than one row tall).

@ghost
Copy link

ghost commented Jan 21, 2019

@hjalmers The 44 px is only for the medium (default) button. The small (that in Design Library is 32 px not 31) and the large button will be as is. For desktop. For tablet and mobile only the medium (default) one should be used. The clickable area on mobile should always be at least 44 px right?

@ulde01
Copy link
Contributor Author

ulde01 commented Jan 30, 2019

Status update 2019-01-30

This issue was reviewed today in Design Working Group. We decided the following change:

  • Form components (input field, drop down, medium buttons) for both desktop and mobile all have the same height: 44 px

The reasoning for this change is that when labels got bigger, the form components follow in size to harmonise and match. Also, the mobile click area needed to be bigger so we want them to be the same size to simplify and have fewer options (and easier to do it right).

I will create new issues for this matter and add it to our developers repos.

/Ulrika, Design Management

@ulde01 ulde01 added the reviewed/answered DMT reviewed or answered label Jan 30, 2019
@ulde01 ulde01 moved this from Discussion (active) to Development (see sebgroup's board) in Design discussions Jan 30, 2019
@ulde01 ulde01 added developing Component is being developed reviewed/answered DMT reviewed or answered and removed discussion Open for discussion reviewed/answered DMT reviewed or answered labels Jan 31, 2019
@ulde01
Copy link
Contributor Author

ulde01 commented Jan 31, 2019

@ulde01 ulde01 changed the title Height on buttons and input fields (mobile and desktop) Height on form components (mobile and desktop) Feb 18, 2019
@ulde01 ulde01 moved this from Under development to Done in Design discussions Aug 27, 2019
@ulde01 ulde01 moved this from Done to React! in Design discussions Aug 27, 2019
@yousifalraheem
Copy link

Hi, I just wanted to follow up on this since Check boxes and radio buttons are not included in this sizing standard. There are a lot of times when we put a checkbox side by side with an input field to be enabled based on the state of the checkbox. Since the design library guidelines states that the checkbox height is 40px and the input height is 44px there will always be a misalignment between the two form elements. Of course the fix is to pass a custom class that would fix it, but I was wondering if this is something that you guys have considered.
image

The expected behavior should be aligned like this (both 44px):
image

(check box 40px, input 44px)
image

But since there is a difference between the heights of the two form elements, not only they look weird but when it's toggled in there will be a little bit of a jump (4px) after the input field appears.

Same behavior would also happen with Radio buttons

@conandx
Copy link

conandx commented Sep 25, 2019

Yes @yousifalraheem You are correct. When we did the update of input fields we agreed that we need to updated the related form-components also.... but we never had the time!
We'll bump the issue and try do do this as soon as possible! - BRB! :)

@ulde01 ulde01 moved this from React! to Discussion (active) in Design discussions Sep 30, 2019
@ulde01
Copy link
Contributor Author

ulde01 commented Oct 1, 2019

We ran out of time last round but now we are back. Thank you @yousifalraheem - keep giving us feedback!

Recap: The following form components were all made 44px high previously:

  • Input Field, Drop Down, Medium Button, Segmented Control and Stepper

Now we also want to add these components to the 44 px height list:

  • Check boxes
  • Radio buttons
  • Stepper: design description is updated
  • Segmented control: design description is updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developing Component is being developed reviewed/answered DMT reviewed or answered
Projects
None yet
Development

No branches or pull requests

4 participants