revolution icon indicating copy to clipboard operation
revolution copied to clipboard

Enhance textarea tv type

Open smg6511 opened this issue 1 year ago • 1 comments

What does it do?

Adds new input options to control input height.

Why is it needed?

Currently this input type is restricted to its default size of 140px.

How to test

  1. Rebuild the manager template (cd to _build/templates/default and run grunt build)
  2. Clear MODX caches
  3. Create a few textarea type TVs to test the three new options (height, auto grow, and resize)

Related issue(s)/PR(s)

Resolves #5512

smg6511 avatar Apr 03 '24 19:04 smg6511

Codecov Report

Attention: Patch coverage is 0% with 29 lines in your changes missing coverage. Please review.

Project coverage is 21.55%. Comparing base (56c42e6) to head (1512af8).

:exclamation: Current head 1512af8 differs from pull request most recent head 15e309e

Please upload reports for the commit 15e309e to get more accurate results.

Files Patch % Lines
...mplateVar/Configs/mgr/inputproperties/textarea.php 0.00% 29 Missing :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##                3.x   #16553      +/-   ##
============================================
- Coverage     21.60%   21.55%   -0.06%     
+ Complexity    10592    10577      -15     
============================================
  Files           561      561              
  Lines         32052    32003      -49     
============================================
- Hits           6926     6898      -28     
+ Misses        25126    25105      -21     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Apr 03 '24 20:04 codecov[bot]

@smg6511 This does seem to function and it's a nice add.

One note, however, upon creation, until you change the values set for the Grow or Resizable input options, Revo throws a warning about undefined keys but once you change the input values the first time, this resolves.

[2024-05-31 13:59:15] (ERROR @ core/src/Revolution/Processors/Element/TemplateVar/Configs/mgr/inputproperties/textarea.php : 19) PHP warning: Undefined array key "textareaGrow"
[2024-05-31 13:59:15] (ERROR @ core/src/Revolution/Processors/Element/TemplateVar/Configs/mgr/inputproperties/textarea.php : 20) PHP warning: Undefined array key "textareaResizable"

It shouldn't require changing of the values as many people may not want to or need to change the values.

jaygilmore avatar May 31 '24 14:05 jaygilmore

@jaygilmore Ok, got that covered. Thanks for taking a look.

smg6511 avatar May 31 '24 20:05 smg6511