Skip to content

Conversation

@Sweet4ever
Copy link

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Dec 16, 2025

⚠️ No Changeset found

Latest commit: fba24ca

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@netlify
Copy link

netlify bot commented Dec 16, 2025

Deploy Preview for scouterna-ui ready!

Name Link
🔨 Latest commit fba24ca
🔍 Latest deploy log https://app.netlify.com/projects/scouterna-ui/deploys/6947281cbd6dfd0008d92985
😎 Deploy Preview https://deploy-preview-80--scouterna-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Member

@scriptcoded scriptcoded left a comment

Choose a reason for hiding this comment

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

Looking very good! Nice job 👏 I've got some very technical comments on how I believe this should connect with the existing Field component. Other than I've just got some small nits and nice-to-haves.

Image

Comment on lines 32 to 47
<div class="flexbox">
<label>
{this.label}
</label>
<textarea
class="textarea"
autofocus={this.autofocus}
disabled={this.disabled}
form={this.form}
maxLength={this.maxLength}
placeholder={this.placeholder}
readOnly={this.readOnly}
required={this.required}
value={this.value}
/>
</div>
Copy link
Member

Choose a reason for hiding this comment

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

Nice that you've added a label as well! We've set up a generic Field component that wraps all input type components. I forgot to tell you about that, sorry 😣 I think we should add support for that here as well and remove the label from this component. In other words:

  1. Remove the div and label so that only the textarea is left.
  2. Implement the following from the Input component (reference code):
    1. Add the scoutInputChange event that tells the form field about changes that should cause re-validation.
    2. Add the scoutBlur event that tells the form field that the field is ready to be validated.
    3. Add the internal _fieldId event that's used by the form field to connect it to the text area.
    4. Add the internal ariaId state that keeps track of the internal ID used for connecting to form field.
    5. Assign the ariaId state in the componentWillLoad hook.
    6. Handle the onInput event and potential validation.
  3. See other comment about shadow DOM.
  4. Finally you might want to add another story in field.stories.tsx to test it out together, like we did for the input.

<label>
{this.label}
</label>
<textarea
Copy link
Member

Choose a reason for hiding this comment

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

Can we also add the name prop? Just realized we're missing that on all inputs. I'll add it to the others in a separate PR 😊

Comment on lines 13 to 14
height: var(--spacing-24);
width: var(--spacing-50);
Copy link
Member

Choose a reason for hiding this comment

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

I think we should keep the width and height unset so that the consumer can choose how to size the component. What we could do instead is expose the rows attribute as a prop and maybe set it to a higher default, say 3?

Comment on lines 6 to 8
shadow: {
delegatesFocus: true,
},
Copy link
Member

Choose a reason for hiding this comment

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

Related to other comment about adding support for the Field component, you'll have to disable the shadow DOM and use scoped styles for it to work:

Suggested change
shadow: {
delegatesFocus: true,
},
scoped: true,

<div>
{this.label}
</div>
<textarea
Copy link
Member

Choose a reason for hiding this comment

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

Can we maybe add the name prop as well? I just realized we don't have it on any of our inputs, so I'll add it to the rest in a separate PR 😊

Comment on lines 13 to 14
height: var(--spacing-24);
width: var(--spacing-50);
Copy link
Member

Choose a reason for hiding this comment

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

I think we should leave out the width and height and let the consumer control this as it will most likely depend on their layout. Maybe instead we can expose the rows attribute as a prop and set the default to something a bit higher, say 3?

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