RocketCommunicationsInc / astro

Astro UXDS is a collection of guidelines, patterns and components for designing space-based user interface applications.
https://astrouxds.com
Other
108 stars 25 forks source link

fix(textarea) move height to :host #1160

Closed kiley-mitti closed 1 year ago

kiley-mitti commented 1 year ago

Brief Description

~Testing moving height to host.~ Adjusted this fix to set height on textarea to min-height so that rows="X" will work again.

JIRA Link

ASTRO-5903

Related Issue

General Notes

Motivation and Context

Width can be set on rux-textarea but height can't. Decided to fix this by fixing the rows prop. it wasn't properly working because height was set on textarea instead of min-height.

Issues and Limitations

So the problem with setting height this way is that there is more than one element in rux-textarea to contend with. Label sits on top and help/error sits on bottom. It's not a problem if you don't want the textarea to be resizable but if you DO then the height doesn't act as you would expect. setting min-height would.. but is that the less confusing option?

Carbon uses rows to set height. if you set height to their web component it does the same as ours currently does. Shoelace works like carbons and ours Calcite wraps text area with anything that needs to go outside the textarea space, skirting the issue.

So instead of making height settable on rux-textarea I adjusted this and fixes a bug with rows instead

Types of changes

Checklist

changeset-bot[bot] commented 1 year ago

🦋 Changeset detected

Latest commit: 1d7e08abb74bcb623530195826b693fbe03c0751

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

netlify[bot] commented 1 year ago

Deploy Preview for astro-stencil canceled.

Name Link
Latest commit 1d7e08abb74bcb623530195826b693fbe03c0751
Latest deploy log https://app.netlify.com/sites/astro-stencil/deploys/64834db331d36e00084166a4
netlify[bot] commented 1 year ago

Deploy Preview for astro-preview canceled.

Name Link
Latest commit 1d7e08abb74bcb623530195826b693fbe03c0751
Latest deploy log https://app.netlify.com/sites/astro-preview/deploys/64834db3fb0e9f0007f4b19d