launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #03723
[Merge] lp:~bac/launchpad/bug-777789-2 into lp:launchpad
Brad Crittenden has proposed merging lp:~bac/launchpad/bug-777789-2 into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #777789 in Launchpad itself: ""Other subscriptions" description of direct team subscription makes no sense"
https://bugs.launchpad.net/launchpad/+bug/777789
For more details, see:
https://code.launchpad.net/~bac/launchpad/bug-777789-2/+merge/62150
= Summary =
Two elements, one with float:right, were bumping into each other.
== Proposed fix ==
Add a surrounding <div> with "display: table" and make each of the
<div>s use "display:table-cell" with appropriate width adjustments and
padding to keep them separated.
== Pre-implementation notes ==
Talks with Gary and Benji.
== Tests ==
None
Screenshots at:
http://people.canonical.com/~bac/other-sub-moderate.png
http://people.canonical.com/~bac/other-sub-absurdly-narrow.png
== Demo and Q/A ==
Subscribe a team to a bug. As a non-administrator of that team, visit
that bug page and click 'Edit bug mail'. Play with browser window
widths to ensure the text flows properly and never touches, leading to a
confusing interpretation.
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/bugs/javascript/subscription.js
--
https://code.launchpad.net/~bac/launchpad/bug-777789-2/+merge/62150
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~bac/launchpad/bug-777789-2 into lp:launchpad.
=== modified file 'lib/lp/bugs/javascript/subscription.js'
--- lib/lp/bugs/javascript/subscription.js 2011-05-24 04:30:46 +0000
+++ lib/lp/bugs/javascript/subscription.js 2011-05-24 15:25:45 +0000
@@ -34,8 +34,8 @@
namespace._reasons = reasons;
/* These are components for team participation. */
-var _OF_TEAM = 'of the team {team}. That team is ';
-var _OF_TEAMS = 'of the teams {teams}. Those teams are ';
+var _OF_TEAM = 'of the team {team}, which is ';
+var _OF_TEAMS = 'of the teams {teams}, which are ';
var _BECAUSE_TEAM_IS = _BECAUSE_YOU_ARE + 'a member ' + _OF_TEAM;
var _ADMIN_BECAUSE_TEAM_IS = (
_BECAUSE_YOU_ARE + 'a member and administrator ' + _OF_TEAM);
@@ -1208,17 +1208,26 @@
* class 'description-text'.
*/
function get_single_description_node(subscription, extra_data) {
- var node = Y.Node.create('<div></div>')
+ var node = Y.Node.create('<div />')
+ .setStyle('display', 'table')
+ .setStyle('width', '100%')
.addClass('subscription-description');
- var action_node = subscription.action(subscription.args);
- if (Y.Lang.isValue(action_node)) {
- node.appendChild(action_node.setStyle('float', 'right'));
- }
node.appendChild(
- Y.Node.create('<div></div>')
+ Y.Node.create('<div />')
.addClass('description-text')
+ .setStyle('display', 'table-cell')
+ .setStyle('width', '60%')
.set('innerHTML',
safely_render_description(subscription, extra_data)));
+ var action_node = subscription.action(subscription.args);
+ if (Y.Lang.isValue(action_node)) {
+ var div = Y.Node.create('<div />');
+ div.appendChild(action_node);
+ div.setStyle('display', 'table-cell')
+ .setStyle('paddingLeft', '5em')
+ .setStyle('text-align', 'right');
+ node.appendChild(div);
+ }
return node;
}
namespace._get_single_description_node = get_single_description_node;