You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rave.apache.org by Ankur Goyal <as...@indiana.edu> on 2011/11/22 23:05:24 UTC

Review Request: Rave-359 (WidgetRating UI: Initial load of page allows a double click for rating)

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/2917/
-----------------------------------------------------------

Review request for rave and Marlon Pierce.


Summary
-------

WidgetRating UI: Initial load of page allows a double click for rating
Files modified:
rave_store.js
store.jsp


Diffs
-----

  trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/store.jsp 1205187 
  trunk/rave-portal-resources/src/main/webapp/script/rave_store.js 1205187 

Diff: https://reviews.apache.org/r/2917/diff


Testing
-------


Thanks,

Ankur


Re: Review Request: Rave-359 (WidgetRating UI: Initial load of page allows a double click for rating)

Posted by Ankur Goyal <as...@umail.iu.edu>.
I think I fixed the bug.

Attaching new patch here.

Made the following changes in rave_store.js:-
-> Changed the "change" function to "click" function
-> Added one if condition to each click function.

Regards,
Ankur Goyal

On Mon, Dec 5, 2011 at 1:30 PM, Cooper, Sean D. <se...@mitre.org> wrote:

> Try abandoning the pre-wiring of the events.  Instead of marking the radio
> buttons as checked/unchecked see if using the jquery event model to
> check/uncheck the buttons resolves the problem.
>
> -Sean
>
> From: Ankur Goyal [mailto:asgoyal@umail.iu.edu]
> Sent: Thursday, December 01, 2011 10:32 AM
> To: rave
> Subject: Fwd: Review Request: Rave-359 (WidgetRating UI: Initial load of
> page allows a double click for rating)
>
> Sending to the entire list.
> ---------- Forwarded message ----------
> From: Ankur Goyal <as...@umail.iu.edu>>
> Date: Wed, Nov 30, 2011 at 4:22 PM
> Subject: Re: Review Request: Rave-359 (WidgetRating UI: Initial load of
> page allows a double click for rating)
> To: "Cooper, Sean D." <se...@mitre.org>>
> Cc: Marlon Pierce <mp...@cs.indiana.edu>>
>
>
> Hi Sean,
>
> I did some modifications which solved the problem you mentioned in your
> first email but there is a small problem and I am not able to understand it.
>
> When both like and dislike ratings are 0 and then if you click anyone of
> them (say like button) it updates properly but when you click on the other
> (dislike button), it shows no effect no matter how many times you click on
> it. But if you click once more on the first one which got updated (i.e.
> like button), it wont update and remain as 1 (as needed) and then try to
> click on the other (dislike button), the other one then updates to 1 with
> the first one updates to 0.
>
> The problem that i noticed was that change function in rave_store.js file
> is not been called for the first hit for the other button (dislike). I am
> unable to find a way out of it.
>
> example:
> initially
> like: 0 dislike: 0
> first hit on like button
> like: 1 dislike: 0
> second hit on dislike button
> like: 1 dislike: 0 (no change no matter how much you click on dislike
> button)
> click on like button again
> no change
> now click on dislike button
> like: 0 dislike: 1 (as expected)
> here after it works fine.
>
> I have attached my patch file with this. It will have some alert messages
> just to know the flow.
>
> Waiting for your reply,
>
> Regards,
> Ankur Goyal
>
> On Tue, Nov 29, 2011 at 4:25 PM, Cooper, Sean D. <secooper@mitre.org
> <ma...@mitre.org>> wrote:
> You might try creating a third radio button for the 'unset' state and have
> it be a hidden element on the page.  That way you can correctly set the
> state of the radio button to 'positive', 'negative' , and 'unset'
>
> -Sean
>
> >-----Original Message-----
> >From: Ankur Goyal [mailto:asgoyal@umail.iu.edu<mailto:
> asgoyal@umail.iu.edu>]
> >Sent: Tuesday, November 29, 2011 4:18 PM
> >To: Sean Cooper
> >Cc: Marlon Pierce; Ankur Goyal; rave
> >Subject: Re: Review Request: Rave-359 (WidgetRating UI: Initial load of
> page
> >allows a double click for rating)
> >
> >Hi Sean,
> >
> >I was looking into the problem you mentioned.
> >
> >There is some property called as "aria-pressed" which is always set as
> >"true" for like button and "false" for dislike button after every load of
> >widget store page.
> >
> >I am unable to find where this effect is brought from so thought to ask
> you
> >about this. :)
> >
> >Waiting for your reply,
> >
> >Regards,
> >Ankur Goyal
> >
> >On Mon, Nov 28, 2011 at 2:14 PM, Sean Cooper <secooper@gmail.com<mailto:
> secooper@gmail.com>>
> >wrote:
> >
> >>    This is an automatically generated e-mail. To reply, visit:
> >> https://reviews.apache.org/r/2917/
> >>
> >> This patch is forcing the button state to highlight the 'negative'
> option when
> >using chrome or firefox regardless of whether or not the user has already
> >selected one of the options (e.g. If the user has selected the 'positive'
> option
> >the 'negative' option is showing up as being selected)
> >>
> >>
> >> - Sean
> >>
> >> On November 22nd, 2011, 10:05 p.m., Ankur Goyal wrote:
> >>   Review request for rave and Marlon Pierce.
> >> By Ankur Goyal.
> >>
> >> *Updated 2011-11-22 22:05:24*
> >> Description
> >>
> >> WidgetRating UI: Initial load of page allows a double click for rating
> >> Files modified:
> >> rave_store.js
> >> store.jsp
> >>
> >>   Diffs
> >>
> >>    - trunk/rave-portal-resources/src/main/webapp/WEB-
> >INF/jsp/views/store.jsp
> >>    (1205187)
> >>    - trunk/rave-portal-resources/src/main/webapp/script/rave_store.js
> >>    (1205187)
> >>
> >> View Diff <https://reviews.apache.org/r/2917/diff/>
> >>
>
>
>

