Add missing wrapper and properties for the Textarea component

Created on 17 August 2023, almost 2 years ago
Updated 10 September 2023, almost 2 years ago

Problem/Motivation

Textarea component needs a wrapper for textarea
Why
This wrapper is needed from ACE editor js https://git.drupalcode.org/project/ace_editor/-/blob/8.x-1.x/js/editor.js

            var editor_dummy = "<pre id='"+ace_editor_id+"'></pre>";
            $element.closest(".form-textarea-wrapper").append(editor_dummy);

Proposed resolution

1- Use HTML block using layout builder

Having the following:

Properties:

  • resizable: (none|vertical|horizontal|both) An indicator for whether the textarea is resizable.
  • required: (true|false) An indicator for whether the textarea is required.
  • value: The textarea content.
  • rows: Specifies the number of visible text lines.
  • cols: Specifies the visible width in average character widths.
  • maxlength: Specifies the maximum length (in characters) of a text area
  • placeholder: Specifies a short hint that describes the expected value of a text area.
  • readonly: Specifies whether the control may be modified by the user.
  • disabled: Disables the control for user input.
  • wrapper_html_tag: The HTML tag for the wrapper.
  • wrapper_utility_classes: An array of utility classes. Use to add extra Bootstrap utility classes or custom CSS classes over the wrapper div to this component.
  • utility_classes: An array of utility classes. Use to add extra Bootstrap utility classes or custom CSS classes over the form element to this component.

Attributes:

  • wrapper_attributes: A list of HTML attributes for the wrapper element
  • attributes: A list of HTML attributes for the element.

Slots:

  • N/A

📌 Add standard Drupal heading for the Textarea template with Theme override for a textarea #type form element Fixed

Remaining tasks

  • ✅ File an issue about this project
  • ✅ Addition/Change/Update/Fix to this project
  • ✅ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support on feature change/addition
  • ➖ User Guide Documentation support on feature change/addition
  • ✅ Accessibility and Readability
  • ✅ Code review from 1 Varbase core team member
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Update Release Notes and Update Helper on new feature change/addition
  • ✅ Release Varbase 10.0.0-beta1 , varbase_components-2.0.0-alpha21

Varbase update type

  • ✅ No Update
  • ➖ Optional Update
  • ➖ Forced Update
  • ➖ Forced Update if Unchanged

User interface changes

Text area - story with wrapper HTML Div Tag

Text area - No wrapper

Text area - Resize both sizes

Text area - Disabled

Text area - Valid

Text area - Invalid

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇯🇴Jordan ahmad abbad Jordan

Live updates comments and jobs are added and updated live.
  • Accessibility

    It affects the ability of people with disabilities or special needs (such as blindness or color-blindness) to use Drupal.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024