Merge lp:~kfogel/launchpad/old-1.6-ml-archiver-ui into lp:launchpad
- old-1.6-ml-archiver-ui
- Merge into devel
Status: | Merged |
---|---|
Approved by: | Barry Warsaw |
Approved revision: | no longer in the source branch. |
Merged at revision: | not available |
Proposed branch: | lp:~kfogel/launchpad/old-1.6-ml-archiver-ui |
Merge into: | lp:launchpad |
Diff against target: | 224 lines |
To merge this branch: | bzr merge lp:~kfogel/launchpad/old-1.6-ml-archiver-ui |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Barry Warsaw (community) | code | Approve | |
Martin Albisetti (community) | ui | Approve | |
Review via email: mp+6001@code.launchpad.net |
Commit message
Description of the change
Karl Fogel (kfogel) wrote : | # |
Martin Albisetti (beuno) wrote : | # |
Hi Karl,
Could you possibly just provide a screenshot of this so I can review?
Steps to reproduce seem long and painful :)
Karl Fogel (kfogel) wrote : | # |
Martin Albisetti <email address hidden> writes:
> Could you possibly just provide a screenshot of this so I can review?
> Steps to reproduce seem long and painful :)
:-) Sure:
Martin Albisetti (beuno) wrote : | # |
Hi Karl,
Thanks for working on this, it's a very big improvement.
The only comment I have, is that the sender and the date should be somehow visually distinct (looking at: http://
Also, maybe the date should be YYYY-MM-DD instead of YYYY/MM/DD, as using slashes usually means it's formatted.
Neither of these are blockers for the branch to land, but would be nice :)
Karl Fogel (kfogel) wrote : | # |
> The only comment I have, is that the sender and the date should be somehow
> visually distinct (looking at: http://
> screenshots/
> bold?
Done, for the thread index only (using bold didn't look so good for
the date index, so I didn't do it there). On the thread index, it
is a big improvement.
> Also, maybe the date should be YYYY-MM-DD instead of YYYY/MM/DD, as using
> slashes usually means it's formatted.
That turns out to be a bit tricky, due to the way MHonArc works. I'm
not even sure it can be done without modifying MHonArc itself, which
so far we've managed to avoid. Leaving as YYYY/MM/DD for now.
Thanks for the review!
Barry Warsaw (barry) wrote : | # |
Karl, thanks for working on this, it's a *huge* improvement! I have just a couple of comments.
* Should the link to the team be an https link? It'll probably get redirected there anyway so might as well send people to the right place the first time.
* Should there be a link to the help wiki's mailing lists page?
* Please coordinate with the LOSAs to regenerate all the existing archives. I think we want to switch them all over to the new and improved look. It shouldn't be difficult; probably one command per list, and that could be scripted (and tested on staging).
Karl Fogel (kfogel) wrote : | # |
> Karl, thanks for working on this, it's a *huge* improvement! I have just a
> couple of comments.
>
> * Should the link to the team be an https link? It'll probably get redirected
> there anyway so might as well send people to the right place the first time.
>
> * Should there be a link to the help wiki's mailing lists page?
Done in r8117.
> * Please coordinate with the LOSAs to regenerate all the existing archives. I
> think we want to switch them all over to the new and improved look. It
> shouldn't be difficult; probably one command per list, and that could be
> scripted (and tested on staging).
Will do.
Karl Fogel (kfogel) wrote : | # |
Note to self: the relevant wiki page is
https:/
The mhonarc command there needs to be tweaked -- it should be told to read
the new config file.
Preview Diff
1 | === modified file 'lib/canonical/launchpad/mailman/monkeypatches/__init__.py' | |||
2 | --- lib/canonical/launchpad/mailman/monkeypatches/__init__.py 2009-04-29 19:10:17 +0000 | |||
3 | +++ lib/canonical/launchpad/mailman/monkeypatches/__init__.py 2009-06-09 12:25:02 +0000 | |||
4 | @@ -91,6 +91,8 @@ | |||
5 | 91 | -add \ | 91 | -add \ |
6 | 92 | -dbfile %(var_dir)s/archives/private/%%(listname)s.mbox/mhonarc.db \ | 92 | -dbfile %(var_dir)s/archives/private/%%(listname)s.mbox/mhonarc.db \ |
7 | 93 | -outdir %(var_dir)s/mhonarc/%%(listname)s \ | 93 | -outdir %(var_dir)s/mhonarc/%%(listname)s \ |
8 | 94 | -definevar ML-NAME=%%(listname)s \ | ||
9 | 95 | -rcfile %(var_dir)s/data/lp-mhonarc-common.mrc \ | ||
10 | 94 | -stderr %(var_dir)s/logs/mhonarc \ | 96 | -stderr %(var_dir)s/logs/mhonarc \ |
11 | 95 | -stdout %(var_dir)s/logs/mhonarc \ | 97 | -stdout %(var_dir)s/logs/mhonarc \ |
12 | 96 | -spammode \ | 98 | -spammode \ |
13 | @@ -150,8 +152,13 @@ | |||
14 | 150 | print >> handler_file, 'from', module, 'import *' | 152 | print >> handler_file, 'from', module, 'import *' |
15 | 151 | finally: | 153 | finally: |
16 | 152 | handler_file.close() | 154 | handler_file.close() |
17 | 155 | |||
18 | 156 | here = os.path.dirname(__file__) | ||
19 | 157 | # Install the MHonArc control file. | ||
20 | 158 | mhonarc_rc_file = os.path.join(here, 'lp-mhonarc-common.mrc') | ||
21 | 159 | runtime_data_dir = os.path.join(config.mailman.build_var_dir, 'data') | ||
22 | 160 | shutil.copy(mhonarc_rc_file, runtime_data_dir) | ||
23 | 153 | # Install the launchpad site templates. | 161 | # Install the launchpad site templates. |
24 | 154 | here = os.path.dirname(__file__) | ||
25 | 155 | launchpad_template_path = os.path.join(here, 'sitetemplates') | 162 | launchpad_template_path = os.path.join(here, 'sitetemplates') |
26 | 156 | site_template_path = os.path.join(mailman_path, 'templates', 'site') | 163 | site_template_path = os.path.join(mailman_path, 'templates', 'site') |
27 | 157 | if os.path.isdir(site_template_path): | 164 | if os.path.isdir(site_template_path): |
28 | 158 | 165 | ||
29 | === added file 'lib/canonical/launchpad/mailman/monkeypatches/lp-mhonarc-common.mrc' | |||
30 | --- lib/canonical/launchpad/mailman/monkeypatches/lp-mhonarc-common.mrc 1970-01-01 00:00:00 +0000 | |||
31 | +++ lib/canonical/launchpad/mailman/monkeypatches/lp-mhonarc-common.mrc 2009-06-09 12:25:02 +0000 | |||
32 | @@ -0,0 +1,192 @@ | |||
33 | 1 | <!-- Launchpad customizations common to all our MHonArc-generated | ||
34 | 2 | mailing list archives. | ||
35 | 3 | |||
36 | 4 | See http://www.mhonarc.org/MHonArc/doc/mhonarc.html and | ||
37 | 5 | http://www.mhonarc.org/MHonArc/doc/faq/, they are your friends. | ||
38 | 6 | |||
39 | 7 | http://www.mhonarc.org/MHonArc/doc/resources.html#index is | ||
40 | 8 | especially your friend, when all others have abandoned you. --> | ||
41 | 9 | |||
42 | 10 | <!-- Basic parameters. --> | ||
43 | 11 | <MAIN> | ||
44 | 12 | <THREAD> | ||
45 | 13 | <SORT> | ||
46 | 14 | <REVERSE> | ||
47 | 15 | <TREVERSE> | ||
48 | 16 | <NODOC> | ||
49 | 17 | |||
50 | 18 | <!-- Use multi-page indexes. | ||
51 | 19 | See http://www.mhonarc.org/MHonArc/doc/resources/multipg.html --> | ||
52 | 20 | <MULTIPG> | ||
53 | 21 | <IDXSIZE> | ||
54 | 22 | 200 | ||
55 | 23 | </IDXSIZE> | ||
56 | 24 | |||
57 | 25 | <!-- Define a custom resource variable to represent this mailing list. | ||
58 | 26 | This depends on $ML-NAME$ having been set already, presumably on | ||
59 | 27 | the command line via '-definevar'. See | ||
60 | 28 | http://www.mhonarc.org/MHonArc/doc/resources/definevar.html. --> | ||
61 | 29 | <DefineVar> | ||
62 | 30 | ML-FULL-TITLE | ||
63 | 31 | <a href="https://launchpad.net/~$ML-NAME$">$ML-NAME$</a> mailing list archive | ||
64 | 32 | </DefineVar> | ||
65 | 33 | |||
66 | 34 | <IDXLABEL> | ||
67 | 35 | Date Index | ||
68 | 36 | </IDXLABEL> | ||
69 | 37 | |||
70 | 38 | <TIDXLABEL> | ||
71 | 39 | Thread Index | ||
72 | 40 | </TIDXLABEL> | ||
73 | 41 | |||
74 | 42 | <!-- What do the next/prev links look like? --> | ||
75 | 43 | <PREVPGLINK> | ||
76 | 44 | <a href="$PG(FIRST)$">←First</a> <a href="$PG(PREV)$">←Prev</a> | ||
77 | 45 | </PREVPGLINK> | ||
78 | 46 | <PREVPGLINKIA> | ||
79 | 47 | | ||
80 | 48 | </PREVPGLINKIA> | ||
81 | 49 | <TPREVPGLINK> | ||
82 | 50 | <a href="$PG(TFIRST)$">←First</a> <a href="$PG(TPREV)$">←Prev</a> | ||
83 | 51 | </TPREVPGLINK> | ||
84 | 52 | <TPREVPGLINKIA> | ||
85 | 53 | | ||
86 | 54 | </TPREVPGLINKIA> | ||
87 | 55 | <NEXTPGLINK> | ||
88 | 56 | <a href="$PG(NEXT)$">Next→</a> <a href="$PG(LAST)$">Last→</a> | ||
89 | 57 | </NEXTPGLINK> | ||
90 | 58 | <NEXTPGLINKIA> | ||
91 | 59 | | ||
92 | 60 | </NEXTPGLINKIA> | ||
93 | 61 | <TNEXTPGLINK> | ||
94 | 62 | <a href="$PG(TNEXT)$">Next→</a> <a href="$PG(TLAST)$">Last→</a> | ||
95 | 63 | </TNEXTPGLINK> | ||
96 | 64 | <TNEXTPGLINKIA> | ||
97 | 65 | | ||
98 | 66 | </TNEXTPGLINKIA> | ||
99 | 67 | |||
100 | 68 | <!-- Formatting for the start of list page. | ||
101 | 69 | See http://www.mhonarc.org/MHonArc/doc/resources/listbegin.html. --> | ||
102 | 70 | <LISTBEGIN> | ||
103 | 71 | <p>(<a href="$TIDXFNAME$">go to $TIDXLABEL$</a>)</p> | ||
104 | 72 | <hr/> | ||
105 | 73 | <div style="text-align: left;">$PGLINK(PREV)$ $PGLINK(NEXT)$</div> | ||
106 | 74 | <div style="text-align: center;">$PGLINKLIST(5;5)$</div> | ||
107 | 75 | <ul> | ||
108 | 76 | </LISTBEGIN> | ||
109 | 77 | |||
110 | 78 | <LISTEND> | ||
111 | 79 | </ul> | ||
112 | 80 | <div style="text-align: center;">$PGLINKLIST(5;5)$</div> | ||
113 | 81 | <div style="text-align: left;">$PGLINK(PREV)$ $PGLINK(NEXT)$</div> | ||
114 | 82 | </LISTEND> | ||
115 | 83 | |||
116 | 84 | <!-- Formatting for the start of thread page. | ||
117 | 85 | See http://www.mhonarc.org/MHonArc/doc/resources/thead.html. --> | ||
118 | 86 | <THEAD> | ||
119 | 87 | <p>(<a href="$IDXFNAME$">go to $IDXLABEL$</a>)</p> | ||
120 | 88 | <hr/> | ||
121 | 89 | <div style="text-align: left;">$PGLINK(TPREV)$ $PGLINK(TNEXT)$</div> | ||
122 | 90 | <div style="text-align: center;">$PGLINKLIST(T5;T5)$</div> | ||
123 | 91 | <ul> | ||
124 | 92 | </THEAD> | ||
125 | 93 | |||
126 | 94 | <TFOOT> | ||
127 | 95 | </ul> | ||
128 | 96 | <div style="text-align: center;">$PGLINKLIST(T5;T5)$</div> | ||
129 | 97 | <div style="text-align: left;">$PGLINK(TPREV)$ $PGLINK(TNEXT)$</div> | ||
130 | 98 | </TFOOT> | ||
131 | 99 | |||
132 | 100 | <!-- Per-message formatting on the indexed-by-date main page. --> | ||
133 | 101 | <LITEMPLATE> | ||
134 | 102 | <li><strong>$SUBJECT$</strong> | ||
135 | 103 | <ul><li><em>From</em>: $FROM$, <em>$YYYYMMDD$</em></li></ul> | ||
136 | 104 | </li> | ||
137 | 105 | </LITEMPLATE> | ||
138 | 106 | |||
139 | 107 | <!-- Per-message formatting on the thread page. --> | ||
140 | 108 | <TTOPBEGIN> | ||
141 | 109 | <li><strong>$SUBJECT$</strong>, | ||
142 | 110 | <em><b>$FROMNAME$</b>, $YYYYMMDD$</em> | ||
143 | 111 | </TTOPBEGIN> | ||
144 | 112 | <TLITXT> | ||
145 | 113 | <li><strong>$SUBJECT$</strong>, | ||
146 | 114 | <em><b>$FROMNAME$</b>, $YYYYMMDD$</em> | ||
147 | 115 | </TLITXT> | ||
148 | 116 | <TSINGLETXT> | ||
149 | 117 | <li><strong>$SUBJECT$</strong>, | ||
150 | 118 | <em><b>$FROMNAME$</b>, $YYYYMMDD$</em> | ||
151 | 119 | </TSINGLETXT> | ||
152 | 120 | |||
153 | 121 | <!-- Modify appropriate resources to print our link at the bottom | ||
154 | 122 | of MHonArc generated pages. Notice how the custom resource | ||
155 | 123 | variable defined above can be used to include our link. --> | ||
156 | 124 | |||
157 | 125 | <!-- Main index pages --> | ||
158 | 126 | <IDXPGBEGIN> | ||
159 | 127 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | ||
160 | 128 | "http://www.w3.org/TR/html4/loose.dtd"> | ||
161 | 129 | <html> | ||
162 | 130 | <head> | ||
163 | 131 | <title>$ML-NAME$ mailing list (by date)</title> | ||
164 | 132 | </head> | ||
165 | 133 | <body text="#000000" bgcolor="#FFFFFF"> | ||
166 | 134 | <p><a href="https://launchpad.net/"><img border="0" src="https://launchpad.net/@@/launchpad-logo-and-name.png" alt="Launchpad logo and name."/></a></p> | ||
167 | 135 | <h1><center>$ML-FULL-TITLE$ (by date)</center></h1> | ||
168 | 136 | </IDXPGBEGIN> | ||
169 | 137 | |||
170 | 138 | <IDXPGEND> | ||
171 | 139 | <hr/> | ||
172 | 140 | <p><strong>This is the $ML-FULL-TITLE$— see also the | ||
173 | 141 | general <a href="https://help.launchpad.net/Teams/MailingLists" | ||
174 | 142 | >help for Launchpad.net mailing lists</a>.</strong></p> | ||
175 | 143 | <p><em>(Formatted by <a href="$DOCURL$">MHonArc</a>.)</em></p> | ||
176 | 144 | </body> | ||
177 | 145 | </html> | ||
178 | 146 | </IDXPGEND> | ||
179 | 147 | |||
180 | 148 | <!-- Thread index pages --> | ||
181 | 149 | <TIDXPGBEGIN> | ||
182 | 150 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | ||
183 | 151 | "http://www.w3.org/TR/html4/loose.dtd"> | ||
184 | 152 | <html> | ||
185 | 153 | <head> | ||
186 | 154 | <title>$ML-NAME$ mailing list (by thread)</title> | ||
187 | 155 | </head> | ||
188 | 156 | <body text="#000000" bgcolor="#FFFFFF"> | ||
189 | 157 | <p><a href="https://launchpad.net/"><img border="0" src="https://launchpad.net/@@/launchpad-logo-and-name.png" alt="Launchpad logo and name."/></a></p> | ||
190 | 158 | <h1><center>$ML-FULL-TITLE$ (by thread)</center></h1> | ||
191 | 159 | </TIDXPGBEGIN> | ||
192 | 160 | |||
193 | 161 | <TIDXPGEND> | ||
194 | 162 | <hr/> | ||
195 | 163 | <p><strong>This is the $ML-FULL-TITLE$— see also the | ||
196 | 164 | general <a href="https://help.launchpad.net/Teams/MailingLists" | ||
197 | 165 | >help for Launchpad.net mailing lists</a>.</strong></p> | ||
198 | 166 | <p><em>(Formatted by <a href="$DOCURL$">MHonArc</a>.)</em></p> | ||
199 | 167 | </body> | ||
200 | 168 | </html> | ||
201 | 169 | </TIDXPGEND> | ||
202 | 170 | |||
203 | 171 | <!-- Message pages --> | ||
204 | 172 | <MSGPGBEGIN> | ||
205 | 173 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | ||
206 | 174 | "http://www.w3.org/TR/html4/loose.dtd"> | ||
207 | 175 | <html> | ||
208 | 176 | <head> | ||
209 | 177 | <title>$SUBJECTNA$</title> | ||
210 | 178 | <link rev="made" href="mailto:$FROMADDR$"> | ||
211 | 179 | </head> | ||
212 | 180 | <body text="#000000" bgcolor="#FFFFFF"> | ||
213 | 181 | <p><a href="https://launchpad.net/"><img border="0" src="https://launchpad.net/@@/launchpad-logo-and-name.png" alt="Launchpad logo and name."/></a></p> | ||
214 | 182 | </MSGPGBEGIN> | ||
215 | 183 | |||
216 | 184 | <MSGPGEND> | ||
217 | 185 | <hr/> | ||
218 | 186 | <p><strong>This is the $ML-FULL-TITLE$— see also the | ||
219 | 187 | general <a href="https://help.launchpad.net/Teams/MailingLists" | ||
220 | 188 | >help for Launchpad.net mailing lists</a>.</strong></p> | ||
221 | 189 | <p><em>(Formatted by <a href="$DOCURL$">MHonArc</a>.)</em></p> | ||
222 | 190 | </body> | ||
223 | 191 | </html> | ||
224 | 192 | </MSGPGEND> |
Make some basic improvements to our mailing list archives user interface.
(This is the "low-hanging fruit" part of bug #375557.)
Summary:
--------
When we switched to MHonArc for mailing list archives, the archive chronological and multi-page),
pages became very Web 1.0, looking unlike the rest of Launchpad and
having various usability problems: all the messages in chronological
order on one page (should be reverse-
no indication of what team the mailing list is for, etc.
This branch just brings us back to roughly where we were with
Pipermail on lists.canonical.com / lists.ubuntu.com. It does not
address everything in bug #375557 (which describes many further
improvements we could make to our mailing list archives).
This branch makes the following changes to the mailing list archives:
- Use multi-page indexes, so large archives don't swamp browsers. default- gray.
- Sort messages in reverse chronological order.
- Show the date next to each message on an index page.
- Show the mailing list's name, and link back to the team.
- Give pages a white background, instead of browser-
- Put Launchpad logo in upper left corner.
Proposed fix:
-------------
Create a Launchpad-wide MHonArc control file, to customize the
appearance of mailing list archive pages (both the indexes and the
individual messages). Discussed with Barry and Kiko.
Pre-implementation notes: ------- ------- ----
-------
Barry and I talked a lot. I don't think any issues came up that
need mentioning here. We knew we were aiming for the low-hanging
fruit, and that's what we got.
Implementation details: ------- ------- --
-------
Code changes:
* lib/canonical/ launchpad/ mailman/ monkeypatches/ lp-mhonarc- common. mrc:
New rc file, controls MHonArc behavior.
* lib/canonical/ launchpad/ mailman/ monkeypatches/ __init_ _.py EXTERNAL_ ARCHIVER to define the
(monkey_patch): Add flags to PUBLIC_
mailing list name and point MHonArc to the common rc file. Copy the
rc file to the correct location.
Along the way, I discovered that we were not really set up for testing launchpad. dev", and made two branches to fix that:
changes to "lists.
https:/ /code.edge. launchpad. net/~kfogel/ launchpad/ lists-in- hosts /code.edge. launchpad. net/~kfogel/ launchpad/ lists-testable
https:/
The first has passed EC2 tests and been submitted to PQM. The
second is (in theory) done, but not yet tested.
Tests:
------
Er, see "Demo and Q/A".
Demo and Q/A:
-------------
* Start launchpad.dev with 'make run_all'.
* Log in to launchpad.dev as "<email address hidden>" (this test user
should already exist, and have the appropriate administrative
privileges).
* Create a new team 'mltest'.
* Create a mailing list for that team.
* Approve the mailing list (at http:// launchpad. dev/+mailinglis ts).
* Inject the sample data, which you get from here:
http:// launchpadlibrar ian.net/ 26091302/ lp-ml-test- data.tar. gz
Untar it, cd into the resultant lp-ml-test-data/ directory, and
run "./inject.sh" (while launchpad.dev is running, of course).
There are 999 messages in the data. They're originally from the
...