Merge lp:~rharding/launchpad/bugfix_891735 into lp:launchpad
Status: | Superseded |
---|---|
Proposed branch: | lp:~rharding/launchpad/bugfix_891735 |
Merge into: | lp:launchpad |
Diff against target: |
475 lines (+431/-1) 4 files modified
lib/lp/app/javascript/formwidgets/resizing_textarea.js (+231/-0) lib/lp/app/javascript/formwidgets/tests/test_resizing_textarea.html (+32/-0) lib/lp/app/javascript/formwidgets/tests/test_resizing_textarea.js (+158/-0) lib/lp/bugs/javascript/filebug_dupefinder.js (+10/-1) |
To merge this branch: | bzr merge lp:~rharding/launchpad/bugfix_891735 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Aaron Bentley | Pending | ||
Review via email: mp+83068@code.launchpad.net |
This proposal has been superseded by a proposal from 2011-11-23.
Commit message
Add new lp.app.
Add this new widget to the new bug process on the +filebug url
Add tests for the use cases of this working through the common settings and use cases
Description of the change
= Summary =
Add a new auto resizing textarea widget for launchpad
== Proposed fix ==
Added a new module under the lp.app.formwidgets namespace called ResizingTextarea. This is a YUI plugin and can be stuck on any textarea YUI node instances.
== Pre-implementation notes ==
Attempted to use a YUI Gallery module that lacked features and performed poorly. Talked with Deryck and we agreed to work on our own module.
Took a peek at the inline editor module, and it does some of the same thing, but it's not modular enough to just use for simple textareas like the initial sample case of the new bug submitting form.
== Implementation details ==
The new plugin uses a YUI specific "valueChanged" event for detecting if the content of an input has changed by any means (pasting, key stroke, etc).
It removes the ability for webkit browsers to resize the textarea since that can throw off the calculations of the size of the textarea.
It accepts parameters for min and max heights to help duplicate the functionality of defining rows in a textarea.
The adding and removing of rows of space are animated via a css3 transition. It should gracefull degrade on older browsers. There is a flag for turning off all animations. That's used to help keep tests from taking too long to run.
== Tests ==
./bin/test -cvvt test_resizing_
$browser lib/lp/
== Demo and Q/A ==
The tests are the main Q/A right now. The single point where it's created is when adding a new bug. So go to:
https:/
Enter a summary, the "Further information" textarea should be an instance of ResizingTextarea and as you enter new lines it will start to expand. There's a default 450px height so at that point, the scrollbar should show up and begin to lengthen.
I'm confused - the bug description editing field already autosizes
(poorly, but it does) - is that not widget already?