Merge lp:~thumper/launchpad/recipe-syntax into lp:launchpad
Proposed by
Tim Penhey
Status: | Merged |
---|---|
Approved by: | Curtis Hovey |
Approved revision: | no longer in the source branch. |
Merged at revision: | 11995 |
Proposed branch: | lp:~thumper/launchpad/recipe-syntax |
Merge into: | lp:launchpad |
Prerequisite: | lp:~thumper/launchpad/makefile-tweaks |
Diff against target: |
360 lines (+230/-15) 8 files modified
Makefile (+3/-0) lib/lp/app/browser/configure.zcml (+8/-0) lib/lp/app/browser/launchpadform.py (+32/-0) lib/lp/app/browser/tests/test_launchpadform.py (+66/-0) lib/lp/app/templates/launchpad-form.pt (+18/-12) lib/lp/code/browser/sourcepackagerecipe.py (+11/-3) lib/lp/code/help/recipe-syntax.html (+91/-0) lib/lp/code/templates/sourcepackagerecipe-new.pt (+1/-0) |
To merge this branch: | bzr merge lp:~thumper/launchpad/recipe-syntax |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Curtis Hovey (community) | code | Approve | |
Review via email: mp+41818@code.launchpad.net |
This proposal supersedes a proposal from 2010-11-23.
Commit message
[r=sinzui]
Description of the change
Show a help link in the description of the recipe text widget, and have that bring up some meaningful help.
As discussed on the list I'm using an optional field modifier that gets the launchpad form infrastructure
to render the widget's description using the structured text, so html is rendered un-escaped.
tests:
lp.app.
To post a comment you must log in.
Hi Tim.
Your implementation looks good. I have a few concerns about markup and text that you may want to consider before you land.
@lib/lp/ app/templates/ launchpad- form.pt
launchpad-form does not look very DRY. I wonder if we could define a metal macro before the launchpad form macro based on the first definition and use it.
<metal:help-hint metal:define- macro=" help_hint" > widget- help
define= "use_structure context/ query:has- structured- doc"
condition= "context/ hint"> "context/ hint"
tal:condition ="not: use_structure"> "structure context/hint"
tal:condition ="use_structure "> widget- help> help-hint>
<tal:
<p class="formHelp" tal:content=
Some Help Text
</p>
<p class="formHelp" tal:content=
Some Structured Help Text
</p>
</tal:
</metal:
then
<metal:help-hint use-macro= "widget/ @@launchpad_ form/help_ hint">
Writing macros is somewhat dodgy. Maybe we should report a bug in launchpad-web and set someone the task of cleaning up the rules. The clean up might reveal inconsistencies in the file.
@lib/lp/ code/browser/ sourcepackagere cipe.py
Some users will see odd leading and trailing underlines on hover because there is white space between the anchor tags and content. While HTML 3.0+ requires renders to strip the leanding and trailing space, few browsers have implemented the rule.
<a href="/ +help/recipe- syntax. html" target="help"
>Syntax help
<span class="sprite maybe">
< span class=" invisible- link">Help< /span>
</span> </a>
@lib/lp/ code/help/ recipe- syntax. html
I believe we are using an > to indicate the user will leave the site/open a new window. /help.launchpad .net/Place" target= "_blank" >place ></a>
<a href="https:/
s/ndash/mdash/ ndash is for a range of numbers, mdash it used to construct a clause