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

Textarea, Text Input, Number Input, Select - Remove Old Padding #305

Closed
4 tasks done
Tracked by #452
larserbach opened this issue Aug 21, 2023 · 3 comments
Closed
4 tasks done
Tracked by #452

Textarea, Text Input, Number Input, Select - Remove Old Padding #305

larserbach opened this issue Aug 21, 2023 · 3 comments
Assignees
Labels
🎨 design issue Task is for designers ⌨️ dev issue Task is for developers 🎓 junior issue Good for juniors

Comments

@larserbach
Copy link
Contributor

larserbach commented Aug 21, 2023

We initially thought we would need to provide a padding token to prevent text overlapping in input fields.
This issue was reproducible by typing a long text in the input field that has input icon, the text and the icon would overlap.
Screenshot 2023-09-01 at 14 30 44

Initially this was fixed by introducing the following token value:
Screenshot 2023-09-01 at 14 35 08

This didn't fix the issue when we would, for example, have two icons inside the input field. We found a new approach which results in not needing this extra token anymore, by applying styles to the input field wrapper, instead on input field element directly.

Screenshot 2023-09-01 at 14 27 34

We must refactor:

  • Textarea
  • Textinput
  • Number input
  • Select (also Design)
@larserbach
Copy link
Contributor Author

Design is fixed with this PR: #329

@thrbnhrtmnn thrbnhrtmnn changed the title Remove Old Padding Textarea, Text Input, Number Input, Select - Remove Old Padding Sep 19, 2023
@thrbnhrtmnn thrbnhrtmnn added this to the Release 1.0 milestone Sep 29, 2023
@thrbnhrtmnn
Copy link
Contributor

We looked at this issue in todays Merge-/Review-Session.

It seems, that the padding is currently applied differently than in the design. In the design we have padding inside the input. In the code it seems like the textfield has padding applied outside of the text "area".

Difference between design and code is, that in HTML we can not place an icon inside an input. Therefor we had to build a workarround.

It seems like the element that is called "Input field" in Design, should actually be a wrapper in HTML. Inside this wrapper, we have a input field (named "Placeholder" in design) and next to it we have the Icon.

After having a closer look, the tokens are currently applied to the input, but they should be applied to the wrapper. Also the icons should be part of the same wrapper as the input.

@thrbnhrtmnn
Copy link
Contributor

We looked at the component in tuesdays merge/review session. Today it was merged so we moved it to done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎨 design issue Task is for designers ⌨️ dev issue Task is for developers 🎓 junior issue Good for juniors
Projects
None yet
Development

No branches or pull requests

5 participants