Merge lp:~jcsackett/launchpad/misaligned-details into lp:launchpad

Proposed by j.c.sackett on 2012-07-27
Status: Merged
Approved by: Curtis Hovey on 2012-07-27
Approved revision: no longer in the source branch.
Merged at revision: 15705
Proposed branch: lp:~jcsackett/launchpad/misaligned-details
Merge into: lp:launchpad
Diff against target: 93 lines (+11/-16)
3 files modified
lib/lp/registry/javascript/sharing/granteetable.js (+4/-4)
lib/lp/registry/javascript/sharing/sharingdetails.js (+4/-7)
lib/lp/registry/templates/pillar-sharing-details.pt (+3/-5)
To merge this branch: bzr merge lp:~jcsackett/launchpad/misaligned-details
Reviewer Review Type Date Requested Status
Curtis Hovey (community) code 2012-07-27 Approve on 2012-07-27
Review via email: mp+117118@code.launchpad.net

Commit Message

Fixes cosmetic issues on the sharing and grantee tables in the sharing views.

Description of the Change

Summary
=======
There are a few small cosmetic problems in the sharing details view;
misalignment, and text not spanning the appropriate columns.

Preimp
======
Spoke with Ian Booth, Curtis Hovey.

Implementation
==============
The bug summary in the details table view has been collapsed into one table
cell spanning the same number of columns.

The nothing shared message in details has been updated to cover all columns in
the table.

The main sharing table had a similar problem, resolved by simply reusing the
setup code for when there is nothing shared on the event where the last sharee
is removed.

Tests
=====
bin/test -vvct shar* --layer=YUI

QA
==
Make sure the cosmetic issues are resolved in the sharing views.

LoC
===
This is part of disclosure.

Lint
====

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/registry/javascript/sharing/granteetable.js
  lib/lp/registry/javascript/sharing/sharingdetails.js

To post a comment you must log in.
Curtis Hovey (sinzui) wrote :

Thank you for work with me on IRC to make general revisions the the table layout.

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/registry/javascript/sharing/granteetable.js'
2--- lib/lp/registry/javascript/sharing/granteetable.js 2012-07-23 03:40:33 +0000
3+++ lib/lp/registry/javascript/sharing/granteetable.js 2012-07-27 20:38:23 +0000
4@@ -501,6 +501,7 @@
5 delete_grantees: function(grantees, all_rows_deleted) {
6 var deleted_row_selectors = [];
7 var grantee_table = this.get('grantee_table');
8+ var that = this;
9 Y.Array.each(grantees, function(grantee) {
10 var selector = 'tr[id=permission-' + grantee.name + ']';
11 var table_row = grantee_table.one(selector);
12@@ -515,11 +516,10 @@
13 var delete_rows = function() {
14 rows_to_delete.remove(true);
15 if (all_rows_deleted === true) {
16+ var empty_table_row = Y.Node.create(
17+ that.get('grantee_table_empty_row'));
18 grantee_table.one('tbody')
19- .appendChild('<tr id="grantee-table-not-shared"></tr>')
20- .appendChild('<td></td>')
21- .setContent("This project's private information " +
22- "is not shared with anyone.");
23+ .appendChild(empty_table_row);
24 }
25 };
26 var anim_duration = this.get('anim_duration');
27
28=== modified file 'lib/lp/registry/javascript/sharing/sharingdetails.js'
29--- lib/lp/registry/javascript/sharing/sharingdetails.js 2012-07-20 03:15:04 +0000
30+++ lib/lp/registry/javascript/sharing/sharingdetails.js 2012-07-27 20:38:23 +0000
31@@ -235,7 +235,7 @@
32 if (all_rows_deleted === true) {
33 details_table_body
34 .appendChild('<tr></tr>')
35- .appendChild('<td colspan="4"></td>')
36+ .appendChild('<td colspan="3"></td>')
37 .setContent("There are no shared bugs or branches.");
38 }
39 };
40@@ -279,12 +279,9 @@
41 _bug_details_row_template: function() {
42 return [
43 '<tr id="shared-bug-{{ bug_id }}">',
44- ' <td class="icon right">',
45+ ' <td>',
46 ' <span class="sortkey">{{bug_id}}</span>',
47- ' <span class="sprite bug-{{bug_importance}}"></span>',
48- ' </td>',
49- ' <td class="amount">{{bug_id}}</td>',
50- ' <td>',
51+ ' <span class="sprite bug-{{bug_importance}}">{{bug_id}}</span>',
52 ' <a href="{{web_link}}">{{bug_summary}}</a>',
53 ' </td>',
54 ' <td class="action-icons nowrap">',
55@@ -307,7 +304,7 @@
56 _branch_details_row_template: function() {
57 return [
58 '<tr id="shared-branch-{{ branch_id }}">',
59- ' <td colspan="3">',
60+ ' <td>',
61 ' <span class="sortkey">sorttable_branchsortkey</span>',
62 ' <a class="sprite branch" href="{{web_link}}">',
63 ' {{branch_name}}',
64
65=== modified file 'lib/lp/registry/templates/pillar-sharing-details.pt'
66--- lib/lp/registry/templates/pillar-sharing-details.pt 2012-07-20 03:15:04 +0000
67+++ lib/lp/registry/templates/pillar-sharing-details.pt 2012-07-27 20:38:23 +0000
68@@ -39,14 +39,12 @@
69 </div>
70
71 <table id="shared-table" class="listing sortable">
72+ <col width="auto"/>
73 <col width="20px"/>
74 <col width="auto"/>
75- <col width="auto"/>
76- <col width="auto"/>
77- <col width="auto"/>
78 <thead>
79 <tr>
80- <th colspan="4" width="">
81+ <th colspan="2" width="">
82 Subscribed Bug Report or Branch
83 </th>
84 <th>
85@@ -56,7 +54,7 @@
86 </thead>
87 <tbody id="sharing-table-body">
88 <tr>
89- <td colspan="5">
90+ <td colspan="3">
91 There are no shared bugs or branches.
92 </td>
93 </tr>