Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id B43DDE007C2; Mon, 9 Jan 2017 12:34:00 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, * medium trust * [134.134.136.31 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 25DC5E004A0 for ; Mon, 9 Jan 2017 12:33:58 -0800 (PST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP; 09 Jan 2017 12:33:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,341,1477983600"; d="asc'?scan'208";a="47220783" Received: from jalamego-mobl2.zpn.intel.com (HELO [10.219.5.138]) ([10.219.5.138]) by orsmga004.jf.intel.com with ESMTP; 09 Jan 2017 12:33:57 -0800 To: Khem Raj References: <1483714246-6857-1-git-send-email-jose.a.lamego@linux.intel.com> <8a451c7c-4da2-4aca-e6f5-ead626045c27@linux.intel.com> From: Jose Lamego Message-ID: Date: Mon, 9 Jan 2017 14:34:01 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Cc: "yocto@yoctoproject.org" , Jose Lamego Subject: Re: [patchwork][PATCH] patchwork/templates/patchwork/series: Improve series view X-BeenThere: yocto@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Discussion of all things Yocto Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 20:34:00 -0000 X-Groupsio-MsgNum: 33721 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="938RMwbgubEj8uB3lLSldONrR3oDVdtgx" --938RMwbgubEj8uB3lLSldONrR3oDVdtgx Content-Type: multipart/mixed; boundary="71o2mcWpGtd54UudFvMF3loBOFciVtmLt"; protected-headers="v1" From: Jose Lamego To: Khem Raj Cc: "yocto@yoctoproject.org" , Jose Lamego Message-ID: Subject: Re: [yocto] [patchwork][PATCH] patchwork/templates/patchwork/series: Improve series view References: <1483714246-6857-1-git-send-email-jose.a.lamego@linux.intel.com> <8a451c7c-4da2-4aca-e6f5-ead626045c27@linux.intel.com> In-Reply-To: --71o2mcWpGtd54UudFvMF3loBOFciVtmLt Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 01/09/2017 02:30 PM, Khem Raj wrote: > On Mon, Jan 9, 2017 at 12:21 PM, Jose Lamego > wrote: >> >> >> On 01/09/2017 12:44 PM, Khem Raj wrote: >>> On Fri, Jan 6, 2017 at 6:50 AM, Jose Lamego >>> wrote: >>>> From: Jose Lamego >>>> >>>> Reviewing patches from a series requires heavy usage of the >>>> browser navigation buttons, providing a poor UX. >>>> >>>> This changes allows viewing content from each patch in a series, >>>> without leaving the series view. >>>> >>> >>> The patch looks fine to me. Are you also posting these to upstream pa= tchwork ? >> >> Thanks for the review Khem. These changes currently are going only to >> the Yocto-Patchwork repository [1]. Upstream [2] has been not-maintain= ed >> for a while. >=20 > The upstream is > http://jk.ozlabs.org/projects/patchwork/ >=20 Yes, freedesktop's patchwork forked from ozlabs' but diverged some time ago. I haven't try to apply these changes on top of that (maybe worth it)= =2E >> >> You can view a working example of the view in patchwork-staging [3]. >> Production will be updated soon. >> >> [1] https://git.yoctoproject.org/git/patchwork >> [2] https://github.com/dlespiau/patchwork >> [3] https://patchwork-staging.openembedded.org >>> >>>> [YOCTO #10627] >>>> >>>> Signed-off-by: Jose Lamego >>>> --- >>>> htdocs/js/series.js | 43 +++++++++++ >>>> patchwork/templates/patchwork/patch.html | 15 ++-- >>>> patchwork/templates/patchwork/series.html | 114 ++++++++++++++++---= ----------- >>>> 3 files changed, 113 insertions(+), 59 deletions(-) >>>> create mode 100644 htdocs/js/series.js >>>> >>>> diff --git a/htdocs/js/series.js b/htdocs/js/series.js >>>> new file mode 100644 >>>> index 0000000..4f4f477 >>>> --- /dev/null >>>> +++ b/htdocs/js/series.js >>>> @@ -0,0 +1,43 @@ >>>> +$(document).ready(function(){ >>>> + $('[data-toggle=3D"tooltip"]').tooltip(); >>>> + revTab=3Ddocument.getElementById('revs-list') >>>> + coverView=3Ddocument.getElementById('cover-letter-view'), >>>> + patchView=3Ddocument.getElementById('patch-view'), >>>> + patchList=3Ddocument.getElementById('patches-list') >>>> + >>>> + revTab.style.border=3D'none' >>>> + revTab.style.background=3D'transparent' >>>> + revTab.style.padding=3D'15px' >>>> + coverView.style.display=3D'block' >>>> + patchView.style.display=3D'none' >>>> + patchList.style.display=3D'none' >>>> + >>>> + document.getElementById('cover-letter-tab').onclick=3Dfunction(= ){ >>>> + coverView.style.display=3D'block' >>>> + patchView.style.display=3D'none' >>>> + patchList.style.display=3D'none' >>>> + } >>>> + >>>> + document.getElementById('patches-tab').onclick=3Dfunction(){ >>>> + coverView.style.display=3D'none' >>>> + patchList.style.display=3D'block' >>>> + patchView.style.display=3D"none" >>>> + } >>>> + >>>> + $('#revs-list').on('change', function(e){ >>>> + var optionSelected=3D$("option:selected", this) >>>> + jQuery('.tab-content div.tab-pane.fade.in.active'). >>>> + removeClass(' in active') >>>> + jQuery('.tab-content div#'+this.value+'.tab-pane.fade'). >>>> + addClass(' in active') >>>> + patchView.style.display=3D'none' >>>> + }) >>>> + >>>> + $('.patch-link').on('click', function(){ >>>> + coverView.style.display=3D'none' >>>> + patchView.style.display=3D'block' >>>> + patchView.innerHTML=3D >>>> + '

Loading patch...

' >>>> + $("#patch-view").load(this.getAttribute("data-url") + " #pa= tch-body") >>>> + }) >>>> +}) >>>> diff --git a/patchwork/templates/patchwork/patch.html b/patchwork/te= mplates/patchwork/patch.html >>>> index 5ce540d..59df19d 100644 >>>> --- a/patchwork/templates/patchwork/patch.html >>>> +++ b/patchwork/templates/patchwork/patch.html >>>> @@ -7,6 +7,7 @@ >>>> {% block title %}{{patch.name}}{% endblock %} >>>> >>>> {% block body %} >>>> + >>>> >>>> - >>>> +
>>>>

{{ patch.name }}

>>>>
>>>> Submitted by {{ patch.submitter|personify:project }} on {= { patch.date }} >>>> + | >>>> + Patch ID: {{ patch.id }} >>>>
>>>> >>>>

Details

>>>> @@ -134,10 +137,10 @@ function toggle_headers(link_id, headers_id) >>>>
>>>> {% csrf_token %} >>>> >>>> - >>>> + {% for bundle in bundles %} >>>> + >>>> + {% endfor %} >>>> >>>> >>>>
>>>> @@ -219,5 +222,5 @@ function toggle_headers(link_id, headers_id) >>>> >>>>
>>>> {% endfor %} >>>> - >>>> + >>>> {% endblock %} >>>> diff --git a/patchwork/templates/patchwork/series.html b/patchwork/t= emplates/patchwork/series.html >>>> index c0a5261..6c35212 100644 >>>> --- a/patchwork/templates/patchwork/series.html >>>> +++ b/patchwork/templates/patchwork/series.html >>>> @@ -1,6 +1,7 @@ >>>> {% extends "base.html" %} >>>> >>>> {% load person %} >>>> +{% load static %} >>>> >>>> {% block title %}{{project.name}}{% endblock %} >>>> {% block headers %} >>>> @@ -9,64 +10,70 @@ $(function () { >>>> pw.setup_series({ patches: 'series-patchlist' }); >>>> }); >>>> >>>> +