RE: Review Request: Rave-359 (WidgetRating UI: Initial load of page allows a double click for rating)

Posted by "Cooper, Sean D." <se...@mitre.org>.
Try abandoning the pre-wiring of the events.  Instead of marking the radio buttons as checked/unchecked see if using the jquery event model to check/uncheck the buttons resolves the problem.

-Sean

From: Ankur Goyal [mailto:asgoyal@umail.iu.edu]
Sent: Thursday, December 01, 2011 10:32 AM
To: rave
Subject: Fwd: Review Request: Rave-359 (WidgetRating UI: Initial load of page allows a double click for rating)

Sending to the entire list.
---------- Forwarded message ----------
From: Ankur Goyal <as...@umail.iu.edu>>
Date: Wed, Nov 30, 2011 at 4:22 PM
Subject: Re: Review Request: Rave-359 (WidgetRating UI: Initial load of page allows a double click for rating)
To: "Cooper, Sean D." <se...@mitre.org>>
Cc: Marlon Pierce <mp...@cs.indiana.edu>>


Hi Sean,

I did some modifications which solved the problem you mentioned in your first email but there is a small problem and I am not able to understand it.

When both like and dislike ratings are 0 and then if you click anyone of them (say like button) it updates properly but when you click on the other (dislike button), it shows no effect no matter how many times you click on it. But if you click once more on the first one which got updated (i.e. like button), it wont update and remain as 1 (as needed) and then try to click on the other (dislike button), the other one then updates to 1 with the first one updates to 0.

The problem that i noticed was that change function in rave_store.js file is not been called for the first hit for the other button (dislike). I am unable to find a way out of it.

example:
initially
like: 0 dislike: 0
first hit on like button
like: 1 dislike: 0
second hit on dislike button
like: 1 dislike: 0 (no change no matter how much you click on dislike button)
click on like button again
no change
now click on dislike button
like: 0 dislike: 1 (as expected)
here after it works fine.

