Roundcube Community Forum

 

new plugin: message highlighting

Started by corbosman, June 22, 2010, 10:18:24 AM

Previous topic - Next topic

corbosman

I released a new version 1.1 that works with RC 0.5. You can get it here:  Roundcube Plugins | Underwater World

corbosman

Sorry, released another version right away. 1.11.  This fixes the issue from the thread above regarding not finding CC.   This was due to RC not fetching the CC header for the message list. I add it now to the headers to be fetched, and that fixes the issue.

leduc

Hello, this plugin runs really great, but I have a request :

Is it possible to use your plugin in complement to the flags plugin ?

This plugin put flags in the headers message but don't color the row.

To make like the flags in Thunderbird.

SKaero

Quote from: leduc;34108Hello, this plugin runs really great, but I have a request :

Is it possible to use your plugin in complement to the flags plugin ?

This plugin put flags in the headers message but don't color the row.

To make like the flags in Thunderbird.
Sounds like you want this plugin: http://www.roundcubeforum.net/7-third-party-contributions/46-api-based-plugins/8207-new-plugin-beta-labels.html

corbosman

Cant you just use both plugins? One for flags, one for colors?

xpresshred


leduc

I already use both, but the flags plugin doesn't colorised row.

In fact, I would now how to get the header flag  from Imap to add in your plugin, anybody know ?

And after configure the color for the different flag with the plugin like any other possibility (object, from ... and flag :) ).

corbosman

so you want row colors based on flags? You'd have to ask the flags plugin author to add row colors.

Joinon

#68
Hi, this is the chinese translation for V1.11

Mighty

#69
Color picker still doesn't work in Firefox v5.0 release.

I'm an experienced programmer, but new to JQuery.  I've skimmed the code, but nothing obvious is jumping out at me.  I threw a debug statement into the Save method and apparently the color array is coming back empty.

Can anyone point me at a quick fix?  Maybe a pointer to a likely area that might cause this issue?  Or, to an alternate color picker that will slip in easily?

I may just rip out the picker and change it to a text field, for now.  Didn't think of that last night when I was tired.

Anyway.  Maybe the author can take a look at this.  Or, if anyone has any suggestions and I get it working then I'll post back with my changes.

Drake

P.S. Oh, yeah.  Brand new install, 0.5.3.  message_highlight is the first plugin I have installed.  It's the only one installed, so far.

rosali

Cor, there is another bug.

If I have only one highlight definition and try to delete it, I get back an empty settings iframe. When entering the highlight settings section again. The item is shown again. So, it looks like it isn't possible to delete the last remaining item.
Regards,
Rosali

Mighty

Here's a brute-force workaround for Firefox, to remove the color picker and just have a text box.  I only had to touch three spots in the file message_highlight.php:

Line 25:
Comment out the color picker Javascript file
// myt    $this->include_script('colorpicker/mColorPicker.js');

Line 109:
Change the control to a text field
// myt    $color = html::tag('input', array('id' => uniqid() ,'name' => '_mh_color[]' ,'type' => 'color' ,'text' => 'hidden', 'class' => 'mh_color_input', 'value' => $color));
$color = new html_inputfield(array('name' => '_mh_color[]', 'class' => 'rcmfd_mh_input', 'type' => 'text', 'autocomplete' => 'off', 'value' => $color));


Line 121:
Change the method to extract the data from the control
// myt      html::span('mh_color', Q($this->gettext('mh_color'))) .
// myt      $color .
      $color->show() .


These changes will work in any browser that Roundcube works in to begin with.

Just as a bit of feedback.  I was able to try the color picker, even though it wouldn't actually save the values.  I found it pretty awkward to use.  When typing in values, if I accidentally moved the mouse over the swatch while moving to the "Add Row" or "Save" buttons it would change the value, losing my data.  If I clicked outside of the picker to make it go away, it would often discard my change.  And just trying to decide exactly where to click in the box didn't seem to have enough feedback.  It felt random.

Golden Rule of Programming:  Don't lose the user's data.

I don't know if you've seen Squirrelmail's message highlight color picker.  It's pretty brute-force, but very easy to use.  In addition to the text field to type in a value, there are either 32 or 64 common colors shown as labels to radio buttons.  It takes up a lot of screen space, and it's not elegant, but it's bullet-proof.  And, it makes it much easier to repeat colors from one entry to the next.

And I guess this would count as a feature request.  One other thing that their picker had was a label you could add to each highlight entry.  I would use this as a reminder of what a particular entry was there for, so that I didn't have to look at the match criterion and try to decipher it and remember what I was checking for.

Drake

corbosman

On which OS do you see these issues? On OSX with Firefox 5.01 it works for me.  The color picker isnt the greatest, but i couldnt immediately find a nicer one. It would be nice if roundcube offered a default color picker to use. I think the squirrelmail solution is ugly as sin and not suitable for a modern webmail client like roundcube :)  

One thing I dont understand though. In my browser (FF 5.01 on OSX 10.6.8) the color picker disappears once I pick a color. It doesnt linger around for you to accidentally hover over it. And if you actually click on a color in a row that already exists, and hover over the picker, the color picker will indeed change colors, but the moment the mouse moves out of the picker, your color goes back to normal. This is how it should work, and how it works for me right now. I never intend to change anything unless you click to pick the color.

corbosman

Quote from: rosali;35871Cor, there is another bug.

If I have only one highlight definition and try to delete it, I get back an empty settings iframe. When entering the highlight settings section again. The item is shown again. So, it looks like it isn't possible to delete the last remaining item.

Can you explain this a bit more? I can delete the last remaining item just fine. Once the last remaining item is deleted, you're presented with an empty row that you can fill out. Sort of a first row that you can fill out to start.  I did not know of a better way to do that. I think I copied some of these UI choices from the sieve filter plugin.

Mighty

Quote from: corbosman;35884On which OS do you see these issues?

I'm running Win7 64-bit.

Yeah, I expected it to go away when I picked a color, or typed in a value and hit enter.

It sounds like this behavior is related to the empty color array.  It's never executing the code to actually pull the value out of the control and hide it.

I'm comfortable just typing in the hex values, so my text field hack works for me.  I've already got my highlights moved over from my old system.  I'm subscribed to this thread, so if you come up with something that you'd like me to test then I'm happy to do that for you.

Drake