Merge lp:~bryce/launchpad/lp-586150-whiteboard-widening into lp:launchpad

Proposed by Bryce Harrington
Status: Merged
Approved by: Curtis Hovey
Approved revision: no longer in the source branch.
Merged at revision: 10962
Proposed branch: lp:~bryce/launchpad/lp-586150-whiteboard-widening
Merge into: lp:launchpad
Diff against target: 119 lines (+34/-38)
4 files modified
lib/canonical/launchpad/icing/style-3-0.css.in (+6/-0)
lib/canonical/launchpad/icing/style.css (+0/-4)
lib/lp/blueprints/templates/specification-index.pt (+27/-33)
lib/lp/soyuz/templates/archive-macros.pt (+1/-1)
To merge this branch: bzr merge lp:~bryce/launchpad/lp-586150-whiteboard-widening
Reviewer Review Type Date Requested Status
Curtis Hovey (community) Approve
Canonical Launchpad Engineering Pending
Review via email: mp+26265@code.launchpad.net

Description of the change

Gives additional horizontal space for the whiteboard section.

The Ubuntu project makes heavy use of the whiteboard for coordinating development tasks. Launchpad's stylesheet wraps lines to make prose read better. However with todo lists this tends to not work out as well. This change provides a bit more horizontal space, which makes the Ubuntu blueprint work item lists read a lot nicer.

To post a comment you must log in.
Revision history for this message
Curtis Hovey (sinzui) wrote :

> === modified file 'lib/canonical/launchpad/icing/style-3-0.css.in'
> --- lib/canonical/launchpad/icing/style-3-0.css.in 2010-05-17 10:56:27 +0000
> +++ lib/canonical/launchpad/icing/style-3-0.css.in 2010-05-28 03:48:33 +0000
> @@ -409,6 +409,10 @@
> /* Keep the abilty to hide list entries. */
> display: none;
> }
> +div.widetext p {
> + max-width: 60em;
> + margin-bottom: 1.0em;
> + }

This is a very narrow definition makes this an exception for the blueprint
white board. It cannot will not be resued. If we really want an exception for
*just* the blueprint whiteboard, this then belongs in the page's
head-epilogue slot.

This rule needs to accommodate the kinds of markup and circumstances that
happen in many places in Launchpad to be included in the global CSS. I think
we need this rule, so the selector must be generalised.

I think .wide will suffice since we have a .narrow. I should be permitted to
use this with a table or a form. lists that should be the same width as the
paragraphs they are with so div and p are too specific

/me looks at other wide cases.
    table#package-requests {
        width: 60em;
        margin: 1em 0;
        }

Score! Well we have found a common rule that blueprints and soyuz can used

I think the rule should be:
.wide {
    max-width: 60em;
    margin: 1em 0;
    }

Update your file and lib/lp/soyuz/templates/archive-macros.pt
    <table id="package-requests" class="wide listing"

And we can remove one more dead rule from style.css.

review: Approve (code ui)
Revision history for this message
Bryce Harrington (bryce) wrote :

I tried this bug it did not work:

.wide {
    max-width: 60em;
    margin: 1em 0;
    }

However if I change it to this, it does work:

.wide p {
    max-width: 60em;
    margin: 1em 0;
    }

I'm not sure where in Launchpad the package-requests table appears, so haven't been able to test how either of these CSS settings affect it. I've poked around the PPA pages where it looks like it should appear but can't seem to locate it, is there some trick to make that portlet show up?

Revision history for this message
Bryce Harrington (bryce) wrote :

Also, isn't 'max-width' a p-specific markup tag? Is that going to apply to tables with the same effect as 'width'?

Revision history for this message
Curtis Hovey (sinzui) wrote :

No, but ultimately your point is valid. max-width is for block elements, inline elements and table elements are ignored (display: inline and display:table respectively). In my defence, it was way past my bed time when I did that review; I should have waiting till morning when the caffeine had taken affect. We need to refine the rule so that we have the same semantics to provide comprable effect.

.wide * {
    max-width: 60em;
    margin: 1em 0;
    }
table.wide {
    max: 60em;
    margin: 1em 0;
    }

Revision history for this message
Bryce Harrington (bryce) wrote :

Okay, that looks more sensible.

However I notice the * has a curious effect on the whiteboard layout... see this screenshot:

  http://launchpadlibrarian.net/49280819/whiteboard-margin-increase.png

Revision history for this message
Curtis Hovey (sinzui) wrote :

Is that the correct screen cap? I do not see an whiteboard on the merge proposal page.

Revision history for this message
Bryce Harrington (bryce) wrote :

I kinda like how it looks with a bit of extra space between the lines... makes the text less harsh and dense. But the above is a bit too much. Cutting down to 0.5em looks more like I think it should.

OTOH if it's going to have weird side effects, maybe leaving the margin untweaked would be safest?

Revision history for this message
Bryce Harrington (bryce) wrote :

Oh and I notice you said 'max: 60em' but shouldn't that be 'width: 60em'? (I still haven't found where this particular table shows up so haven't been able to test it).

Anyway, with the above caveats I've pushed an update.

Revision history for this message
Curtis Hovey (sinzui) wrote :

Yes. you are correct about width 60em

