feat(pie-textarea): DSW-3891 Add rows prop#2962
Conversation
🦋 Changeset detectedLatest commit: 4f5f81d The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
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 |
|
/test-aperture |
|
Starting a new snapshot build. You can view the logs here. |
afb58e6 to
0da0c6e
Compare
|
@KatarinaNeskovic Your snapshots have been published to npm! Test the snapshots by updating your Note If you have more than one of these packages installed, we suggest using the new snapshots for all of them to help avoid version conflicts. yarn up @justeattakeaway/pie-textarea@0.0.0-snapshot-release-20260623160452 --mode=update-lockfileyarn up @justeattakeaway/pie-webc@0.0.0-snapshot-release-20260623160452 --mode=update-lockfileThen finally: yarn install |
|
🚀 Aperture PR updated: justeattakeaway/pie-aperture#507 App deployments will appear under the Deployments section of this PR shortly! Updated 26 Jun 2026, 15:31 UTC · PIE @ |
|
/test-aperture |
|
Starting a new snapshot build. You can view the logs here. |
|
@KatarinaNeskovic Your snapshots have been published to npm! Test the snapshots by updating your Note If you have more than one of these packages installed, we suggest using the new snapshots for all of them to help avoid version conflicts. yarn up @justeattakeaway/pie-textarea@0.0.0-snapshot-release-20260626152859 --mode=update-lockfileyarn up @justeattakeaway/pie-webc@0.0.0-snapshot-release-20260626152859 --mode=update-lockfileThen finally: yarn install |
There was a problem hiding this comment.
Pull request overview
Adds a rows prop to pie-textarea so consumers can control the initial visible height (via the native <textarea rows> attribute), and updates supporting styles/docs/stories/tests within the PIE design system monorepo.
Changes:
- Added
rowstoTextareaPropsand wired it through to the internal<textarea>rendering. - Updated resize/height handling (including manual-mode CSS variable changes) and Storybook controls/docs to expose
rows. - Added Playwright component tests for the
rowsattribute and a changeset for a minor release.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/components/pie-textarea/src/index.ts | Adds rows reactive prop, passes it to <textarea>, and adjusts updated() resize logic. |
| packages/components/pie-textarea/src/defs.ts | Extends public props/types to include rows and updates inline docs. |
| packages/components/pie-textarea/src/textarea.scss | Adjusts manual resize mode height variable (--textarea-height) to support rows-driven sizing. |
| packages/components/pie-textarea/test/component/pie-textarea.spec.ts | Adds component tests asserting the rows attribute is set. |
| packages/components/pie-textarea/README.md | Documents the new rows prop in the public README property table. |
| apps/pie-storybook/stories/pie-textarea.stories.ts | Exposes rows in Storybook controls and template wiring. |
| apps/pie-storybook/stories/testing/pie-textarea.test.stories.ts | Adds rows control to testing stories and wires it into the template. |
| .changeset/blue-moments-matter.md | Declares a minor release for @justeattakeaway/pie-textarea due to the new prop. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if (this.resize === 'manual' && ((changedProperties.has('rows') || changedProperties.has('size')))) { | ||
| this._textarea.style.height = ''; | ||
| } |
| * The number of visible rows in the textarea. Defaults to 2 when resize is auto, with a maximum of 6 rows. | ||
| * Can be set to 1 when resize is manual, which has no maximum height on pointer devices but is capped at 6 rows on touch devices. | ||
| */ |
| | `readonly` | `true`, `false` | When true, the user cannot edit the textarea. Not the same as disabled. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly). | `false` | | ||
| | `required` | `true`, `false` | If true, textarea must have a value for valid form submission. Does not block form submission by itself. | `false` | | ||
| | `resize` | `"auto"`, `"manual"` | Controls resizing behavior. `auto` resizes vertically as needed; `manual` allows user resizing but no auto resizing. | `"auto"` | | ||
| | `rows` | `number` | The number of visible text rows. Defaults to 2 when `resize` is `auto`, with a maximum of 6 rows. Can be set to 1 when `resize` is `manual`, which has no maximum height on pointer devices but is capped at 6 rows on touch devices. | `undefined` | |
| rows: { | ||
| description: 'The number of visible rows in the textarea. Defaults to 2 when `resize` is `auto`, with a maximum of 6 rows. Can be set to 1 when `resize` is `manual`, which has no maximum height on pointer devices but is capped at 6 rows on touch devices.', | ||
| control: 'number', | ||
| defaultValue: { | ||
| summary: '2', | ||
| }, | ||
| }, |
| if (this.resize === 'auto' && ((changedProperties.has('resize') || changedProperties.has('size')) || changedProperties.has('rows'))) { | ||
| this.handleResize(); | ||
| } | ||
|
|
||
| if (this.resize === 'manual' && ((changedProperties.has('rows') || changedProperties.has('size')))) { |
|
Adds a
rowsprop topie-textareato set the number of rows (defaults to 2 in auto mode). Prop was tested locally in Aperture across all 4 apps. Existing draft Aperture PR wasn't updated with the prop change to avoid pushing changes for each prop test.Logic changes in
updated():rowsto theauto-mode condition so changingrowsalso applies the correct height.manual-mode condition that resets the inline height (set by auto-resize), so switchingauto→manualdoesn't keep a stale height.Author Checklist (complete before requesting a review, do not delete any)
PIE Storybook/PIE DocsPR preview./test-aperturecommand.Reviewer checklists (complete before approving)
Mark items as
[-] N/Aif not applicable.Reviewer 1
PIE Storybook/PIE DocsPR preview.Reviewer 2
PIE Storybook/PIE DocsPR preview.