Hi Dejan,

I agree about the ethics of what you're achieving since we don't want
people to see negative votes, it's a smashing idea!

It's a bit confusing to people who aren't watching the vote counts or don't
really know what's going on why these notes are semi-invisible, also vote
counts are subject to people's opinion so negative votes are going to be
hard to read and will result in a negative user experience, we want all
notes to be fully readable regardless of people's opinions.

My suggestion is to actually HIDE the body contents of the negative votes
and have an expand button ... this will:

a) not display negative votes body text and hide them out of sight (this is
what your opacity fix was trying to do)
b) when they do expand them they will be fully visible (not transparent)
and thus won't impact the user's experience.

Proposal code:

$('.note .tally:contains("-")') {

     $(this).find('.text').hide(); // Hide the div
     // @todo - add an arrow beside the ".date" element to let users toggle
the show/hide action

}

Thanks




On Wed, Dec 4, 2013 at 3:38 AM, Dejan Marjanovic <[email protected]> wrote:

> On Wed, Dec 4, 2013 at 4:36 AM, Paul Dragoonis <[email protected]>wrote:
>
>> Hi Dejan,
>>
>> Do you have a URL example of this functionality working on
>> http://prototype.php.net ?
>>
>>
>> On Wed, Dec 4, 2013 at 3:35 AM, Dejan Marjanovic <[email protected]> wrote:
>>
>>> On Wed, Dec 4, 2013 at 4:02 AM, Paul Dragoonis <[email protected]>wrote:
>>>
>>>> Hi Dejan,
>>>>
>>>> Can you explain what this does from a functionality perspective ?
>>>>
>>>> Can you get rid of the "bang bang" as some non-JS gurus might get
>>>> messed up with it in the future.
>>>>
>>>>
>>>> On Wed, Dec 4, 2013 at 2:53 AM, Dejan Marjanovic <[email protected]> wrote:
>>>>
>>>>> Commit:    5bf8f70adc258960802a04e973b23d8d65fe15b3
>>>>> Author:    Dejan Marjanovic <[email protected]>         Wed,
>>>>> 4 Dec 2013 03:53:07 +0100
>>>>> Parents:   54e5393d960618367cd8e6846ab66dc7898097d9
>>>>> Branches:  master
>>>>>
>>>>> Link:
>>>>> http://git.php.net/?p=web/php.git;a=commitdiff;h=5bf8f70adc258960802a04e973b23d8d65fe15b3
>>>>>
>>>>> Log:
>>>>> Fade out user notes with negative votes
>>>>>
>>>>> Changed paths:
>>>>>   M  js/common.js
>>>>>
>>>>>
>>>>> Diff:
>>>>> diff --git a/js/common.js b/js/common.js
>>>>> index a077893..814f1a8 100755
>>>>> --- a/js/common.js
>>>>> +++ b/js/common.js
>>>>> @@ -287,7 +287,22 @@ $(document).ready(function() {
>>>>>          language: getLanguage(),
>>>>>          limit: 3
>>>>>      });
>>>>> -
>>>>> +
>>>>> +/* {{{ Negative user notes fade-out */
>>>>> +  if (!!document.getElementById('usernotes'))
>>>>> +  {
>>>>> +    $('.note .tally:contains("-")').each(function(){
>>>>> +      var id = this.id.replace('V', '');
>>>>> +
>>>>> +      var v = this.innerHTML.toInt();
>>>>> +      v += 6;
>>>>> +      v = v <= 2 ? 2 : v;
>>>>> +
>>>>> +      $('#' + id).css('opacity', '0.' + v);
>>>>> +    });
>>>>> +  }
>>>>> +/* }}} */
>>>>> +
>>>>>  });
>>>>>
>>>>>  /**
>>>>>
>>>>>
>>>>> --
>>>>> PHP Webmaster List Mailing List (http://www.php.net/)
>>>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>>>
>>>>>
>>>>
>>> Hi Paul,
>>>
>>>
>>> I've added some logic to it:
>>> https://github.com/php/web-php/commit/9c118193b50e8e2ea076b3f29c7db54d409e75c8
>>>
>>> Obfuscating code/logic doesn't make a guru, that wasn't my intent, I
>>> just wrote quick working version :)
>>>
>>> I suggested it in #php.doc and idea got approved by bjori. It simply
>>> fades out negative vote notes.
>>>
>>
>>
> Hi,
>
> Can be seen here:
> http://prototype.php.net/manual/en/function.preg-match.php#93016 (notice
> how more negative votes have less opacity)
>

Reply via email to