I have attached my patch file with this. It will have some alert messages just to know the flow.

Waiting for your reply,

Regards,
Ankur Goyal

On Tue, Nov 29, 2011 at 4:25 PM, Cooper, Sean D. <se...@mitre.org>> wrote:
You might try creating a third radio button for the 'unset' state and have it be a hidden element on the page.  That way you can correctly set the state of the radio button to 'positive', 'negative' , and 'unset'

-Sean

>-----Original Message-----
>From: Ankur Goyal [mailto:asgoyal@umail.iu.edu<ma...@umail.iu.edu>]
>Sent: Tuesday, November 29, 2011 4:18 PM
>To: Sean Cooper
>Cc: Marlon Pierce; Ankur Goyal; rave
>Subject: Re: Review Request: Rave-359 (WidgetRating UI: Initial load of page
>allows a double click for rating)
>
>Hi Sean,
>
>I was looking into the problem you mentioned.
>
>There is some property called as "aria-pressed" which is always set as
>"true" for like button and "false" for dislike button after every load of
>widget store page.
>
>I am unable to find where this effect is brought from so thought to ask you
>about this. :)
>
>Waiting for your reply,
>
>Regards,
>Ankur Goyal
>
>On Mon, Nov 28, 2011 at 2:14 PM, Sean Cooper <se...@gmail.com>>
>wrote:
>
>>    This is an automatically generated e-mail. To reply, visit:
>> https://reviews.apache.org/r/2917/
>>
>> This patch is forcing the button state to highlight the 'negative' option when
>using chrome or firefox regardless of whether or not the user has already
>selected one of the options (e.g. If the user has selected the 'positive' option
>the 'negative' option is showing up as being selected)
>>
>>
>> - Sean
>>
>> On November 22nd, 2011, 10:05 p.m., Ankur Goyal wrote:
>>   Review request for rave and Marlon Pierce.
>> By Ankur Goyal.
>>
>> *Updated 2011-11-22 22:05:24*
>> Description
>>
>> WidgetRating UI: Initial load of page allows a double click for rating
>> Files modified:
>> rave_store.js
>> store.jsp
>>
>>   Diffs
>>
>>    - trunk/rave-portal-resources/src/main/webapp/WEB-
>INF/jsp/views/store.jsp
>>    (1205187)
>>    - trunk/rave-portal-resources/src/main/webapp/script/rave_store.js
>>    (1205187)
>>
>> View Diff <https://reviews.apache.org/r/2917/diff/>
>>



Fwd: Review Request: Rave-359 (WidgetRating UI: Initial load of page allows a double click for rating)

Posted by Ankur Goyal <as...@umail.iu.edu>.
Sending to the entire list.

---------- Forwarded message ----------
From: Ankur Goyal <as...@umail.iu.edu>
Date: Wed, Nov 30, 2011 at 4:22 PM
Subject: Re: Review Request: Rave-359 (WidgetRating UI: Initial load of
page allows a double click for rating)
To: "Cooper, Sean D." <se...@mitre.org>
Cc: Marlon Pierce <mp...@cs.indiana.edu>


Hi Sean,

I did some modifications which solved the problem you mentioned in your
first email but there is a small problem and I am not able to understand it.

When both like and dislike ratings are 0 and then if you click anyone of
them (say like button) it updates properly but when you click on the other
(dislike button), it shows no effect no matter how many times you click on
it. But if you click once more on the first one which got updated (i.e.
like button), it wont update and remain as 1 (as needed) and then try to
click on the other (dislike button), the other one then updates to 1 with
the first one updates to 0.

The problem that i noticed was that change function in rave_store.js file
is not been called for the first hit for the other button (dislike). I am
unable to find a way out of it.

