Merge lp:~akshaytayal/loco-team-portal/fixes-616383 into lp:loco-team-portal

Proposed by Akshay
Status: Rejected
Rejected by: Adnane Belmadiaf
Proposed branch: lp:~akshaytayal/loco-team-portal/fixes-616383
Merge into: lp:loco-team-portal
Diff against target: 92 lines (+58/-3)
3 files modified
loco_directory/media/css/newstyle.css (+26/-0)
loco_directory/templates/events/team_event_detail.html (+16/-0)
loco_directory/templates/events/team_event_detail_comments.inc.html (+16/-3)
To merge this branch: bzr merge lp:~akshaytayal/loco-team-portal/fixes-616383
Reviewer Review Type Date Requested Status
Chris Johnston Needs Fixing
Review via email: mp+54246@code.launchpad.net

Description of the change

Added the ability to directly link to a comment.

To post a comment you must log in.
Revision history for this message
Ronnie (ronnie.vd.c) wrote :

I played a bit with the css, and i think that the next css wil give a better result:

tr.comment.active {
    border-bottom: 2px dotted #DD4814;
    border-top: 2px dotted #DD4814;
}

Revision history for this message
Ronnie (ronnie.vd.c) wrote :

When there is a short comment, the table width is not 100%, which looks not very good. To prevent this. add the following code:

HTML, the name, comment-txt and link shoud have the following classes:
class="comment-name"
class="comment-comment"
class="comment-link"

Add this to your css (and remove the old .active - at the bottom):

#team-event-comments {
    width: 100%;
}

.comment {
    font-size: 0.8em;
}

.comment.active {
    background-color: #f7f7f7;
    border-bottom: 1px dotted #DD4814;
    border-top: 1px dotted #DD4814;
    margin: 0;
}

.comment-name {
    width: 0;
    padding-right: 8px;
}

.comment-link {
    padding-left: 8px;
    width: 0px;
}

With these changes, it looks a bit more consistent

Revision history for this message
Akshay (akshaytayal) wrote :

hi Ronnie,

Thanks for considering it again and sorry for late reply... :p.. I will make
these changes and commit it asap.

Akshay

On Mon, Apr 4, 2011 at 5:32 PM, Ronnie <email address hidden> wrote:

> When there is a short comment, the table width is not 100%, which looks not
> very good. To prevent this. add the following code:
>
> HTML, the name, comment-txt and link shoud have the following classes:
> class="comment-name"
> class="comment-comment"
> class="comment-link"
>
>
> Add this to your css (and remove the old .active - at the bottom):
>
> #team-event-comments {
> width: 100%;
> }
>
> .comment {
> font-size: 0.8em;
> }
>
> .comment.active {
> background-color: #f7f7f7;
> border-bottom: 1px dotted #DD4814;
> border-top: 1px dotted #DD4814;
> margin: 0;
> }
>
> .comment-name {
> width: 0;
> padding-right: 8px;
> }
>
> .comment-link {
> padding-left: 8px;
> width: 0px;
> }
>
>
> With these changes, it looks a bit more consistent
> --
>
> https://code.launchpad.net/~akshaytayal/loco-directory/fixes-616383/+merge/54246
> You are the owner of lp:~akshaytayal/loco-directory/fixes-616383.
>

Revision history for this message
Adnane Belmadiaf (daker) wrote :

It looks good to me, can we merge it ?

Revision history for this message
Chris Johnston (cjohnston) wrote :

I think that this section could be made to look better.. Currently the way that you have it, there is some text that is too small.. I'm thinking that it should look a little more like how Launchpad comments look. I've made a quick little drawing http://dl.dropbox.com/u/2494160/2011-06-10_14-55-14_739.jpg - The top are where the user name is should match the design guidelines and have a grey background similar to the background of the thead in the CSS. The text in this top area should probably also be bold, and white. Please let me know if you need any more assistance with this. Sorry that it has taken so long to get back to you.

Revision history for this message
Chris Johnston (cjohnston) :
review: Needs Fixing
Revision history for this message
Adnane Belmadiaf (daker) wrote :

I have made a new one base on your code, thanks for your work.

Revision history for this message
Akshay (akshaytayal) wrote :

I learned a lot while working on this.

Than you!!
Akshay

On Sun, Sep 16, 2012 at 4:01 AM, Adnane Belmadiaf <email address hidden>wrote:

> I have made a new one base on your code, thanks for your work.
> --
>
> https://code.launchpad.net/~akshaytayal/loco-team-portal/fixes-616383/+merge/54246
> You are the owner of lp:~akshaytayal/loco-team-portal/fixes-616383.
>

Revision history for this message
Adnane Belmadiaf (daker) wrote :

Thanks for your work, this has been implemented now.

Unmerged revisions

423. By Akshay

Modified the code of table width for the short comments.

422. By Akshay

Changed the style for the border of the selected comment

421. By Akshay

Added the ability to directly link to a comment

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'loco_directory/media/css/newstyle.css'
2--- loco_directory/media/css/newstyle.css 2011-03-15 13:08:01 +0000
3+++ loco_directory/media/css/newstyle.css 2011-04-09 11:05:51 +0000
4@@ -479,3 +479,29 @@
5 position: absolute;
6 right: 10px;
7 }
8+
9+#team-event-comments {
10+ width: 100%;
11+}
12+
13+.comment {
14+ font-size: 1.0em;
15+}
16+
17+.comment.active {
18+ background-color: #f7f7f7;
19+ border-bottom: 1px dotted #DD4814;
20+ border-top: 1px dotted #DD4814;
21+ margin: 0;
22+}
23+
24+.comment-name {
25+ width: 0;
26+ padding-right: 8px;
27+}
28+
29+.comment-link {
30+ padding-left: 8px;
31+ width: 0px;
32+}
33+
34
35=== modified file 'loco_directory/templates/events/team_event_detail.html'
36--- loco_directory/templates/events/team_event_detail.html 2011-03-16 17:20:55 +0000
37+++ loco_directory/templates/events/team_event_detail.html 2011-04-09 11:05:51 +0000
38@@ -3,6 +3,22 @@
39
40 {% block title %}{% trans team_event_object.name %} | {% trans "Ubuntu LoCo Team Directory" %} {% endblock %}
41
42+{% block extrahead %}{{ block.super }}
43+ <script type="text/javascript">
44+ //<![CDATA[
45+ $(function () {
46+ $(location.hash).addClass('active');
47+ $('.comment-link').click(function () {
48+ setTimeout(function () {
49+ $('tr.comment').removeClass('active');
50+ $(location.hash).addClass('active');
51+ }, 100);
52+ });
53+ });
54+ //]]>
55+ </script>
56+{% endblock %}
57+
58 {% block sub_nav_links %}
59 <a class="sub-nav-item" href="{% url event-list %}">{% trans "Back to Events List" %}</a>
60 <a class="sub-nav-item" href="{% url team-event-comment-new team_event_object.first_team.lp_name team_event_object.id %}#comment">{% trans "Add Comment" %}</a>
61
62=== modified file 'loco_directory/templates/events/team_event_detail_comments.inc.html'
63--- loco_directory/templates/events/team_event_detail_comments.inc.html 2011-03-16 17:20:55 +0000
64+++ loco_directory/templates/events/team_event_detail_comments.inc.html 2011-04-09 11:05:51 +0000
65@@ -13,11 +13,24 @@
66 <th class="form-item-label" scope="row" colspan=2><label>{{comment_date.grouper}}</label></th>
67 </tr>
68 {% for comment in comment_date.list %}
69- <tr>
70- <th class="form-item-label" scope="row"><label><a href="https://launchpad.net/~{{comment.commenter_profile.user.username}}">{{comment.commenter_profile.realname}}</a>:</label></th>
71- <td class="form-item-value">{{comment.comment}}</td>
72+ <tr name="{{ forloop.counter }}" id="{{ forloop.counter }}" class="comment">
73+ <th class="form-item-label class-name" scope="row"><label><a href="https://launchpad.net/~{{comment.commenter_profile.user.username}}">{{comment.commenter_profile.realname}}</a>:</label></th>
74+ <td class="form-item-value comment-comment">{{comment.comment}}</td>
75+ <td class="form-item-value comment-link"><a href="#{{ forloop.counter }}">#{{ forloop.counter }}</a></td>
76 </tr>
77 {% endfor %}
78 {% endfor %}
79 </table>
80 {% endif %}
81+
82+
83+
84+
85+
86+
87+
88+
89+
90+
91+
92+

Subscribers

People subscribed via source and target branches