feat(components): forms.textarea no-op primitive + migrate 10 plain textareas#3562
Merged
Conversation
Third primitive after button (#3531) and text-input (#3558). A no-op textarea component plus migration of the 10 plain <textarea> tags to it. Component body is <textarea {{ $attributes }}>{{ $slot }}</textarea> — attributes pass through and the field value is the slot (inner content), preserved exactly (textareas are whitespace-sensitive). No variant arm: plain textareas carry no distinct style class. DEFERRED (left RAW) — the 19 Tiptap rich-text editor textareas. JS upgrades exactly textarea.tiptapSimple / textarea.tiptapComplex (app/.../core/tiptap/index.js) plus the Wiki .wiki-editor-textarea; routing those through the component would break the editors. Migrated 10 plain textareas across 6 files (Help projectDefinitionStep x3, Ideas/Wiki newMilestone, Timesheets add/edit + Tickets timesheet description, Widgets myToDos x2). Verified: full diff is pure <textarea> <-> <x-global::forms.textarea> tag swaps (14 ins / 14 del symmetric), view:cache + Pint clean, static audit = 0 plain missed, 19 editors deferred. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
7a9f163 to
8b4db31
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Introduces a new no-op Blade component primitive, forms.textarea, and migrates a small set of existing plain <textarea> usages to the component while explicitly deferring JS-coupled rich-text editor textareas.
Changes:
- Added
app/Views/Templates/components/forms/textarea.blade.phpas a passthrough textarea component (<textarea {{ $attributes }}>{{ $slot }}</textarea>). - Migrated 10 plain
<textarea>tags across several templates to<x-global::forms.textarea>. - Updated
COMPONENTS.mdtracker/status and documented the textarea migration + deferral rules.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| app/Views/Templates/components/forms/textarea.blade.php | Adds new no-op textarea component and documentation. |
| app/Views/Templates/components/COMPONENTS.md | Updates component tracker status/notes for text-input and textarea. |
| app/Domain/Wiki/Templates/articleDialog.blade.php | Migrates newMilestone textarea to component. |
| app/Domain/Ideas/Templates/ideaDialog.blade.php | Migrates newMilestone textarea to component. |
| app/Domain/Widgets/Templates/partials/myToDos.blade.php | Migrates hidden description textareas to component. |
| app/Domain/Timesheets/Templates/addTime.blade.php | Migrates description textarea to component. |
| app/Domain/Timesheets/Templates/editTime.blade.php | Migrates description textarea to component. |
| app/Domain/Tickets/Templates/submodules/timesheet.blade.php | Migrates description textarea to component. |
| app/Domain/Help/Templates/projectDefinitionStep.blade.php | Migrates onboarding prompt textareas to component. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+24
to
+26
| Renders a plain <textarea> with the SAME attributes the app uses today; every attribute | ||
| (name, id, rows, cols, placeholder, style, class, data-*, hx-*, required, …) passes through | ||
| via $attributes, and the field's value is the slot (inner content), preserved EXACTLY. |
Collaborator
Author
…ot review) Declared @props (state/contentRole/scale/labelText/…) are extracted by Blade and not emitted as HTML; only non-prop attributes pass through $attributes. Docblock-only. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Third componentization primitive after
forms.button(#3531) andforms.text-input(#3558):a no-op
forms.textareacomponent plus migration of the 10 plain<textarea>tags to it.No-op = zero visual/behaviour change. The component is:
Attributes pass through; the field's value is the slot (inner content), preserved exactly —
textareas are whitespace-sensitive, so every migration keeps the slot tight.
Deferred (left RAW) — the Tiptap editors⚠️
Per the do-not-touch rule (same as datepickers for text-input), the 19 rich-text editor textareas
are NOT migrated. JS upgrades exactly
textarea.tiptapSimple/textarea.tiptapComplex(
public/assets/js/app/core/tiptap/index.js) plus the Wiki.wiki-editor-textarea— routing thosethrough a component would break the editors. The component's docblock documents this.
Migrated (10 plain textareas / 6 files)
Help/projectDefinitionStep×3 (onboarding prompts)Ideas/ideaDialog+Wiki/articleDialog—newMilestoneTimesheets/addTime+Timesheets/editTime+Tickets/.../timesheet— descriptionWidgets/.../myToDos×2 —description-input(no JS coupling — verified)No
variantarm: plain textareas carry no distinct style class (the only textarea classes areeditor-coupled and deferred).
Verification
<textarea>↔<x-global::forms.textarea>tag swaps — every changed lineonly renames the element; all attributes + inner content preserved verbatim (14 ins / 14 del, symmetric).
view:cache(compile gate) + Pint clean.Next
forms.select(native), then theforms.field-rowwrapper.🤖 Generated with Claude Code