example:
initially
like: 0 dislike: 0
first hit on like button
like: 1 dislike: 0
second hit on dislike button
like: 1 dislike: 0 (no change no matter how much you click on dislike
button)
click on like button again
no change
now click on dislike button
like: 0 dislike: 1 (as expected)
here after it works fine.

I have attached my patch file with this. It will have some alert messages
just to know the flow.

Waiting for your reply,

Regards,
Ankur Goyal


On Tue, Nov 29, 2011 at 4:25 PM, Cooper, Sean D. <se...@mitre.org> wrote:

> You might try creating a third radio button for the 'unset' state and have
> it be a hidden element on the page.  That way you can correctly set the
> state of the radio button to 'positive', 'negative' , and 'unset'
>
> -Sean
>
> >-----Original Message-----
> >From: Ankur Goyal [mailto:asgoyal@umail.iu.edu]
> >Sent: Tuesday, November 29, 2011 4:18 PM
> >To: Sean Cooper
> >Cc: Marlon Pierce; Ankur Goyal; rave
> >Subject: Re: Review Request: Rave-359 (WidgetRating UI: Initial load of
> page
> >allows a double click for rating)
> >
> >Hi Sean,
> >
> >I was looking into the problem you mentioned.
> >
> >There is some property called as "aria-pressed" which is always set as
> >"true" for like button and "false" for dislike button after every load of
> >widget store page.
> >
> >I am unable to find where this effect is brought from so thought to ask
> you
> >about this. :)
> >
> >Waiting for your reply,
> >
> >Regards,
> >Ankur Goyal
> >
> >On Mon, Nov 28, 2011 at 2:14 PM, Sean Cooper <se...@gmail.com>
> >wrote:
> >
> >>    This is an automatically generated e-mail. To reply, visit:
> >> https://reviews.apache.org/r/2917/
> >>
> >> This patch is forcing the button state to highlight the 'negative'
> option when
> >using chrome or firefox regardless of whether or not the user has already
> >selected one of the options (e.g. If the user has selected the 'positive'
> option
> >the 'negative' option is showing up as being selected)
> >>
> >>
> >> - Sean
> >>
> >> On November 22nd, 2011, 10:05 p.m., Ankur Goyal wrote:
> >>   Review request for rave and Marlon Pierce.
> >> By Ankur Goyal.
> >>
> >> *Updated 2011-11-22 22:05:24*
> >> Description
> >>
> >> WidgetRating UI: Initial load of page allows a double click for rating
> >> Files modified:
> >> rave_store.js
> >> store.jsp
> >>
> >>   Diffs
> >>
> >>    - trunk/rave-portal-resources/src/main/webapp/WEB-
> >INF/jsp/views/store.jsp
> >>    (1205187)
> >>    - trunk/rave-portal-resources/src/main/webapp/script/rave_store.js
> >>    (1205187)
> >>
> >> View Diff <https://reviews.apache.org/r/2917/diff/>
> >>
>

RE: Review Request: Rave-359 (WidgetRating UI: Initial load of page allows a double click for rating)

Posted by "Cooper, Sean D." <se...@mitre.org>.
You might try creating a third radio button for the 'unset' state and have it be a hidden element on the page.  That way you can correctly set the state of the radio button to 'positive', 'negative' , and 'unset'

-Sean

