All of lore.kernel.org
 help / color / mirror / Atom feed
* [review-request] 7191 Version3 format shaid on all layers page
@ 2015-03-05 16:07 Lerner, Dave
  2015-03-05 18:13 ` Barros Pena, Belen
  0 siblings, 1 reply; 3+ messages in thread
From: Lerner, Dave @ 2015-03-05 16:07 UTC (permalink / raw)
  To: WOOD, MICHAEL, BARROS PENA, BELEN; +Cc: toaster@yoctoproject.org

http://git.yoctoproject.org/cgit.cgi/poky-contrib/

Version 3: Implementing the improvement from Michael, and Belen's clarification on help bubble.  

Retests
--------
Tested with manually entered revision strings 
 1234567890123456789012345678901234567890 (with button)
and
 12 4567890123456789012345678901234567890 (without button)

HTML validator
--------------
3 errors with no relation to the changed code


V2 vs V3 diff
-------------
--- a/bitbake/lib/toaster/toastergui/templates/layers.html
+++ b/bitbake/lib/toaster/toastergui/templates/layers.html
@@ -52,24 +52,15 @@
                 {% endif %}
         </td>
             <td class="branch">
-                {% if o.branch %}
-                    {% if o.branch|is_shaid %}
+                {% with vcs_ref=o.get_vcs_reference %}
+                  {% if vcs_ref|is_shaid %}
                     <a class="btn" data-content="<ul class='unstyled'> <li>{{o.
-                        {{o.branch|truncatechars:10}}
+                      {{vcs_ref|truncatechars:10}}
                     </a>
-                    {% else %}
-                        {{o.branch}}
-                    {% endif %}
-                {% else %}
-                    {% if o.branch|is_shaid %}
-                    <a class="btn" data-content="<ul class='unstyled'> <li>{{o.
-                        {{o.up_branch.name|truncatechars:10}}
-                    </a>
-                    {% else %}
-                        {{o.up_branch.name}}
-                    {% endif %}
-                    <i class="icon-question-sign get-help hover-help" title="Yo
-                {% endif %}
+                  {% else %}
+                    {{vcs_ref}}
+                  {% endif %}
+                {% endwith %}
             </td>
             <td class="dependencies">
         {% with ods=o.dependencies.all%}
diff --git a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py b/bitbak
index 61a01ca..587a6da 100644
--- a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
+++ b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
@@ -304,7 +304,7 @@ def is_shaid(text):
         int(text, 16)
         if len(text) == 40:
             return True
-        return False
+        return False
     except:
         return False

> -----Original Message-----
> From: Lerner, Dave
> Sent: Wednesday, March 04, 2015 10:44 AM
> To: WOOD, MICHAEL
> Cc: Barros Pena, Belen (belen.barros.pena@intel.com)
> Subject: RE: [review-request] 7191 Version2 format shaid on all layers page
> 
> Hi Michael,
> 
> I didn't change the original template use of o.branch/o.upt_branch.name. The original
> template only provided the help icon on the up_branch clause, that is, the not o.branch
> clause.  What do you use to determine the difference if you have abstracted the two into
> one field?  Can you send me your suggestion?
> -Dave
> My patch
>                  {% if o.branch %}
> -                    {{o.branch}}
> +                    {% if o.branch|is_shaid %}
> +                    <a class="btn" data-content="<ul class='unstyled'>
> <li>{{o.branch}}</li> </ul>">
> +                        {{o.branch|truncatechars:10}}
> +                    </a>
> +                    {% else %}
> +                        {{o.branch}}
> +                    {% endif %}
>                  {% else %}
> -                    {{o.up_branch.name}}
> +                    {% if o.branch|is_shaid %}
> +                    <a class="btn" data-content="<ul class='unstyled'>
> <li>{{o.branch}}</li> </ul>">
> +                        {{o.up_branch.name|truncatechars:10}}
> +                    </a>
> +                    {% else %}
> +                        {{o.up_branch.name}}
> +                    {% endif %}
>                      <i class="icon-question-sign get-help hover-help" title="Your
> builds will use the tip of t
>                  {% endif %}
> 
> > -----Original Message-----
> > From: Michael Wood [mailto:michael.g.wood@intel.com]
> > Sent: Wednesday, March 04, 2015 9:58 AM
> > To: BARROS PENA, BELEN; Lerner, Dave; DAMIAN, ALEXANDRU
> > Cc: toaster@yoctoproject.org
> > Subject: Re: [review-request] 7191 Version2 format shaid on all layers page
> >
> > Hi Dave,
> >
> > Only one thing, we have renamed the branch column to "reference" because
> > the database confusingly splits up the vcs reference into, branch,
> > commit, upstream branch etc etc
> >
> > We have abstracted trying to work out which to display via the function
> > "get_vcs_reference"
> >
> > So if you switch
> > + {% if o.branch|is_shaid %}
> > to
> > + {% if o.get_vcs_reference|is_shaid %}
> >
> > and you can then also remove the check to see if which kind of reference
> > to display
> >
> > + {% else %}
> > + {{o.up_branch.name}}
> >
> > It's a bit confusing so if you'd like me just to push a patch on top
> > then you can squash it into yours.
> >
> > Michael
> >
> >
> > On 04/03/15 12:26, Barros Pena, Belen wrote:
> > > On 03/03/2015 22:56, "Lerner, Dave" <dave.lerner@windriver.com> wrote:
> > >
> > >> http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=lerner/layer
> > >> s_commitfield_7191
> > >>
> > >> 7191 - If field looks like a commit SHAID(hex and 40 digits), truncate
> > >> field as button label, and show full SHAID when button depressed.
> > > This seems to be working for me.
> > >
> > > Thanks!
> > >
> > > Belén
> > >
> > >> Dave Lerner
> > >>



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [review-request] 7191 Version3 format shaid on all layers page
  2015-03-05 16:07 [review-request] 7191 Version3 format shaid on all layers page Lerner, Dave
@ 2015-03-05 18:13 ` Barros Pena, Belen
  2015-03-06 11:28   ` Michael Wood
  0 siblings, 1 reply; 3+ messages in thread
From: Barros Pena, Belen @ 2015-03-05 18:13 UTC (permalink / raw)
  To: Lerner, David M (Wind River), Wood, Michael G; +Cc: toaster@yoctoproject.org


On 05/03/2015 16:07, "Lerner, Dave" <dave.lerner@windriver.com> wrote:

>http://git.yoctoproject.org/cgit.cgi/poky-contrib/
>
>Version 3: Implementing the improvement from Michael, and Belen's
>clarification on help bubble.

The UI is working as designed.

Thanks!

Belén

> 
>
>Retests
>--------
>Tested with manually entered revision strings
> 1234567890123456789012345678901234567890 (with button)
>and
> 12 4567890123456789012345678901234567890 (without button)
>
>HTML validator
>--------------
>3 errors with no relation to the changed code
>
>
>V2 vs V3 diff
>-------------
>--- a/bitbake/lib/toaster/toastergui/templates/layers.html
>+++ b/bitbake/lib/toaster/toastergui/templates/layers.html
>@@ -52,24 +52,15 @@
>                 {% endif %}
>         </td>
>             <td class="branch">
>-                {% if o.branch %}
>-                    {% if o.branch|is_shaid %}
>+                {% with vcs_ref=o.get_vcs_reference %}
>+                  {% if vcs_ref|is_shaid %}
>                     <a class="btn" data-content="<ul class='unstyled'>
><li>{{o.
>-                        {{o.branch|truncatechars:10}}
>+                      {{vcs_ref|truncatechars:10}}
>                     </a>
>-                    {% else %}
>-                        {{o.branch}}
>-                    {% endif %}
>-                {% else %}
>-                    {% if o.branch|is_shaid %}
>-                    <a class="btn" data-content="<ul class='unstyled'>
><li>{{o.
>-                        {{o.up_branch.name|truncatechars:10}}
>-                    </a>
>-                    {% else %}
>-                        {{o.up_branch.name}}
>-                    {% endif %}
>-                    <i class="icon-question-sign get-help hover-help"
>title="Yo
>-                {% endif %}
>+                  {% else %}
>+                    {{vcs_ref}}
>+                  {% endif %}
>+                {% endwith %}
>             </td>
>             <td class="dependencies">
>         {% with ods=o.dependencies.all%}
>diff --git a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
>b/bitbak
>index 61a01ca..587a6da 100644
>--- a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
>+++ b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
>@@ -304,7 +304,7 @@ def is_shaid(text):
>         int(text, 16)
>         if len(text) == 40:
>             return True
>-        return False
>+        return False
>     except:
>         return False
>
>> -----Original Message-----
>> From: Lerner, Dave
>> Sent: Wednesday, March 04, 2015 10:44 AM
>> To: WOOD, MICHAEL
>> Cc: Barros Pena, Belen (belen.barros.pena@intel.com)
>> Subject: RE: [review-request] 7191 Version2 format shaid on all layers
>>page
>> 
>> Hi Michael,
>> 
>> I didn't change the original template use of
>>o.branch/o.upt_branch.name. The original
>> template only provided the help icon on the up_branch clause, that is,
>>the not o.branch
>> clause.  What do you use to determine the difference if you have
>>abstracted the two into
>> one field?  Can you send me your suggestion?
>> -Dave
>> My patch
>>                  {% if o.branch %}
>> -                    {{o.branch}}
>> +                    {% if o.branch|is_shaid %}
>> +                    <a class="btn" data-content="<ul class='unstyled'>
>> <li>{{o.branch}}</li> </ul>">
>> +                        {{o.branch|truncatechars:10}}
>> +                    </a>
>> +                    {% else %}
>> +                        {{o.branch}}
>> +                    {% endif %}
>>                  {% else %}
>> -                    {{o.up_branch.name}}
>> +                    {% if o.branch|is_shaid %}
>> +                    <a class="btn" data-content="<ul class='unstyled'>
>> <li>{{o.branch}}</li> </ul>">
>> +                        {{o.up_branch.name|truncatechars:10}}
>> +                    </a>
>> +                    {% else %}
>> +                        {{o.up_branch.name}}
>> +                    {% endif %}
>>                      <i class="icon-question-sign get-help hover-help"
>>title="Your
>> builds will use the tip of t
>>                  {% endif %}
>> 
>> > -----Original Message-----
>> > From: Michael Wood [mailto:michael.g.wood@intel.com]
>> > Sent: Wednesday, March 04, 2015 9:58 AM
>> > To: BARROS PENA, BELEN; Lerner, Dave; DAMIAN, ALEXANDRU
>> > Cc: toaster@yoctoproject.org
>> > Subject: Re: [review-request] 7191 Version2 format shaid on all
>>layers page
>> >
>> > Hi Dave,
>> >
>> > Only one thing, we have renamed the branch column to "reference"
>>because
>> > the database confusingly splits up the vcs reference into, branch,
>> > commit, upstream branch etc etc
>> >
>> > We have abstracted trying to work out which to display via the
>>function
>> > "get_vcs_reference"
>> >
>> > So if you switch
>> > + {% if o.branch|is_shaid %}
>> > to
>> > + {% if o.get_vcs_reference|is_shaid %}
>> >
>> > and you can then also remove the check to see if which kind of
>>reference
>> > to display
>> >
>> > + {% else %}
>> > + {{o.up_branch.name}}
>> >
>> > It's a bit confusing so if you'd like me just to push a patch on top
>> > then you can squash it into yours.
>> >
>> > Michael
>> >
>> >
>> > On 04/03/15 12:26, Barros Pena, Belen wrote:
>> > > On 03/03/2015 22:56, "Lerner, Dave" <dave.lerner@windriver.com>
>>wrote:
>> > >
>> > >> 
>>http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=lerner/laye
>>r
>> > >> s_commitfield_7191
>> > >>
>> > >> 7191 - If field looks like a commit SHAID(hex and 40 digits),
>>truncate
>> > >> field as button label, and show full SHAID when button depressed.
>> > > This seems to be working for me.
>> > >
>> > > Thanks!
>> > >
>> > > Belén
>> > >
>> > >> Dave Lerner
>> > >>
>



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [review-request] 7191 Version3 format shaid on all layers page
  2015-03-05 18:13 ` Barros Pena, Belen
