Merge lp:~deryck/launchpad/better-html-handling-description-editing into lp:launchpad
Proposed by
Deryck Hodge
Status: | Merged |
---|---|
Approved by: | Deryck Hodge |
Approved revision: | no longer in the source branch. |
Merged at revision: | not available |
Proposed branch: | lp:~deryck/launchpad/better-html-handling-description-editing |
Merge into: | lp:launchpad |
Diff against target: |
134 lines 3 files modified
lib/canonical/launchpad/javascript/client/client.js (+37/-13) lib/canonical/widgets/lazrjs.py (+3/-23) lib/lp/bugs/browser/bug.py (+1/-1) |
To merge this branch: | bzr merge lp:~deryck/launchpad/better-html-handling-description-editing |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Leonard Richardson (community) | Approve | ||
Review via email: mp+13963@code.launchpad.net |
Commit message
Do not use formatter config option to handle html in TextAreaEditor Widget. JS API client can do a patch on individual fields now.
To post a comment you must log in.
= Summary =
Tim had some troubles getting an xhtml representation of an object
displaying properly with the ajax multi-line editor used in bug
description editing. A launchpad-dev mailing list discussion around
this uncovered that the API will allow us to patch a field on an object
and get back just the field's representation, rather than patching an
object and getting back a representation of the object.
Bug #460725 records the need to update the widget used in multi-line
editing to not rely on formatter config option hacks to parse the object
xhtml. This means the widget should just patch the field.
== Proposed fix ==
This branch updates TextAreaEditorW idget to remove the formatter option.
client.js also had to be patched to allow for submitting a single field
object patch request.
== Pre-implementation notes ==
There was discussion on the launchpad-dev mailing list with Francis that
led to private discussions with Leonard about how to correctly do this.
He's pretty much looked at this diff in stages by this point.
== Implementation details ==
While the API is capable of doing this single field patch request, the
JavaScript client was not enabled for it and had to be updated.
Otherwise, it's a pretty simple branch removing the formatter option and
properly encoding the response.
(The first few lines of the diff are cleanup from lint warnings
unrelated to this change.)
There is a related lazr-js branch that must land when this one does.
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: /widgets/ lazrjs. py /launchpad/ javascript/ client/ client. js bugs/browser/ bug.py
lib/canonical
lib/canonical
lib/lp/
== JSLint notices == deryck/ canonical/ lp-branches/ better- html-handling- description- editing/ lib/canonical/ launchpad/ javascript/ client/ client. js'.
jslint: No problem found in
'/home/
jslint: 1 file to lint.
== Pylint notices ==
lib/canonical/ widgets/ lazrjs. py interfaces' (No module
23: [F0401] Unable to import 'lazr.restful.
named restful)
lib/lp/ bugs/browser/ bug.py .event' (No module named .snapshot' (No module interfaces' (No module
44: [F0401] Unable to import 'lazr.enum' (No module named enum)
45: [F0401] Unable to import 'lazr.lifecycle
lifecycle)
46: [F0401] Unable to import 'lazr.lifecycle
named lifecycle)
47: [F0401] Unable to import 'lazr.restful.
named restful)