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

Add size variations for inputs #289

Closed
24 tasks done
aagonzales opened this issue Feb 27, 2020 · 9 comments
Closed
24 tasks done

Add size variations for inputs #289

aagonzales opened this issue Feb 27, 2020 · 9 comments

Comments

@aagonzales
Copy link
Member

aagonzales commented Feb 27, 2020

Inputs are receiving sm and xl size variations that need to be added to the kit.
Is there a way to adjust the height of the input field without creating a new symbol set?


Dropdown/Combobox/Multi-select: (in code) @laurenmrice DONE 🤩

  • White theme
  • Gray 10 theme
  • Gray 90 theme
  • Gray 100 theme

Date picker: (in code) @aagonzales DONE!

  • White theme
  • Gray 10 theme
  • Gray 90 theme
  • Gray 100 theme

Note: Time picker doesn't have size variant in code so it was not included.


Text input: (in code) @aagonzales DONE!

  • White theme
  • Gray 10 theme
  • Gray 90 theme
  • Gray 100 theme

Select: (in code) @aagonzales DONE!

  • White theme
  • Gray 10 theme
  • Gray 90 theme
  • Gray 100 theme

Number input: (in code) @laurenmrice DONE!

  • White theme
  • Gray 10 theme
  • Gray 90 theme
  • Gray 100 theme

Note: also adding helper text and no label versions.


File uploader: (in code) @laurenmrice

  • White theme
  • Gray 10 theme
  • Gray 90 theme
  • Gray 100 theme
@laurenmrice
Copy link
Member

I sent sketch a support question if this is possible. I only have gotten it to work for inputs without labels.

@stale
Copy link

stale bot commented Apr 11, 2020

We've marked this issue as stale because there hasn't been any activity for a couple of weeks. If there's no further activity on this issue in the next three days then we'll close it. You can keep the conversation going with just a short comment. Thanks for your contributions.

@mariuszmickiewicz
Copy link
Collaborator

mariuszmickiewicz commented May 20, 2020

There is a way to adjust the height of a text field symbol without creating a new one, even with a label. I don't know why my GIFs are so slow :)

2020-05-20-input-size

This will however put the responsibility to resize to the correct height on designers. Changing input itself from 40 to 32 or 48 is easy, but when label (or more elements like error, info — I would need to check if Sketch can handle that) is present, now some calculations are required and this will lead to guess work, mistakes in designs etc.

Technically it is possible to have one symbol in Sketch for input field in all its states (hover, disabled, placeholder, focus), but I think the power of Carbon kit lies exactly in having all of the separate states with simple symbol switch, rather than tweaking sub-symbols and overrides. That's why I would suggest to create separate groups for other sizes. I can help with that.

@laurenmrice
Copy link
Member

laurenmrice commented May 20, 2020

Did your approach work for the error state? That is what ended up blocking me from this in the end.

You make good points, I think it would be safer to just have separate sizes.

@mariuszmickiewicz
Copy link
Collaborator

If a label, helper text and error don't need to be multi-line (no smart layout involved) then one symbol for all sizes approach seems to be working. It doesn't even needs that much of a cognitive load, just remember the sizes, add/remove 8px.

Still, predefined sizes approach for me sounds better, even if it requires a lot of maintenance, but I leave the decision to you.

image

@stale
Copy link

stale bot commented Jun 19, 2020

We've marked this issue as stale because there hasn't been any activity for a couple of weeks. If there's no further activity on this issue in the next three days then we'll close it. You can keep the conversation going with just a short comment. Thanks for your contributions.

@stale stale bot added the inactive label Jun 19, 2020
@stale
Copy link

stale bot commented Aug 1, 2020

We've marked this issue as stale because there hasn't been any activity for a couple of weeks. If there's no further activity on this issue in the next three days then we'll close it. You can keep the conversation going with just a short comment. Thanks for your contributions.

@laurenmrice
Copy link
Member

laurenmrice commented Aug 11, 2020

Symbol structure

Lets go with this base naming structure for components that need a size selection.
Artboard


Pieces

We can keep a top level section for pieces that don't need options for sizes. But for components that do have pieces that have different sizes, we can add a nested pieces section.

Ex:
Artboard Copy


Size naming

Lets go with this for now. Once we audit our sizes for components we can easily adjust the naming for these.

Artboard Copy 2

@laurenmrice
Copy link
Member

Added! Will be in next kit update 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants