Merge lp:~jtv/launchpad/bmp-inline-diffs into lp:~spiv/launchpad/bmp-inline-diffs

Proposed by Jeroen T. Vermeulen
Status: Merged
Merged at revision: 13321
Proposed branch: lp:~jtv/launchpad/bmp-inline-diffs
Merge into: lp:~spiv/launchpad/bmp-inline-diffs
Diff against target: 67 lines (+24/-15)
2 files modified
lib/lp/code/templates/branch-macros.pt (+20/-15)
lib/lp/services/features/flags.py (+4/-0)
To merge this branch: bzr merge lp:~jtv/launchpad/bmp-inline-diffs
Reviewer Review Type Date Requested Status
Andrew Bennetts Pending
Review via email: mp+66591@code.launchpad.net

Commit message

ajax_revision_diffs feature flag.

Description of the change

Protect the Ajax expandable inline revision diffs with a feature flag.

To enable this, add a feature rule along the lines of
{{{
code.ajax_revision_diffs.enabled default 1 on
}}}

Also, I removed the js-action CSS class from the expander icon tags. The expander widget now adds this class automatically.

The expander widget itself is currently on approach for landing.

Jeroen

To post a comment you must log in.
Revision history for this message
Andrew Bennetts (spiv) wrote :

Thanks!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/lp/code/templates/branch-macros.pt'
--- lib/lp/code/templates/branch-macros.pt 2011-06-30 17:03:35 +0000
+++ lib/lp/code/templates/branch-macros.pt 2011-07-01 12:14:31 +0000
@@ -202,19 +202,22 @@
202 condition="revisions | nothing">202 condition="revisions | nothing">
203 <metal:landing-target use-macro="branch/@@+macros/revision-text"/>203 <metal:landing-target use-macro="branch/@@+macros/revision-text"/>
204 </tal:revision>204 </tal:revision>
205 <tal:diff-expander condition="show_diff_expander | nothing">205 <tal:ajax-revision-diffs
206 <div class="revision-group-diff" tal:condition="revisions | nothing">206 condition="request/features/code.ajax_revision_diffs.enabled">
207 <a class="unseen expander-icon js-action"207 <tal:diff-expander condition="show_diff_expander | nothing">
208 tal:define="start_revno python:revisions[0].sequence;208 <div class="revision-group-diff" tal:condition="revisions | nothing">
209 last_revno python:revisions[-1].sequence"209 <a class="unseen expander-icon"
210 tal:attributes="id string:expandable-${start_revno}-${last_revno}"210 tal:define="start_revno python:revisions[0].sequence;
211 >Changes added by revision <tal:revno replace="start_revno">1</tal:revno>211 last_revno python:revisions[-1].sequence"
212 <tal:plural condition="python: start_revno!=last_revno">212 tal:attributes="id string:expandable-${start_revno}-${last_revno}"
213 to revision <tal:revno replace="last_revno">2</tal:revno>213 >Changes added by revision <tal:revno replace="start_revno">1</tal:revno>
214 </tal:plural></a>214 <tal:plural condition="python: start_revno!=last_revno">
215 <div class="unseen expander-content">Loading diff</div>215 to revision <tal:revno replace="last_revno">2</tal:revno>
216 </div>216 </tal:plural></a>
217 </tal:diff-expander>217 <div class="unseen expander-content">Loading diff</div>
218 </div>
219 </tal:diff-expander>
220 </tal:ajax-revision-diffs>
218 </dl>221 </dl>
219222
220</metal:branch-revisions>223</metal:branch-revisions>
@@ -268,8 +271,10 @@
268 The revision commit message.271 The revision commit message.
269 </tal:commit-message>272 </tal:commit-message>
270 </dd>273 </dd>
271 <div class="revision-expander">274 <div
272 <a class="unseen expander-icon js-action"275 class="revision-expander"
276 tal:condition="request/features/code.ajax_revision_diffs.enabled">
277 <a class="unseen expander-icon"
273 tal:attributes="id string:expandable-${rev_no/sequence}"278 tal:attributes="id string:expandable-${rev_no/sequence}"
274 >Changes</a>279 >Changes</a>
275 <div class="unseen expander-content">280 <div class="unseen expander-content">
276281
=== modified file 'lib/lp/services/features/flags.py'
--- lib/lp/services/features/flags.py 2011-06-16 13:50:58 +0000
+++ lib/lp/services/features/flags.py 2011-07-01 12:14:31 +0000
@@ -42,6 +42,10 @@
42 'boolean',42 'boolean',
43 ('Enables the display of bugtracker components.'),43 ('Enables the display of bugtracker components.'),
44 ''),44 ''),
45 ('code.ajax_revision_diffs',
46 'boolean',
47 ("Offer expandable inline diffs for branch revisions."),
48 ''),
45 ('code.branchmergequeue',49 ('code.branchmergequeue',
46 'boolean',50 'boolean',
47 'Enables merge queue pages and lists them on branch pages.',51 'Enables merge queue pages and lists them on branch pages.',

Subscribers

People subscribed via source and target branches