>-----Original Message-----
>From: Ankur Goyal [mailto:asgoyal@umail.iu.edu]
>Sent: Tuesday, November 29, 2011 4:18 PM
>To: Sean Cooper
>Cc: Marlon Pierce; Ankur Goyal; rave
>Subject: Re: Review Request: Rave-359 (WidgetRating UI: Initial load of page
>allows a double click for rating)
>
>Hi Sean,
>
>I was looking into the problem you mentioned.
>
>There is some property called as "aria-pressed" which is always set as
>"true" for like button and "false" for dislike button after every load of
>widget store page.
>
>I am unable to find where this effect is brought from so thought to ask you
>about this. :)
>
>Waiting for your reply,
>
>Regards,
>Ankur Goyal
>
>On Mon, Nov 28, 2011 at 2:14 PM, Sean Cooper <se...@gmail.com>
>wrote:
>
>>    This is an automatically generated e-mail. To reply, visit:
>> https://reviews.apache.org/r/2917/
>>
>> This patch is forcing the button state to highlight the 'negative' option when
>using chrome or firefox regardless of whether or not the user has already
>selected one of the options (e.g. If the user has selected the 'positive' option
>the 'negative' option is showing up as being selected)
>>
>>
>> - Sean
>>
>> On November 22nd, 2011, 10:05 p.m., Ankur Goyal wrote:
>>   Review request for rave and Marlon Pierce.
>> By Ankur Goyal.
>>
>> *Updated 2011-11-22 22:05:24*
>> Description
>>
>> WidgetRating UI: Initial load of page allows a double click for rating
>> Files modified:
>> rave_store.js
>> store.jsp
>>
>>   Diffs
>>
>>    - trunk/rave-portal-resources/src/main/webapp/WEB-
>INF/jsp/views/store.jsp
>>    (1205187)
>>    - trunk/rave-portal-resources/src/main/webapp/script/rave_store.js
>>    (1205187)
>>
>> View Diff <https://reviews.apache.org/r/2917/diff/>
>>

Re: Review Request: Rave-359 (WidgetRating UI: Initial load of page allows a double click for rating)

Posted by Ankur Goyal <as...@umail.iu.edu>.
Hi Sean,

I was looking into the problem you mentioned.

There is some property called as "aria-pressed" which is always set as
"true" for like button and "false" for dislike button after every load of
widget store page.

I am unable to find where this effect is brought from so thought to ask you
about this. :)

Waiting for your reply,

Regards,
Ankur Goyal

On Mon, Nov 28, 2011 at 2:14 PM, Sean Cooper <se...@gmail.com> wrote:

>    This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/2917/
>
> This patch is forcing the button state to highlight the 'negative' option when using chrome or firefox regardless of whether or not the user has already selected one of the options (e.g. If the user has selected the 'positive' option the 'negative' option is showing up as being selected)
>
>
> - Sean
>
> On November 22nd, 2011, 10:05 p.m., Ankur Goyal wrote:
>   Review request for rave and Marlon Pierce.
> By Ankur Goyal.
>
> *Updated 2011-11-22 22:05:24*
> Description
>
> WidgetRating UI: Initial load of page allows a double click for rating
> Files modified:
> rave_store.js
> store.jsp
>
>   Diffs
>
>    - trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/store.jsp
>    (1205187)
>    - trunk/rave-portal-resources/src/main/webapp/script/rave_store.js
>    (1205187)
>
> View Diff <https://reviews.apache.org/r/2917/diff/>
>

Re: Review Request: Rave-359 (WidgetRating UI: Initial load of page allows a double click for rating)

Posted by Sean Cooper <se...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/2917/#review3539
-----------------------------------------------------------


This patch is forcing the button state to highlight the 'negative' option when using chrome or firefox regardless of whether or not the user has already selected one of the options (e.g. If the user has selected the 'positive' option the 'negative' option is showing up as being selected)

- Sean


On 2011-11-22 22:05:24, Ankur Goyal wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/2917/
> -----------------------------------------------------------
> 
> (Updated 2011-11-22 22:05:24)
> 
> 
> Review request for rave and Marlon Pierce.
> 
> 
> Summary
> -------
> 
> WidgetRating UI: Initial load of page allows a double click for rating
> Files modified:
> rave_store.js
> store.jsp
> 
> 
> Diffs
> -----
> 
>   trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/store.jsp 1205187 
>   trunk/rave-portal-resources/src/main/webapp/script/rave_store.js 1205187 
> 
> Diff: https://reviews.apache.org/r/2917/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Ankur
> 
>