The image does not show the whiteboard. I can image eveyything looks double-spaced since every wide element has 1em before and after it. We already have margin rules for elements, so I think we can drop the .wide * margin rule. This will let the default rules work. If you need to force an 1em between the whiteboard and the line in the page, hack it into the template.

Revision history for this message
Bryce Harrington (bryce) wrote :

> The image does not show the whiteboard.

Hmm, weird. Try again:
  http://launchpadlibrarian.net/49285310/whiteboard-doublespace.png

Here's how it looks with the current state of the branch (with the .wide * margin rules dropped):
  http://launchpadlibrarian.net/49285335/whiteboard-no-margin-tweaks.png

I think this looks fine, the CSS seems sane, and am happy to call it done if you are. Is there a need for anyone else to review this or shall I call it done and plan to land it once PQM has reopened?

Revision history for this message
Curtis Hovey (sinzui) wrote :

Let's call this done then. You can land it next week wne PQM opens.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/canonical/launchpad/icing/style-3-0.css.in'
2--- lib/canonical/launchpad/icing/style-3-0.css.in 2010-05-17 10:56:27 +0000
3+++ lib/canonical/launchpad/icing/style-3-0.css.in 2010-06-02 20:11:28 +0000
4@@ -164,6 +164,12 @@
5 /* Wrap the text before the eye gets lost. */
6 max-width: 45em;
7 }
8+.wide * {
9+ max-width: 60em;
10+ }
11+table.wide {
12+ width: 60em;
13+ }
14 pre, code, samp, tt, .console {
15 font-size: 116%;
16 margin-bottom: 0.8em;
17
18=== modified file 'lib/canonical/launchpad/icing/style.css'
19--- lib/canonical/launchpad/icing/style.css 2010-04-27 12:38:38 +0000
20+++ lib/canonical/launchpad/icing/style.css 2010-06-02 20:11:28 +0000
21@@ -309,10 +309,6 @@
22 padding: 0 1em;
23 margin:0 1em 1em 0;
24 }
25-table#package-requests {
26- width: 60em;
27- margin: 1em 0;
28-}
29 table#package-requests td {
30 padding: 0.5em;
31 }
32
33=== modified file 'lib/lp/blueprints/templates/specification-index.pt'
34--- lib/lp/blueprints/templates/specification-index.pt 2009-11-07 18:51:07 +0000
35+++ lib/lp/blueprints/templates/specification-index.pt 2010-06-02 20:11:28 +0000
36@@ -270,43 +270,37 @@
37 </li>
38 </ul>
39 </div>
40+
41+ <div class="portlet" style="border-top: none;">
42+ <h2 tal:condition="not:context/feedbackrequests">Feedback requests</h2>
43+
44+ <div tal:replace="structure context/@@+portlet-feedbackqueue" />
45+
46+ <ul class="horizontal">
47+ <li tal:define="link context_menu/givefeedback"
48+ tal:condition="link/enabled">
49+ <a tal:replace="structure link/fmt:link" />
50+ </li>
51+ <li tal:define="link context_menu/requestfeedback"
52+ tal:condition="link/enabled">
53+ <a tal:replace="structure link/fmt:link" />
54+ </li>
55+ </ul>
56+ </div>
57+
58 </div>
59 </div>
60 </div>
61
62- <div class="yui-g">
63- <div class="yui-u first">
64- <div class="portlet">
65- <h2>
66- Whiteboard
67- <a tal:replace="structure context_menu/whiteboard/fmt:icon" />
68- </h2>
69-
70- <div
71- tal:content="structure context/whiteboard/fmt:text-to-html"
72- tal:condition="context/whiteboard">Whiteboard.</div>
73- </div>
74- </div>
75-
76- <div class="yui-u">
77- <div class="portlet">
78- <h2
79- tal:condition="not:context/feedbackrequests">Feedback requests</h2>
80-
81- <div tal:replace="structure context/@@+portlet-feedbackqueue" />
82-
83- <ul class="horizontal">
84- <li tal:define="link context_menu/givefeedback"
85- tal:condition="link/enabled">
86- <a tal:replace="structure link/fmt:link" />
87- </li>
88- <li tal:define="link context_menu/requestfeedback"
89- tal:condition="link/enabled">
90- <a tal:replace="structure link/fmt:link" />
91- </li>
92- </ul>
93- </div>
94- </div>
95+ <div class="portlet">
96+ <h2>
97+ Whiteboard
98+ <a tal:replace="structure context_menu/whiteboard/fmt:icon" />
99+ </h2>
100+
101+ <div class="wide"
102+ tal:content="structure context/whiteboard/fmt:text-to-html"
103+ tal:condition="context/whiteboard">Whiteboard.</div>
104 </div>
105
106 <div class="portlet">
107
108=== modified file 'lib/lp/soyuz/templates/archive-macros.pt'
109--- lib/lp/soyuz/templates/archive-macros.pt 2009-12-03 18:33:22 +0000
110+++ lib/lp/soyuz/templates/archive-macros.pt 2010-06-02 20:11:28 +0000
111@@ -219,7 +219,7 @@
112 </p>
113
114 <tal:request_list tal:condition="requests">
115- <table id="package-requests" class="listing"
116+ <table id="package-requests" class="wide listing"
117 tal:attributes="summary
118 string:Package copy requests for ${context/name}">
119 <thead>