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

fix(TextArea): Refactor autogrow to remove visual jank #5195

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

dougmacknz
Copy link
Contributor

@dougmacknz dougmacknz commented Oct 22, 2024

Refactor TextArea autogrow feature to remove a pretty horrible visual jank.

In the future we will be able to a new CSS property field-sizing to do this natively, but for now we still need to use black magic. Method taken from: https://chriscoyier.net/2023/09/29/css-solves-auto-expanding-textareas-probably-eventually/

Bonus:

  • Adjusted the focus ring implementation to remove the focus ring element and use outline instead
  • Converted TextArea.module.scss to CSS
  • Remove placeholder styling that isn't needed (tested and it still inherits the font etc, plus we're not supporting placeholders here anymore anyway).

Copy link

changeset-bot bot commented Oct 22, 2024

🦋 Changeset detected

Latest commit: d150600

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

This PR includes changesets to release 1 package
Name Type
@kaizen/components Patch

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

@dougmacknz dougmacknz force-pushed the KZN-2794/text-area-autogrow-refactor branch from a49ab8d to 355e2d0 Compare October 22, 2024 04:55
@dougmacknz dougmacknz force-pushed the KZN-2794/text-area-autogrow-refactor branch from 355e2d0 to edfe2c3 Compare October 22, 2024 04:57
@dougmacknz dougmacknz marked this pull request as ready for review October 22, 2024 05:06
@dougmacknz dougmacknz requested a review from a team as a code owner October 22, 2024 05:06
@dougmacknz
Copy link
Contributor Author

(just running chromatic)

Copy link
Contributor

github-actions bot commented Oct 22, 2024

✨ Here is your branch preview! ✨

Last updated for commit d150600: Linting

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.

1 participant