lp://staging/~bryce/launchpad-gm-scripts/stockreplies-revamp
- Get this branch:
- bzr branch lp://staging/~bryce/launchpad-gm-scripts/stockreplies-revamp
Branch merges
- Brian Murray (community): Approve
-
Diff: 930 lines (+268/-626)2 files modifiedREADME (+3/-4)
lp_stockreplies.user.js (+265/-622)
Branch information
Recent revisions
- 188. By Bryce Harrington
-
Restore original settings when selecting a response with undefined values
If a given stock reply has an empty or missing value for 'package' the
script would leave the package widget untouched. If a previously
selected stock reply had inserted a value for package, this would cause
the new stock reply to show that changed value - requiring the user to
have to notice and fix it up manually. Instead, keep track of what the
original package was, and restore to that value when it's undefined in
the stock reply.Follow this same behavior pattern for importance, status, assignee, and
comment.Fixes: https:/
/bugs.launchpad .net/launchpad- gm-scripts/ +bug/334040 - 187. By Bryce Harrington
-
If there is no value to substitute, leave key for user to manually fill in
This isn't great, but it's better than displaying 'null' in the comment.
At least the all-caps keyword should be noticeable. - 184. By Bryce Harrington
-
stockreplies: Define operations for setting input widgets
Stubs in some routines for setting the values of the different kinds of
HTML input form elements.Textarea insertion functionality is moved to one of these routines, the
rest simply print to console. - 182. By Bryce Harrington
-
stockreplies: Major re-write (PSA: Functional regressions)
The original script no longer runs against modern Greasemonkey due to
several changes in the API. Notably, the API for loading external XML
files dynamically has been removed from the language, which
unfortunately invalidates a large chunk of this script's functionality.With this rewrite the functionality is drastically simplified down to
just loading stock replies from external JSON files, displaying buttons
to select which stock reply to use, and substituting in bug # and other
information from the bug report. This gets us back to solid footing
restoring the script to basic usability.On the plus side, this rewrite has allowed tightening up the code a bit,
and starts using the console for debug messages rather than alert()'s.On the minus side, this regresses several pieces of functionality:
- Dynamic editing/saving of stock replies
- Reload button
- Setting of bug report metadata (importance, etc.)It's unknown at this time if the dynamic editing can be restored;
certainly this involved an extensive amount of Javascript, so if it's
omitted it may make this script simpler to maintain in the future.The loss of on-demand reload functionality is quite annoying, but does
not have a known solution at present. Investigation will continue for
this.The bug metadata is straightforward to restore and will be re-introduced
in a subsequent commit.
Branch metadata
- Branch format:
- Branch format 6
- Repository format:
- Bazaar pack repository format 1 (needs bzr 0.92)