@ 2015-03-06 11:28   ` Michael Wood
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Wood @ 2015-03-06 11:28 UTC (permalink / raw)
  To: Barros Pena, Belen, Lerner, David M (Wind River); +Cc: toaster@yoctoproject.org

On 05/03/15 18:13, Barros Pena, Belen wrote:
> On 05/03/2015 16:07, "Lerner, Dave" <dave.lerner@windriver.com> wrote:
>
>> http://git.yoctoproject.org/cgit.cgi/poky-contrib/
>>
>> Version 3: Implementing the improvement from Michael, and Belen's
>> clarification on help bubble.

+ <a class="btn" data-content="<ul class='unstyled'> 
<li>{{o.branch}}</li> </ul>">

should be

+ <a class="btn" data-content="<ul class='unstyled'> 
<li>{{vcs_ref}}</li> </ul>">

Thanks

> The UI is working as designed.
>
> Thanks!
>
> Belén
>
>>
>> Retests
>> --------
>> Tested with manually entered revision strings
>> 1234567890123456789012345678901234567890 (with button)
>> and
>> 12 4567890123456789012345678901234567890 (without button)
>>
>> HTML validator
>> --------------
>> 3 errors with no relation to the changed code
>>
>>
>> V2 vs V3 diff
>> -------------
>> --- a/bitbake/lib/toaster/toastergui/templates/layers.html
>> +++ b/bitbake/lib/toaster/toastergui/templates/layers.html
>> @@ -52,24 +52,15 @@
>>                  {% endif %}
>>          </td>
>>              <td class="branch">
>> -                {% if o.branch %}
>> -                    {% if o.branch|is_shaid %}
>> +                {% with vcs_ref=o.get_vcs_reference %}
>> +                  {% if vcs_ref|is_shaid %}
>>                      <a class="btn" data-content="<ul class='unstyled'>
>> <li>{{o.
>> -                        {{o.branch|truncatechars:10}}
>> +                      {{vcs_ref|truncatechars:10}}
>>                      </a>
>> -                    {% else %}
>> -                        {{o.branch}}
>> -                    {% endif %}
>> -                {% else %}
>> -                    {% if o.branch|is_shaid %}
>> -                    <a class="btn" data-content="<ul class='unstyled'>
>> <li>{{o.
>> -                        {{o.up_branch.name|truncatechars:10}}
>> -                    </a>
>> -                    {% else %}
>> -                        {{o.up_branch.name}}
>> -                    {% endif %}
>> -                    <i class="icon-question-sign get-help hover-help"
>> title="Yo
>> -                {% endif %}
>> +                  {% else %}
>> +                    {{vcs_ref}}
>> +                  {% endif %}
>> +                {% endwith %}
>>              </td>
>>              <td class="dependencies">
>>          {% with ods=o.dependencies.all%}
>> diff --git a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
>> b/bitbak
>> index 61a01ca..587a6da 100644
>> --- a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
>> +++ b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
>> @@ -304,7 +304,7 @@ def is_shaid(text):
>>          int(text, 16)
>>          if len(text) == 40:
>>              return True
>> -        return False
>> +        return False
>>      except:
>>          return False
>>
>>> -----Original Message-----
>>> From: Lerner, Dave
>>> Sent: Wednesday, March 04, 2015 10:44 AM
>>> To: WOOD, MICHAEL
>>> Cc: Barros Pena, Belen (belen.barros.pena@intel.com)
>>> Subject: RE: [review-request] 7191 Version2 format shaid on all layers
>>> page
>>>
>>> Hi Michael,
>>>
>>> I didn't change the original template use of
>>> o.branch/o.upt_branch.name. The original
>>> template only provided the help icon on the up_branch clause, that is,
>>> the not o.branch
>>> clause.  What do you use to determine the difference if you have
>>> abstracted the two into
>>> one field?  Can you send me your suggestion?
>>> -Dave
>>> My patch
>>>                   {% if o.branch %}
>>> -                    {{o.branch}}
>>> +                    {% if o.branch|is_shaid %}
>>> +                    <a class="btn" data-content="<ul class='unstyled'>
>>> <li>{{o.branch}}</li> </ul>">
>>> +                        {{o.branch|truncatechars:10}}
>>> +                    </a>
>>> +                    {% else %}
>>> +                        {{o.branch}}
>>> +                    {% endif %}
>>>                   {% else %}
>>> -                    {{o.up_branch.name}}
>>> +                    {% if o.branch|is_shaid %}
>>> +                    <a class="btn" data-content="<ul class='unstyled'>
>>> <li>{{o.branch}}</li> </ul>">
>>> +                        {{o.up_branch.name|truncatechars:10}}
>>> +                    </a>
>>> +                    {% else %}
>>> +                        {{o.up_branch.name}}
>>> +                    {% endif %}
>>>                       <i class="icon-question-sign get-help hover-help"
>>> title="Your
>>> builds will use the tip of t
>>>                   {% endif %}
>>>
>>>> -----Original Message-----
>>>> From: Michael Wood [mailto:michael.g.wood@intel.com]
>>>> Sent: Wednesday, March 04, 2015 9:58 AM
>>>> To: BARROS PENA, BELEN; Lerner, Dave; DAMIAN, ALEXANDRU
>>>> Cc: toaster@yoctoproject.org
>>>> Subject: Re: [review-request] 7191 Version2 format shaid on all
>>> layers page
>>>> Hi Dave,
>>>>
>>>> Only one thing, we have renamed the branch column to "reference"
>>> because
>>>> the database confusingly splits up the vcs reference into, branch,
>>>> commit, upstream branch etc etc
>>>>
>>>> We have abstracted trying to work out which to display via the
>>> function
>>>> "get_vcs_reference"
>>>>
>>>> So if you switch
>>>> + {% if o.branch|is_shaid %}
>>>> to
>>>> + {% if o.get_vcs_reference|is_shaid %}
>>>>
>>>> and you can then also remove the check to see if which kind of
>>> reference
>>>> to display
>>>>
>>>> + {% else %}
>>>> + {{o.up_branch.name}}
>>>>
>>>> It's a bit confusing so if you'd like me just to push a patch on top
>>>> then you can squash it into yours.
>>>>
>>>> Michael
>>>>
>>>>
>>>> On 04/03/15 12:26, Barros Pena, Belen wrote:
>>>>> On 03/03/2015 22:56, "Lerner, Dave" <dave.lerner@windriver.com>
>>> wrote:
>>> http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=lerner/laye
>>> r
>>>>>> s_commitfield_7191
>>>>>>
>>>>>> 7191 - If field looks like a commit SHAID(hex and 40 digits),
>>> truncate
>>>>>> field as button label, and show full SHAID when button depressed.
>>>>> This seems to be working for me.
>>>>>
>>>>> Thanks!
>>>>>
>>>>> Belén
>>>>>
>>>>>> Dave Lerner
>>>>>>



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-03-06 11:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-05 16:07 [review-request] 7191 Version3 format shaid on all layers page Lerner, Dave
2015-03-05 18:13 ` Barros Pena, Belen
2015-03-06 11:28   ` Michael Wood

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.