Folders4Gmail

By Arend Last update Mar 4, 2010 — Installed 163,635 times.

Drag + Drop -- expand folder on hover?

in
Subscribe to Drag + Drop -- expand folder on hover? 5 posts, 2 voices



Taylor Barstow User
FirefoxMacintosh

In most desktop email clients, when you drag one or more messages over a folder which contains child folders, the parent folder will expand, giving the user access to its children.

It would be SWEET if your script could do this with gmail.

I am a programmer so I could try hacking this myself. Is this something you've thought about?

The obvious hurdle is knowing when the user is dragging something over a label, as opposed to a normal hover.

Maybe this will work:

1. Register for mousedown and mouseup on document.body
- Maintain a variable "mouseButtonActive" such that it
will be true if and only if the mouse button is currently
pressed

2. Register for mouseover on a label:
- If mouseButtonActive:
// Assume the user is dragging something:
- Set a timer to "expand" the label after ~500ms

3. Register for mouseout on a label:
- Clear any timer set by a mouseover

What do you think? It's not perfect and does produce a false positive, but only under pretty specific and uncommon circumstances. I'd be happy to work on this if you think it's worthwhile.

Thanks for this script! Very useful.

Taylor

 
Taylor Barstow User
FirefoxMacintosh

sorry, my formatting got a little screwed up. this is more readable:

1. Register for mousedown and mouseup on document.body
   - Maintain a variable "mouseButtonActive" such that it 
     will be true if and only if the mouse button is currently 
     pressed

2. Register for mouseover on a label:
   - If mouseButtonActive:
     // Assume the user is dragging something:
     - Set a timer to "expand" the label after ~500ms

3. Register for mouseout on a label:
   - Clear any timer set by a mouseover

 
Arend Script's Author
FirefoxWindows

that's a nice idea. :-) I'll look into it.

 
Taylor Barstow User
FirefoxMacintosh

Hi Arend -- did you ever try this? I'm just curious because if not I think I will give it a shot.

Thanks!
Taylor

 
Arend Script's Author
FirefoxWindows

Hi Taylor,

unfortunately, I'm pretty busy at the moment and I don't have much time for Folders4Gmail. :-(

So yes, it would be great if you gave it a shot.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel