Merge lp:~deadlight/ubuntu-cdimage/ubuntu-cdimage into lp:ubuntu-cdimage
- ubuntu-cdimage
- Merge into mainline
Status: | Merged |
---|---|
Merged at revision: | 1763 |
Proposed branch: | lp:~deadlight/ubuntu-cdimage/ubuntu-cdimage |
Merge into: | lp:ubuntu-cdimage |
Diff against target: |
117 lines (+32/-20) 1 file modified
lib/cdimage/tree.py (+32/-20) |
To merge this branch: | bzr merge lp:~deadlight/ubuntu-cdimage/ubuntu-cdimage |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Dimitri John Ledkov (community) | Approve | ||
Steve Langasek | Approve | ||
Review via email: mp+358783@code.launchpad.net |
Commit message
Fix for the nesting of <div>s in the heading of listing pages.
Description of the change
Fix for the nesting of <div>s in the heading of listing pages.
- 1756. By Karl Williams <email address hidden>
-
Remove comment and reformat long line
Karl Williams (deadlight) wrote : | # |
Fixed, sorry about that
Steve Langasek (vorlon) wrote : | # |
I don't think the fix for the nesting worked as intended: http://
Steve Langasek (vorlon) wrote : | # |
I don't think the fix for the nesting worked as intended: http://
Karl Williams (deadlight) wrote : | # |
Hmm, I moved something to the wrong level of the loop.
What parameters are you running the generator with?
On Wed, 14 Nov 2018, 17:26 Steve Langasek, <email address hidden>
wrote:
> I don't think the fix for the nesting worked as intended:
> http://
> --
>
> https:/
> You are the owner of lp:~deadlight/ubuntu-cdimage/ubuntu-cdimage.
>
> Launchpad-
> Launchpad-
> Launchpad-
> Launchpad-Branch: ~deadlight/
> Launchpad-Project: ubuntu-cdimage
>
Steve Langasek (vorlon) wrote : | # |
On Wed, Nov 14, 2018 at 05:39:24PM -0000, Karl Williams wrote:
> What parameters are you running the generator with?
This was:
DIST=bionic make-web-indices .bionic-vanilla/ ubuntu-18.04.1 release
Karl Williams (deadlight) wrote : | # |
Great, thanks. I'll create a similar directory and use those params to test.
Karl Williams (deadlight) wrote : | # |
Ok, I think that *THIS* fixes the HTML nesting.
Steve Langasek (vorlon) wrote : | # |
Thanks, http://
Karl Williams (deadlight) wrote : | # |
Thanks Steve...
Multiple options for images needs something.
- 1759. By Karl Williams <email address hidden>
-
Fix indent dor closing </div> and remove unneeded content
Karl Williams (deadlight) wrote : | # |
I've tested for a single-image build and one with multiple images per release. It all looks good to me.
Steve Langasek (vorlon) wrote : | # |
Yes, http://
Karl Williams (deadlight) wrote : | # |
Dimitri: How's this looking? Can we consider it fixed?
Karl Waghorn-Moyce (karlwaghorn-moyce) wrote : | # |
Dimitri: Did you get the chance to check Karl's updates?
Dimitri John Ledkov (xnox) wrote : | # |
This is ok.
There is a further improvement that I would want to see:
* icons should be vertically centered on the left
* Name column must not be wrapped
* and on mobile, table should be `pannable` (such that it takes more than the width of the page, which one can smudge left/right with thumb - no idea how that is called properly) or, like can we force a vertical layout of rows on mobiles? https:/
Karl Williams (deadlight) wrote : | # |
Dimitri: Thanks for the feedback.
1. I'll override apache's default top alignment here
2. I'll make sure that the name column gets enough space
3. I can, initially, give the table a min-width to enable the side-scrolling behaviour that you described. A vertical layout might work but is a little more complex, especially when we don't have complete control over how the HTML is generated.
Karl Williams (deadlight) wrote : | # |
Dimitri: I've pushed some commits to this branch to make the above improvements.
Preview Diff
1 | === modified file 'lib/cdimage/tree.py' |
2 | --- lib/cdimage/tree.py 2018-11-12 19:19:26 +0000 |
3 | +++ lib/cdimage/tree.py 2018-11-28 13:21:16 +0000 |
4 | @@ -1195,7 +1195,12 @@ |
5 | for css in self.cssincludes(): |
6 | print(" @import url(%s);" % css, file=header) |
7 | print(dedent("""\ |
8 | + .p-table-wrapper { |
9 | + overflow-x: scroll; |
10 | + } |
11 | + |
12 | table { |
13 | + min-width: 984px; |
14 | width: 100%; |
15 | } |
16 | |
17 | @@ -1206,8 +1211,28 @@ |
18 | |
19 | th:first-child, |
20 | td:first-child { |
21 | + vertical-align: inherit; |
22 | width: 5%; |
23 | } |
24 | + |
25 | + th:nth-of-type(2), |
26 | + td:nth-of-type(2) { |
27 | + width: 20em; |
28 | + } |
29 | + |
30 | + th:nth-of-type(3), |
31 | + td:nth-of-type(3) { |
32 | + width: 12em; |
33 | + } |
34 | + |
35 | + th:nth-of-type(4), |
36 | + td:nth-of-type(4) { |
37 | + width: 6em; |
38 | + } |
39 | + |
40 | + th:nth-of-type(5), |
41 | + td:nth-of-type(5) { |
42 | + } |
43 | </style> |
44 | """), file=header) |
45 | if self.project == "kubuntu": |
46 | @@ -1326,8 +1351,6 @@ |
47 | "https://help.ubuntu.com/community/BitTorrent", "BitTorrent") |
48 | |
49 | for prefix in prefixes: |
50 | - print('<div class="row p-divider"><div class="p-card">', |
51 | - file=header) |
52 | for publish_type in all_publish_types: |
53 | if not self.find_images(directory, prefix, publish_type): |
54 | continue |
55 | @@ -1365,6 +1388,8 @@ |
56 | if not paths: |
57 | continue |
58 | |
59 | + print('<div class="row p-divider"><div class="p-card">', |
60 | + file=header) |
61 | cdtypestr = self.cdtypestr(publish_type, image_format) |
62 | print('<div class="col-6 p-divider__block">', |
63 | file=header) |
64 | @@ -1376,20 +1401,6 @@ |
65 | print(tag, file=header) |
66 | print(file=header) |
67 | |
68 | - if len(paths) == 1: |
69 | - print( |
70 | - "<p>There is one image available:</p>", |
71 | - file=header) |
72 | - elif publish_type == "src": |
73 | - print( |
74 | - "<p>There are %s images available:</p>" % |
75 | - self.numbers[len(paths)], file=header) |
76 | - else: |
77 | - print( |
78 | - "<p>There are %s images available, each for a " |
79 | - "different type of computer:</p>" % |
80 | - self.numbers[len(paths)], file=header) |
81 | - |
82 | print(file=header) |
83 | |
84 | print('</div>', file=header) |
85 | @@ -1424,7 +1435,6 @@ |
86 | self.titlecase(cdtypestr), archstr) |
87 | archdesc = self.archdesc(arch, publish_type) |
88 | |
89 | - print("<div>", file=header) |
90 | if os.path.exists(path): |
91 | print( |
92 | "<a href=\"%s\">%s</a>" % |
93 | @@ -1492,9 +1502,9 @@ |
94 | htaccessimagestr, extstr, |
95 | os.path.basename(extpath)), |
96 | file=htaccess) |
97 | - print("</div>", file=header) |
98 | print('</div>', file=header) |
99 | - print('</div></div>', file=header) |
100 | + print('</div></div>', file=header) |
101 | + |
102 | published_ec2_path = os.path.join( |
103 | directory, "published-ec2-%s.txt" % status) |
104 | if os.path.exists(published_ec2_path): |
105 | @@ -1616,9 +1626,11 @@ |
106 | print(tag, file=header) |
107 | print(file=header) |
108 | |
109 | + print("<div class='p-table-wrapper'>", file=header) |
110 | + |
111 | print( |
112 | dedent("""\ |
113 | - </div></div></div> |
114 | + </div></div></div></div> |
115 | <footer class="p-footer"> |
116 | <div class="row"> |
117 | <p><small>© 2018 Canonical Ltd. Ubuntu and Canonical |
Could you please run ./run-tests from the tree before pushing?
....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... /lib/cdimage/ tree.py: 1340:25: E129 visually indented line with same indent as next logical line tree.py: 1340:60: E202 whitespace before ')' tree.py: 1341:80: E501 line too long (93 > 79 characters) tree.py: 1495:59: E261 at least two spaces before inline comment tree.py: 1495:60: E262 inline comment should start with '# ' ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ...... ======= ======= ======= ======= ======= ======= ======= ======= ======= tests.test_ static. TestStatic) ------- ------- ------- ------- ------- ------- ------- ------- ------- vorlon/ devel/canonical /cdimage/ lib/cdimage/ tests/test_ static. py", line 63, in test_pep8_clean assertEqual( 0, len(output))
./lib/cdimage/
./lib/cdimage/
./lib/cdimage/
./lib/cdimage/
F......
=======
FAIL: test_pep8_clean (cdimage.
-------
Traceback (most recent call last):
File "/home/
self.
AssertionError: 0 != 5
------- ------- ------- ------- ------- ------- ------- ------- ------- -------
Ran 580 tests in 9.908s
FAILED (failures=1)