Skip to content

Conversation

@GoldGroove06
Copy link
Collaborator

@GoldGroove06 GoldGroove06 commented Dec 31, 2025

fixes #1666

Summary by CodeRabbit

  • Tests

    • TextArea test updated to pass and assert an explicit placeholder value.
  • Style

    • Standardized formatting and punctuation across form components and stories.
    • Refactored textarea styles with nested selectors and consolidated disabled/read-only and placeholder styling.

✏️ Tip: You can customize this high-level summary in your review settings.

@changeset-bot
Copy link

changeset-bot bot commented Dec 31, 2025

⚠️ No Changeset found

Latest commit: cb16b08

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 31, 2025

📝 Walkthrough

Walkthrough

Test updated to pass an explicit placeholder to TextArea and assert it; minor whitespace/formatting and punctuation edits across TextArea fragments, stories, and Combobox files; textarea SCSS selectors were nested and disabled/read-only rules consolidated without property changes.

Changes

Cohort / File(s) Summary
Test update
src/components/ui/TextArea/TextArea.test.tsx
Updated "is accessible via placeholder" test to pass placeholder="enter text" and assert that explicit placeholder.
Textarea styles
styles/themes/components/textarea.scss
Refactored selector structure to nested rules and consolidated disabled/read-only, placeholder, focus, and scrollbar styles — no property value changes.
Formatting & punctuation
src/components/ui/TextArea/fragments/TextAreaRoot.tsx, src/components/ui/TextArea/stories/TextArea.stories.tsx, src/components/ui/Combobox/Combobox.tsx, src/components/ui/Combobox/stories/Combobox.stories.tsx
Whitespace and formatting adjustments, removed extra blank lines, added trailing semicolons in Combobox public assignment; no behavioral changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

automerge

Suggested reviewers

  • kotAPI

Poem

🐰 I nudged a placeholder into place with care,
Semicolons neat, whitespace trimmed with flair.
Styles nested snug, disabled hues kept true,
Tests now speak "enter text" — a clearer view.
Hop, review, and merge — a tiny patch anew.

Pre-merge checks

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fixed textarea issues and lint' directly addresses the main changes in the PR: textarea test fixes, formatting/lint adjustments across multiple files, and SCSS restructuring.
Linked Issues check ✅ Passed The PR addresses issue #1666 by fixing textarea test cases, formatting issues, and restructuring SCSS to resolve failing tests and lint problems.
Out of Scope Changes check ✅ Passed All changes are directly related to textarea fixes: test updates, code formatting/linting, and SCSS refactoring. No unrelated modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/components/ui/Combobox/Combobox.tsx (1)

27-27: Add missing semicolon for consistency.

Line 27 is missing a semicolon, which is inconsistent with the other property declarations in the interface (lines 20-26 all have semicolons). Since this PR addresses linting issues, this should be fixed.

🔧 Proposed fix
-    Search: typeof ComboboxSearch
+    Search: typeof ComboboxSearch;
🧹 Nitpick comments (1)
styles/themes/components/textarea.scss (1)

32-35: Consider using a more muted placeholder color for disabled/read-only states.

The placeholder color for disabled and read-only states matches the normal state (both use accent-500). Typically, disabled states benefit from more muted colors to provide clearer visual distinction.

💡 Suggested color adjustment
 .rad-ui-text-area textarea:disabled::placeholder,
 .rad-ui-text-area textarea:read-only::placeholder {
-  color: var(--rad-ui-color-accent-500);
+  color: var(--rad-ui-color-accent-400);
 }
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f5825c2 and 1a60708.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • src/components/ui/Combobox/Combobox.tsx
  • src/components/ui/Combobox/stories/Combobox.stories.tsx
  • styles/themes/components/textarea.scss
💤 Files with no reviewable changes (1)
  • src/components/ui/Combobox/stories/Combobox.stories.tsx
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: decipher-cs
Repo: rad-ui/ui PR: 417
File: src/components/ui/Dropdown/Dropdown.stories.tsx:43-50
Timestamp: 2024-12-12T08:34:33.079Z
Learning: Ensure to verify existing ARIA attributes in components before suggesting additions during code reviews, especially in the `Dropdown.Trigger` component in `src/components/ui/Dropdown/Dropdown.stories.tsx`.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: coverage
  • GitHub Check: Jest (1/2)
  • GitHub Check: Jest (2/2)
🔇 Additional comments (2)
styles/themes/components/textarea.scss (1)

25-30: LGTM! Disabled and read-only styles are well-defined.

The explicit styling for disabled and read-only states provides clear visual feedback with appropriate color changes and cursor behavior.

src/components/ui/Combobox/Combobox.tsx (1)

39-39: Good addition of semicolon for consistency.

This change aligns with the other property assignments (lines 32-38) and improves code style consistency.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
styles/themes/components/textarea.scss (2)

25-34: Consider different cursor for read-only state.

The cursor: not-allowed on line 29 applies to both :disabled and :read-only states. Read-only fields are typically still selectable and copyable, so a text or default cursor might better communicate "viewable but not editable" rather than "blocked."

🔎 Optional refinement
-    &:disabled,
-    &:read-only {
+    &:disabled {
       background-color: var(--rad-ui-color-accent-200);
       color: var(--rad-ui-color-accent-600);
       cursor: not-allowed;
 
       &::placeholder {
         color: var(--rad-ui-color-accent-500);
       }
     }
+
+    &:read-only {
+      background-color: var(--rad-ui-color-accent-200);
+      color: var(--rad-ui-color-accent-600);
+      cursor: text;
+
+      &::placeholder {
+        color: var(--rad-ui-color-accent-500);
+      }
+    }

42-59: Note: Scrollbar styling is webkit-only.

The scrollbar customization uses webkit-specific pseudo-elements (::-webkit-scrollbar-*), which won't apply in Firefox or other non-webkit browsers. This is likely intentional progressive enhancement, but if cross-browser scrollbar styling is needed, consider adding Firefox support using scrollbar-color and scrollbar-width.

🔎 Optional cross-browser enhancement

Add Firefox scrollbar support within the textarea block:

    /* Firefox scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: var(--rad-ui-color-accent-400) transparent;
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1a60708 and cb16b08.

📒 Files selected for processing (1)
  • styles/themes/components/textarea.scss
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: decipher-cs
Repo: rad-ui/ui PR: 417
File: src/components/ui/Dropdown/Dropdown.stories.tsx:43-50
Timestamp: 2024-12-12T08:34:33.079Z
Learning: Ensure to verify existing ARIA attributes in components before suggesting additions during code reviews, especially in the `Dropdown.Trigger` component in `src/components/ui/Dropdown/Dropdown.stories.tsx`.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Build
  • GitHub Check: coverage
🔇 Additional comments (1)
styles/themes/components/textarea.scss (1)

1-134: LGTM! Clean SCSS refactoring.

The nested structure improves maintainability while preserving selector specificity and all existing styles. The nesting follows SCSS best practices and the data attribute modifiers are correctly placed.

@github-actions
Copy link
Contributor

Coverage

⚠️ Could not compare with base branch (base branch has failing tests or coverage issues). Showing PR coverage only.

Metric PR
Statements 84.02%
Branches 60.52%
Functions 66.5%
Lines 82.64%

✅ Coverage thresholds met! All tests passing.

Run npm run coverage locally for detailed reports and target untested areas to raise these numbers.

@kotAPI kotAPI merged commit d912402 into main Dec 31, 2025
10 checks passed
@kotAPI kotAPI deleted the text-area-fixes branch December 31, 2025 06:26
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.

Fix Textarea failing tests and coverage workflows

3 participants