Merge lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/navi into lp:ubuntu-ui-toolkit
- navi
- Merge into trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Cris Dywan | ||||
Approved revision: | 530 | ||||
Merged at revision: | 558 | ||||
Proposed branch: | lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/navi | ||||
Merge into: | lp:ubuntu-ui-toolkit | ||||
Diff against target: |
250 lines (+108/-10) 12 files modified
documentation/css/breadcrumbs.js (+21/-0) documentation/css/scratch.css (+31/-5) documentation/fix-markup.sh (+22/-0) documentation/ubuntu-ui-toolkit-common.qdocconf (+0/-1) documentation/ubuntu-ui-toolkit-offline.qdocconf (+2/-0) documentation/ubuntu-ui-toolkit-online.qdocconf (+4/-0) modules/Ubuntu/Components/all-modules.qdoc (+22/-0) modules/Ubuntu/Components/overview.qdoc (+1/-2) modules/Ubuntu/Components/resolution-independence.qdoc (+1/-1) modules/Ubuntu/Components/ubuntu-components-theming.qdoc (+1/-0) modules/Ubuntu/Components/ubuntu-components.qdoc (+2/-1) ubuntu-sdk.pro (+1/-0) |
||||
To merge this branch: | bzr merge lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/navi | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot | continuous-integration | Approve | |
David Planella (community) | Approve | ||
Ubuntu SDK team | Pending | ||
Review via email: mp+165617@code.launchpad.net |
Commit message
Implement bread crumbs in API docs
Description of the change
Implement bread crumbs in API docs
PS Jenkins bot (ps-jenkins) wrote : | # |
David Planella (dpm) wrote : | # |
Nice one, looking forward to seeing navigation!
A few things I've noticed:
1) There are some changes required to the docs done by the documentation/
51 +sed -r -i 's@("main-
2) When running the ./generate_html.sh script locally I get this warning:
$ ./generate_html.sh
/tmp/navi/
3) The tables on the home page should not be full width, there seems to be a regression on the layout of the home page. I.e.:
In this branch:
http://
Expected:
http://
4) There are no breadcrumbs on the "Basic QML Types" page, and thus no way to go back to the home page [1]
5) The same for the pages for topics such as theming: there are no breadcrumbs there and one cannot go back to the home page [1]
http://
6) Just a nitpick, but if technically possible, 'ubuntu' should be capitalized as 'Ubuntu' on the 'Modules ubuntu' line at the top of the home page [1].
[1] http://
Cris Dywan (kalikiana) wrote : | # |
1)2) Rebased on the 'online' branch and moved the sed into a script to be called from 'make docs'.
3) I apologize, it came up when discussing the new styling and I thought it was a bug, reverted that.
4)5)6) Fixed
David Planella (dpm) wrote : | # |
Great, thanks. There are still a couple of things. I'm not sure if they're all related to the same issue, but here are the ones that I've noticed:
1) Breadcrumbs appear reversed:
I.e.:
http://
- Expected: "Overview > Theming Ubuntu Components"
- Actual: "Theming Ubuntu Components Overview >"
2) Last breadcrumb missing:
- Expected: "Basic QML Types"
- Actual: ""
3) Unrelated breadcrumbs:
- Expected: "Overview > Basic QML Types"
- Actual: "Resolution Independence > Overview" (reversed as per pint 1), but notice the unrelated "Resolution Independence" here)
4) Inconsistent navigation
In some pages the home page is called "Overview >", whereas in others it is "Modules > Ubuntu". E.g.
- "Overview": http://
- "Ubuntu": http://
David Planella (dpm) wrote : | # |
5) Duplicate breadcrumbs
See the bottom of the page at [1]
6) Wider top margin of breadcrumb underline
Compare the distance between the breadcrumb text and its underline on [1] and [2] and see the difference.
[1] http://
[2] http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:516
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Cris Dywan (kalikiana) wrote : | # |
6) Wider top margin of breadcrumb underline
cf. qmlmodule-
Depending on the page a <p> is used or isn't by the generated HTML, which I added work-arounds for. It should be better now.
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:518
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Cris Dywan (kalikiana) wrote : | # |
3) qmlmodule-
- Expected: "Overview > Basic QML Types"
- Actual: "Resolution Independence > Overview" unrelated "Resolution Independence" here)
Fixed
Cris Dywan (kalikiana) wrote : | # |
Re-cap of the currently unresolved issues:
1) theming-
- Expected: "Overview > Theming Ubuntu Components"
- Actual: "Theming Ubuntu Components Overview >"
5) Duplicate breadcrumbs in qmlmodule-
2) qmlmodule-
- Expected: "Basic QML Types"
- Actual: ""
Here I'm running into wrongly generated HTML which can't be fixed easily with a regular expression. Unsure.
4) Inconsistent navigation
In some pages the home page is called "Overview >", whereas in others it is "Modules > Ubuntu"
cf. all-modules.html ubuntu-module.html
Overview is not the same Modules, which is actually empty at this point, it's qdoc standard behavior to generate theses pages in this way.
I'd like to know what you may expect here instead. An option might be to forcibly hide it if we don't have a use for it (yet).
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:521
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
David Planella (dpm) wrote : | # |
What I meant was consistency in the breadcrumb names. Right now, in HTML page terms, we've got the following:
- all-modules.html > ubuntu-module.html
On http://
1) All Modules > Overview
On http://
2) Modules > Ubuntu
Both 1) and 2) refer to the same locations, yet different names are used for the breadcrumbs. We should pick one of the naming schemes and stick to that.
Cris Dywan (kalikiana) wrote : | # |
I think you've got an outdated version there, let me push the re-based branch to be sure we're on the same page (no pun intended).
Cris Dywan (kalikiana) wrote : | # |
I apologize, qmake sucks and again fooled me into seeing something that shouldn't be there. It somehow changes between generating and not generating that page without any obvious action taken.
Cris Dywan (kalikiana) wrote : | # |
There must be a race condition and I can't track down why. I tried using && instead of ; in the .pro file to no avail.
Cris Dywan (kalikiana) wrote : | # |
Reported the race condition upstream https:/
For now the modules page is disabled and that also settles the naming inconsistency.
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:524
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
David Planella (dpm) wrote : | # |
Updated online docs for testing at http://
David Planella (dpm) wrote : | # |
As requested by Christian, here's the feedback after reviewing. Here are the existing known issues:
1) Breadcrumbs appear reversed: http://
2) Last breadcrumb missing: http://
5) Duplicate breadcrumbs in http://
And here is one I've noticed was fixed but then manifested in a different way:
4) Inconsistent navigation
The root page is called "Overview" in the breadcrumbs:
http://
But on the root page itself, it's called "Ubuntu User Interface Toolkit" in the breadcrumbs:
http://
I'd recommend settling on one of the two (either "Overview" or "Ubuntu User Interface Toolkit") and use it throughout the docs.
Cris Dywan (kalikiana) wrote : | # |
1,2,5) These are non-trivial qdoc bugs, the generated HTML is wrong. I'm reluctant to add special cases that would require magic command lines for all new doc pages. Btw Qt5 docs are differently produced, if you see bread crumbs there that's not something we can use (short of a complete rethink of how our docs are generated).
4) I guess I didn't follow your train of thought before. I'll stop using the term "Overview".
- 525. By Cris Dywan
-
Stop using Overview to refer to the contents page
- 526. By Cris Dywan
-
Remove navigation to Basic QML Types from RI
- 527. By Cris Dywan
-
Change the bread crumb CSS to correct the order
- 528. By Cris Dywan
-
Replace Basic QML Types with UUITK in component pages
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:527
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:528
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
- 529. By Cris Dywan
-
Use JQuery to re-order bread crumbs
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:529
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
David Planella (dpm) wrote : | # |
Looks great now, thank you for your excellent work on this. This is going to be a major improvement in the API documentation for app developers.
Here are the online pages generated from the latest branch revision:
http://
- 530. By Cris Dywan
-
Add a license header to breadcrumbs.js
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:530
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Preview Diff
1 | === added file 'documentation/css/breadcrumbs.js' |
2 | --- documentation/css/breadcrumbs.js 1970-01-01 00:00:00 +0000 |
3 | +++ documentation/css/breadcrumbs.js 2013-06-27 10:58:25 +0000 |
4 | @@ -0,0 +1,21 @@ |
5 | +/* |
6 | + * Copyright 2013 Canonical Ltd. |
7 | + * |
8 | + * This program is free software; you can redistribute it and/or modify |
9 | + * it under the terms of the GNU Lesser General Public License as published by |
10 | + * the Free Software Foundation; version 3. |
11 | + * |
12 | + * This program is distributed in the hope that it will be useful, |
13 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | + * GNU Lesser General Public License for more details. |
16 | + * |
17 | + * You should have received a copy of the GNU Lesser General Public License |
18 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 | + */ |
20 | + |
21 | +$(document).ready(function(){ |
22 | + var ul = $("ul.breadcrumb"); |
23 | + var li = ul.children("li:has(a)").remove(); |
24 | + ul.prepend(li); |
25 | +}); |
26 | |
27 | === modified file 'documentation/css/scratch.css' |
28 | --- documentation/css/scratch.css 2013-06-25 05:36:50 +0000 |
29 | +++ documentation/css/scratch.css 2013-06-27 10:58:25 +0000 |
30 | @@ -1,16 +1,12 @@ |
31 | body { |
32 | margin: 0; |
33 | } |
34 | - |
35 | - |
36 | div.toc ul { |
37 | padding: 0; |
38 | } |
39 | - |
40 | div.toc li { |
41 | margin-bottom: 3px; |
42 | } |
43 | - |
44 | h1.title { |
45 | font-size: 36px; |
46 | line-height: 1.1; |
47 | @@ -32,7 +28,6 @@ |
48 | border-radius: 0; |
49 | white-space: pre-wrap; |
50 | } |
51 | - |
52 | .annotated td { |
53 | padding: 0.8em 1em 0.3em; |
54 | } |
55 | @@ -60,3 +55,34 @@ |
56 | top: 100px; |
57 | width: 250px; |
58 | } |
59 | +.breadcrumb { |
60 | + position: relative; |
61 | + left: -270px; |
62 | + top: 30px; |
63 | + width: auto; |
64 | + padding-bottom: 30px; |
65 | + margin-bottom: 30px; |
66 | + float:left; |
67 | +} |
68 | +.breadcrumb li { |
69 | + float: left; |
70 | + margin-right: 8px; |
71 | +} |
72 | +.breadcrumb a:link, |
73 | +.breadcrumb a:visited { |
74 | + color: #AEA79F; |
75 | +} |
76 | +.breadcrumb a:after { |
77 | + content: '\0000a0\0000a0 >'; |
78 | +} |
79 | +.title { |
80 | + margin-top: 50px; |
81 | + clear:both; |
82 | +} |
83 | +.breadcrumb + .toc { |
84 | + top: 170px; |
85 | +} |
86 | +.breadcrumb p { |
87 | + display: inline; |
88 | +} |
89 | + |
90 | |
91 | === added file 'documentation/fix-markup.sh' |
92 | --- documentation/fix-markup.sh 1970-01-01 00:00:00 +0000 |
93 | +++ documentation/fix-markup.sh 2013-06-27 10:58:25 +0000 |
94 | @@ -0,0 +1,22 @@ |
95 | +#!/bin/sh |
96 | +# |
97 | +# Copyright 2012 Canonical Ltd. |
98 | +# |
99 | +# This program is free software; you can redistribute it and/or modify |
100 | +# it under the terms of the GNU Lesser General Public License as published by |
101 | +# the Free Software Foundation; version 3. |
102 | +# |
103 | +# This program is distributed in the hope that it will be useful, |
104 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
105 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
106 | +# GNU Lesser General Public License for more details. |
107 | +# |
108 | +# You should have received a copy of the GNU Lesser General Public License |
109 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
110 | +# |
111 | + |
112 | +sed -r -i 's@("main-content">)@\1<ul class="breadcrumb">@g' $1/html/*.html |
113 | +sed -r -i 's@(<div class="toc">|<h1 class="title">)@</ul>\1@g' $1/html/*.html |
114 | +sed -r -i 's@(</p>)<p/>@\1@g' $1/html/*.html |
115 | +sed -r -i 's@(<a class="(next|prev)Page" href=".+">)(.+)(</a>)@<li>\1\3\4</li>@g' $1/html/*.html |
116 | +sed -r -i 's@(href="qmlmodule-ubuntu-components0-ubuntu-components-0-1.html">Basic QML Types)@href="overview-ubuntu-sdk.html">Ubuntu User Interface Toolkit@g' $1/html/*.html |
117 | |
118 | === modified file 'documentation/ubuntu-ui-toolkit-common.qdocconf' |
119 | --- documentation/ubuntu-ui-toolkit-common.qdocconf 2013-06-24 09:42:43 +0000 |
120 | +++ documentation/ubuntu-ui-toolkit-common.qdocconf 2013-06-27 10:58:25 +0000 |
121 | @@ -17,5 +17,4 @@ |
122 | outputencoding = UTF-8 |
123 | |
124 | HTML.templatedir = . |
125 | -HTML.nobreadcrumbs = "true" |
126 | HTML.endheader = "</head>\n" |
127 | |
128 | === modified file 'documentation/ubuntu-ui-toolkit-offline.qdocconf' |
129 | --- documentation/ubuntu-ui-toolkit-offline.qdocconf 2013-05-02 19:46:36 +0000 |
130 | +++ documentation/ubuntu-ui-toolkit-offline.qdocconf 2013-06-27 10:58:25 +0000 |
131 | @@ -1,6 +1,8 @@ |
132 | include(ubuntu-ui-toolkit-common.qdocconf) |
133 | +HTML.nobreadcrumbs = "true" |
134 | |
135 | HTML.stylesheets = \ |
136 | + documentation/css/breadcrumbs.js \ |
137 | documentation/css/reset.css \ |
138 | documentation/css/qtquick.css \ |
139 | documentation/css/base.css \ |
140 | |
141 | === modified file 'documentation/ubuntu-ui-toolkit-online.qdocconf' |
142 | --- documentation/ubuntu-ui-toolkit-online.qdocconf 2013-05-27 08:45:27 +0000 |
143 | +++ documentation/ubuntu-ui-toolkit-online.qdocconf 2013-06-27 10:58:25 +0000 |
144 | @@ -2,7 +2,11 @@ |
145 | include(ubuntu-appdev-site-header.qdocconf) |
146 | include(ubuntu-appdev-site-footer.qdocconf) |
147 | |
148 | +HTML.nobreadcrumbs = "false" |
149 | + |
150 | HTML.headerstyles = \ |
151 | + "<script src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js\"></script>\n" \ |
152 | + "<script type=\"text/javascript\" src=\"style/breadcrumbs.js\"></script>\n" \ |
153 | "<link rel=\"stylesheet\" type=\"text/css\" href=\"http://fonts.googleapis.com/css?family=Ubuntu:400,400italic\">\n" \ |
154 | "<link rel=\"stylesheet\" type=\"text/css\" href=\"http://fonts.googleapis.com/css?family=Ubuntu+Mono:400\">\n" \ |
155 | "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/reset.css\" />\n" \ |
156 | |
157 | === added file 'modules/Ubuntu/Components/all-modules.qdoc' |
158 | --- modules/Ubuntu/Components/all-modules.qdoc 1970-01-01 00:00:00 +0000 |
159 | +++ modules/Ubuntu/Components/all-modules.qdoc 2013-06-27 10:58:25 +0000 |
160 | @@ -0,0 +1,22 @@ |
161 | +/* |
162 | + * Copyright 2013 Canonical Ltd. |
163 | + * |
164 | + * This program is free software; you can redistribute it and/or modify |
165 | + * it under the terms of the GNU Lesser General Public License as published by |
166 | + * the Free Software Foundation; version 3. |
167 | + * |
168 | + * This program is distributed in the hope that it will be useful, |
169 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
170 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
171 | + * GNU Lesser General Public License for more details. |
172 | + * |
173 | + * You should have received a copy of the GNU Lesser General Public License |
174 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
175 | + */ |
176 | + |
177 | +/*! |
178 | + \page all-modules.html |
179 | + \title All Modules |
180 | + \nextpage {Ubuntu User Interface Toolkit} |
181 | +*/ |
182 | + |
183 | |
184 | === modified file 'modules/Ubuntu/Components/overview.qdoc' |
185 | --- modules/Ubuntu/Components/overview.qdoc 2013-06-25 13:42:22 +0000 |
186 | +++ modules/Ubuntu/Components/overview.qdoc 2013-06-27 10:58:25 +0000 |
187 | @@ -17,7 +17,6 @@ |
188 | /*! |
189 | \page overview-ubuntu-sdk.html overview |
190 | \title Ubuntu User Interface Toolkit |
191 | - \contentspage {Ubuntu User Interface Toolkit} {Contents} |
192 | |
193 | \part General Topics |
194 | \list |
195 | @@ -30,7 +29,7 @@ |
196 | for them to behave well on a variety of devices. |
197 | \endlist |
198 | |
199 | - \part Base Items |
200 | + \part Basic QML Types |
201 | Available through: |
202 | \code |
203 | import Ubuntu.Components 0.1 |
204 | |
205 | === modified file 'modules/Ubuntu/Components/resolution-independence.qdoc' |
206 | --- modules/Ubuntu/Components/resolution-independence.qdoc 2013-04-20 01:52:21 +0000 |
207 | +++ modules/Ubuntu/Components/resolution-independence.qdoc 2013-06-27 10:58:25 +0000 |
208 | @@ -17,7 +17,7 @@ |
209 | /*! |
210 | \page resolution-independence.html resolution-independence |
211 | \title Resolution Independence |
212 | - \contentspage {Ubuntu User Interface Toolkit} |
213 | + \nextpage {Ubuntu User Interface Toolkit} |
214 | |
215 | The objective of resolution independence is to make it easy for graphical |
216 | user interfaces in Ubuntu to scale to all the form factors that Ubuntu |
217 | |
218 | === modified file 'modules/Ubuntu/Components/ubuntu-components-theming.qdoc' |
219 | --- modules/Ubuntu/Components/ubuntu-components-theming.qdoc 2013-03-13 09:16:25 +0000 |
220 | +++ modules/Ubuntu/Components/ubuntu-components-theming.qdoc 2013-06-27 10:58:25 +0000 |
221 | @@ -18,6 +18,7 @@ |
222 | \page theming-components.html |
223 | \ingroup theming-description |
224 | \title Theming Ubuntu Components |
225 | + \nextpage {Ubuntu User Interface Toolkit} |
226 | |
227 | \b{The theming is under heavy development, therefore changes may occur leaving |
228 | the documentation out of date.} |
229 | |
230 | === modified file 'modules/Ubuntu/Components/ubuntu-components.qdoc' |
231 | --- modules/Ubuntu/Components/ubuntu-components.qdoc 2013-02-26 10:30:04 +0000 |
232 | +++ modules/Ubuntu/Components/ubuntu-components.qdoc 2013-06-27 10:58:25 +0000 |
233 | @@ -16,5 +16,6 @@ |
234 | |
235 | /*! |
236 | \qmlmodule Ubuntu.Components 0.1 |
237 | - \title Base Items |
238 | + \title Basic QML Types |
239 | + \nextpage {Ubuntu User Interface Toolkit} |
240 | */ |
241 | |
242 | === modified file 'ubuntu-sdk.pro' |
243 | --- ubuntu-sdk.pro 2013-06-04 09:42:07 +0000 |
244 | +++ ubuntu-sdk.pro 2013-06-27 10:58:25 +0000 |
245 | @@ -43,5 +43,6 @@ |
246 | docs.commands += test ! -s $$DOC_PATH/qdoc.err || exit 1; |
247 | docs.commands += qhelpgenerator -o "$$DOC_PATH/html/ubuntuuserinterfacetoolkit.qch" "$$DOC_PATH/html/ubuntuuserinterfacetoolkit.qhp"; |
248 | docs.commands += qdoc $$DOC_PATH/ubuntu-ui-toolkit-online.qdocconf; |
249 | +docs.commands += $$DOC_PATH/fix-markup.sh $$DOC_PATH; |
250 | QMAKE_EXTRA_TARGETS += docs |
251 |
PASSED: Continuous integration, rev:512 jenkins. qa.ubuntu. com/job/ ubuntu- ui-toolkit- ci/123/ jenkins. qa.ubuntu. com/job/ ubuntu- ui-toolkit- raring- amd64-ci/ 123 jenkins. qa.ubuntu. com/job/ ubuntu- ui-toolkit- raring- armhf-ci/ 123 jenkins. qa.ubuntu. com/job/ ubuntu- ui-toolkit- raring- armhf-ci/ 123/artifact/ work/output/ *zip*/output. zip
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild: s-jenkins: 8080/job/ ubuntu- ui-toolkit- ci/123/ rebuild
http://