From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 17DD9E00F78; Wed, 30 Sep 2015 04:04:10 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high * trust * [134.134.136.20 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 93822E00EEB for ; Wed, 30 Sep 2015 04:04:06 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 30 Sep 2015 04:04:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,611,1437462000"; d="scan'208";a="800437173" Received: from irsmsx109.ger.corp.intel.com ([163.33.3.23]) by fmsmga001.fm.intel.com with ESMTP; 30 Sep 2015 04:04:04 -0700 Received: from irsmsx111.ger.corp.intel.com (10.108.20.4) by IRSMSX109.ger.corp.intel.com (163.33.3.23) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 30 Sep 2015 12:04:02 +0100 Received: from irsmsx110.ger.corp.intel.com ([169.254.15.164]) by irsmsx111.ger.corp.intel.com ([169.254.2.89]) with mapi id 14.03.0248.002; Wed, 30 Sep 2015 12:04:02 +0100 From: "Barros Pena, Belen" To: "Wood, Michael G" , "Reyna, David L (Wind River)" Thread-Topic: [Toaster] [review-request][PATCH] 8126 Messages are missing when "IMAGE_FSTYPES" field is not properly edited Thread-Index: AQHQ7vhidJzju3etc0SkL+lMXKyPBZ5J3d6QgAfwMICAAyFwAIAAEfiA Date: Wed, 30 Sep 2015 11:04:02 +0000 Message-ID: References: <5E53D14CE4667A45B9A06760DE5D13D082655701@ALA-MBA.corp.ad.wrs.com> <5E53D14CE4667A45B9A06760DE5D13D082655F65@ALA-MBA.corp.ad.wrs.com> <55F6D760.70602@intel.com> <5E53D14CE4667A45B9A06760DE5D13D091B70791@ALA-MBB.corp.ad.wrs.com> <560BC09A.10207@intel.com> In-Reply-To: <560BC09A.10207@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.5.5.150821 x-originating-ip: [10.237.224.32] MIME-Version: 1.0 Cc: "toaster@yoctoproject.org" Subject: Re: [review-request][PATCH] 8126 Messages are missing when "IMAGE_FSTYPES" field is not properly edited X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Sep 2015 11:04:10 -0000 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-ID: Content-Transfer-Encoding: quoted-printable On 30/09/2015 11:59, "Michael Wood" wrote: >On 28/09/15 11:11, Barros Pena, Belen wrote: >> Sorry for the delay in looking at this. >> >> On 23/09/2015 10:02, "toaster-bounces@yoctoproject.org on behalf of >>Reyna, >> David" > david.reyna@windriver.com> wrote: >> >>> Hi Michael, >>> >>> I have made the requested changes and updated >>> "dreyna/project_fstypes_8126", except for this one: >>> >>>> + // Add the 'no search matches' line last >>>> + html +=3D '\n'; >>>> >>>> MW - Rather than appending this to the list just add the text to the >>>> #fstypes-error-message >>>> and set it it initially to style=3D"display:none" and then toggle it >>>>with >>>> .hide .show >>> Bel=E9n's design had this message appear within the selection list when >>> there were no search matches instead of in the optional error message >>> below it. That is why I did this implementation. I do toggle it with >>> .hide .show. >> FWIW, I agree with David on this one. The message has to be as close as >> possible to the context of the action. Having the 'no image types found' >> next to the buttons would be a bit too far away. >> >> The branch looks good from the UI standpoint. > >Oh I was going on this design: >http://www.yoctoproject.org/toaster/localconf.html Ah, I see what you mean know. The prototype reflects the changes that will be brought in by=20 https://bugzilla.yoctoproject.org/show_bug.cgi?id=3D7828 But David is working on the state before that one. Sorry for the confusion. Bel=E9n > > >> >> Cheers >> >> Bel=E9n >> >>> - David >>> >>>> -----Original Message----- >>>> From: toaster-bounces@yoctoproject.org [mailto:toaster- >>>> bounces@yoctoproject.org] On Behalf Of Michael Wood >>>> Sent: Monday, September 14, 2015 7:19 AM >>>> To: toaster@yoctoproject.org >>>> Subject: Re: [Toaster] [review-request][PATCH] 8126 Messages are >>>> missing when "IMAGE_FSTYPES" field is not properly edited >>>> >>>> On 02/09/15 16:58, Barros Pena, Belen wrote: >>>>> On 02/09/2015 15:46, "Reyna, David" >>>> wrote: >>>>>> Hi Bel=E9n, >>>>>> >>>>>> Thank you for the observation. >>>>>> >>>>>> I have updated "dreyna/project_fstypes_8126" to address that issue, >>>> and >>>>>> the code now always pre-initializes the warning message element so >>>> that >>>>>> the previous value is not dangling. >>>>> yep: this seems to behave as expected now. Thanks! >>>>> >>>>> I've also realised that the base branch seems a bit old. Could you >>>> rebase >>>>> and resubmit? >>>>> >>>>> Cheers >>>>> >>>>> Bel=E9n >>>>> >>>>>> - David >>>>>> >>>>>> >>>>>>> -----Original Message----- >>>>>>> From: Barros Pena, Belen [mailto:belen.barros.pena@intel.com] >>>>>>> Sent: Wednesday, September 02, 2015 2:16 AM >>>>>>> To: Reyna, David >>>>>>> Cc: toaster@yoctoproject.org >>>>>>> Subject: Re: [Toaster] [review-request][PATCH] 8126 Messages are >>>> missing >>>>>>> when "IMAGE_FSTYPES" field is not properly edited >>>>>>> >>>>>>> >>>>>>> >>>>>>> On 02/09/2015 08:44, "Reyna, David" >>>> wrote: >>>>>>>> Hi Bel=E9n, >>>>>>>> >>>>>>>> Please find the patch for 8126 here: >>>>>>>> >>>>>>>> dreyna/project_fstypes_8126 >>>>>>> Hi David, >>>>>>> >>>>>>> This is looking fairly good. I've only run across one problem. >>>> This is >>>>>>> how >>>>>>> to reproduce: >>>>>>> >>>>>>> 1. Click the 'change' icon for IMAGE_FSTYPES >>>>>>> >>>>>>> 2. Deselect all values: the 'save' button becomes disabled and the >>>>>>> message >>>>>>> asking you to select at least one image type appears. This is the >>>>>>> expected >>>>>>> behaviour >>>>>>> >>>>>>> 3. Now, click the 'cancel' link. The IMAGE_FSTYPES value stays the >>>> way >>>>>>> it >>>>>>> was before you clicked the 'change' icon. This is once more the >>>> correct >>>>>>> behaviour >>>>>>> >>>>>>> 4. Now click the 'change' icon again. There are image types >>>> selected, >>>>>>> but >>>>>>> the message 'You must select at least one image type' still shows, >>>> and >>>>>>> the >>>>>>> 'Save' button is disabled. This is not the correct behaviour. As >>>> long as >>>>>>> there is at least one checkbox ticked you should see no message >>>> and the >>>>>>> 'save' button should be enabled. If you make a change (untick a >>>> box), >>>>>>> the >>>>>>> validation kicks in and things return to the correct state. Sounds >>>> like >>>>>>> we >>>>>>> need to check the selected values whenever the 'change' icon is >>>> clicked >>>>>>> Thanks! >>>>>>> >>>>>>> Bel=E9n >>>>>>> >>>>>>>> Note: for the message 'label' the I insert and then show when >>>> there are >>>>>>>> no matches, it is guaranteed not to pollute the database because >>>> it can >>>>>>>> never be in the checked state. >>>>>>>> >>>>>>>> - David >>>>>>>> >>>> Some review comments below: >>>> >>>> From bac104e20efc46d4746af58aebb0f920c37edfc3 Mon Sep 17 00:00:00 >>>> 2001 >>>> From: David Reyna >>>> Date: Wed, 2 Sep 2015 15:34:14 -0700 >>>> Subject: bitbake: toaster: display warnings for bad "IMAGE_FSTYPES" >>>> values >>>> >>>> Display warning message for IMAGE_FSTYPES when no value is selected or >>>> when the filter does not have any matches >>>> >>>> [YOCTO #8126] >>>> >>>> Signed-off-by: David Reyna >>>> >>>> diff --git a/bitbake/lib/toaster/toastergui/templates/projectconf.html >>>> b/bitbake/lib/toaster/toastergui/templates/projectconf.html >>>> index 4c5a188..b477b4e 100644 >>>> --- a/bitbake/lib/toaster/toastergui/templates/projectconf.html >>>> +++ b/bitbake/lib/toaster/toastergui/templates/projectconf.html >>>> @@ -43,6 +43,7 @@ >>>> >>> placeholder=3D"Search image types" class=3D"span4"> >>>>
>>>>
>>>> + >>> message"> >>>> >>>> >>>> >>>> @@ -312,9 +313,11 @@ >>>> }); >>>> if ( 0 =3D=3D any_checked ) { >>>> >>>> $("#apply-change- >>>> image_fstypes").attr("disabled","disabled"); >>>> + $('#fstypes-error-message').html("You must select at >>>> least one image type"); >>>> >>>> MW - Given that this error message doesn't change from this text, >>>> rather than adding and removing the text add the text to the DOM in >>>> the #fstypes-error-message element and .hide .show this makes it >>>> easier to update the error message in the html and keeps a slightly >>>> cleaner separation between the UI description and the logic of the >>>> javascript. >>>> >>>> } >>>> else { >>>> $("#apply-change- >>>> image_fstypes").removeAttr("disabled"); >>>> + $('#fstypes-error-message').html(""); >>>> } >>>> } >>>> >>>> @@ -546,10 +549,14 @@ >>>> // Add the un-checked boxes second >>>> for (var i =3D 0, length =3D fstypes_list.length; i= < >>>> length; i++) { >>>> if (0 > fstypes.indexOf(" >>>> "+fstypes_list[i].value+" ")) { >>>> - html +=3D '\= n' >>>> ; >>>> + html +=3D '\= n' >>>> ; >>>> } >>>> } >>>> + // Add the 'no search matches' line last >>>> + html +=3D '\n'; >>>> >>>> >>>> MW - Rather than appending this to the list just add the text to the >>>> #fstypes-error-message and set it it initially to style=3D"display:non= e" >>>> and then toggle it with .hide .show >>>> >>>> + // Display the list >>>> document.getElementById("all- >>>> image_fstypes").innerHTML =3D html; >>>> + $('#no-match-fstypes').hide(); >>>> >>>> // Watch elements to disable Save when none are >>>> checked >>>> $(".fs-checkbox-fstypes").each(function(){ >>>> @@ -558,8 +565,9 @@ >>>> }); >>>> }); >>>> >>>> - // clear the previous filter values >>>> + // clear the previous filter values and warning >>>> messages >>>> $("input#filter-image_fstypes").val(""); >>>> + $('#fstypes-error-message').html(""); >>>> }); >>>> >>>> $('#cancel-change-image_fstypes').click(function(){ >>>> @@ -569,17 +577,24 @@ >>>> }); >>>> >>>> $('#filter-image_fstypes').on('input', function(){ >>>> - var valThis =3D $(this).val().toLowerCase(); >>>> + var valThis =3D $(this).val().toLowerCase(); >>>> + var match_count=3D0; >>>> >>>> >>>> MW - camelCase please >>>> >>>> >>>> $('#all-image_fstypes label').each(function(){ >>>> var text =3D $(this).text().toLowerCase(); >>>> var match =3D text.indexOf(valThis); >>>> if (match >=3D 0) { >>>> $(this).show(); >>>> + match_count +=3D 1; >>>> } >>>> else { >>>> $(this).hide(); >>>> } >>>> }); >>>> + if (0 =3D=3D match_count) { >>>> >>>> >>>> MW - This should be if (matchCount =3D=3D=3D 0) >>>> triple equals for full equality and variable on the left >>>> >>>> >>>> >>>> + $('#no-match-fstypes').show(); >>>> + } else { >>>> + $('#no-match-fstypes').hide(); >>>> + } >>>> }); >>>> >>>> $('#apply-change-image_fstypes').click(function(){ >>>> -- >>>> cgit v0.10.2 >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> -- >>>> _______________________________________________ >>>> toaster mailing list >>>> toaster@yoctoproject.org >>>> https://lists.yoctoproject.org/listinfo/toaster >>> --=20 >>> _______________________________________________ >>> toaster mailing list >>> toaster@yoctoproject.org >>> https://lists.yoctoproject.org/listinfo/toaster >