Skip to content

Conversation

@mukunku
Copy link
Collaborator

@mukunku mukunku commented Nov 26, 2025

Summary

This PR makes some small tweaks to update the textarea component to match the new designs. It builds on the new input designs in #2070 so this should be merged after that one.

Additionally, this PR exposes a new TextArea Svelte component. This is a clone of the TextInput component minus the Input component specific bits.

Breaking changes

Following sizes have been removed:

  • s-textarea__md
  • s-textarea__xl

How to Test

@changeset-bot
Copy link

changeset-bot bot commented Nov 26, 2025

🦋 Changeset detected

Latest commit: f49e103

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

@mukunku mukunku changed the base branch from sal/SPARK-68 to beta November 26, 2025 21:19
@mukunku mukunku changed the base branch from beta to sal/SPARK-68 November 26, 2025 21:34
@mukunku mukunku marked this pull request as ready for review December 1, 2025 15:00
Copy link
Contributor

@dancormier dancormier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made a handful of suggestions but nothing too significant. Overall, we're looking good. Once my comments are addressed* and "new": true is added for textarea in navigation.json, this should be good to go.

@mukunku Thanks for the nice work and for that :has(> .s-textarea) trick I look forward to stealing at a later date 🙂


* one comment could use some design input. I'm fine with it being handled in a follow up if design needs a moment to address.

Comment on lines 131 to 138
--_in-min-h: calc(var(--su32) + var(--su4)); // 36px

&&__sm {
--_in-min-h: calc(var(--su32) - var(--su4)); // 28px
}

&&__lg {
--_in-min-h: calc(var(--su48) - var(--su4)); // 44px
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow up from previous comment

These values will need to be updated to match the Figma values.

  • sm: 55px
  • default: 69px
  • lg: 96px
Screenshots

sm

Image

Default

Image

lg

Image
Suggested change
--_in-min-h: calc(var(--su32) + var(--su4)); // 36px
&&__sm {
--_in-min-h: calc(var(--su32) - var(--su4)); // 28px
}
&&__lg {
--_in-min-h: calc(var(--su48) - var(--su4)); // 44px
--_in-min-h: calc(var(--su64) - var(--su4) + var(--su1)); // 69px
&&__sm {
--_in-min-h: calc(var(--su48) + var(--su6) + var(--su1)); // 55px
}
&&__lg {
--_in-min-h: var(--su96);
}

@CGuindon @mukunku I think we should consider some different values here. It seems like the target is moreso getting three lines of text within the textarea without introducing a scrollbar. If that's correct, here are values that might achieve what we're looking for:

  • sm: 58px
  • default: 72px
  • lg: 104px
Image

Note

I have not tested this outside of my Mac, so these values might need to be tweaked for the same scroll-less three-liner textareas on other OSes.

Copy link
Collaborator Author

@mukunku mukunku Dec 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My intention was to make the min-height as tall as a single line just so the user can't make the input very small and mess up the icon (since textarea is user resizable):
{0760059E-DB63-4CF3-9F37-BDD8D87067C0}

Do we really want to restrict developers/users from setting a smaller height than minimum 3 lines? Maybe they'd want the input to start small and expand as needed?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really want to restrict developers/users from setting a smaller height than minimum 3 lines? Maybe they'd want the input to start small and expand as needed?

I think we want to make the right/consistent thing the easy thing while providing escape hatches that create a little friction but still allow for flexibility. Since the design shows these sizes, I'd expect to make these sizes the easy thing. A developer still could set whatever height/max-height they'd need by overriding the max-height by adding a .hmx-* class. They'd have to hop into the inspector to understand that there's a max-height set, but it's doable. Most of our atomic classes include !important, so they'll always take precedence over the component styles.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Considering this a bit more, I think it could make sense to set the min-height the way you did @mukunku and then setting a height for each size of textarea.

This way, a user could only resize it down to a single line and not beyond while having the initial size reflect the designs in the Figma. Everything could still be overridden by a dev but the defaults would be sensible and consistent. Does this seem reasonable @mukunku?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a great compromise and I think would work great! Made the change now: f49e103

I went with the following sizes which are almost the same as the Figma's:

  • sm: 54px
  • default: 70px
  • lg: 96px

Here's how it looks on my PC:
{E8DC742E-B64C-42FA-AB39-46FD2AB308E9}

I can adjust to your recommendation as well if we think that's better. Let me know what you think @dancormier 🙏🏾

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going to merge as-is but happy to change as a follow-up 👍🏾

Base automatically changed from sal/SPARK-68 to beta December 2, 2025 15:14
@mukunku mukunku requested a review from dancormier December 2, 2025 15:55
@mukunku mukunku removed the do-not-merge Pull requests that are in progress and should not be merged yet label Dec 2, 2025
Copy link
Contributor

@dancormier dancormier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is in a good place IMO. I've responded to your comments @mukunku and a couple things might need very minor tweaking but nothing that needs to hold up this PR. I'm happy to leave any further changes up to your discretion.

Nice work here ❤️

@mukunku mukunku merged commit 78d6a22 into beta Dec 3, 2025
18 checks passed
@mukunku mukunku deleted the sal/SPARK-81 branch December 3, 2025 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants