Message Filters, move up and down by 10 entries

ASSIGNED
Assigned to

Status

MailNews Core
Filters
--
enhancement
ASSIGNED
7 years ago
3 years ago

People

(Reporter: Andria Hunter, Assigned: aceman)

Tracking

({uiwanted})

Trunk
uiwanted

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [filter-mgmt][gs], URL)

Attachments

(1 attachment, 1 obsolete attachment)

6.73 KB, patch
bwinton
: feedback+
Details | Diff | Splinter Review
(Reporter)

Description

7 years ago
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; OfficeLiveConnector.1.3; OfficeLivePatch.0.0; .NET4.0C; .NET4.0E; InfoPath.2; InfoPath.1)

Steps to reproduce:

One of the best features of Thunderbird is that it has the ability to store an unlimited number of Message Filters.  The problem with the current interface is that once you create a message filter, you can use a "Move Up" and "Move Down" button to move the entry down the list one at a time.  If the list is long, this can be a very cumbersome process.  The only way to do this quickly now is to use a plain text editor to manually edit the filter file.


Actual results:

Can only move a message filter entry down the list one item at a time.  Very slow process when you have lots of message filters.


Expected results:

It would be excellent to have buttons to allow a filter to be moved up and down by 10 or 25 entries at a time!  Perhaps even a button to quickly move it to the end of the list.
(Reporter)

Comment 1

7 years ago
Another idea would be to have a button to quickly resort the whole list of filters alphabetically.
Component: General → Filters
Product: Thunderbird → MailNews Core
QA Contact: general → filters
Whiteboard: dupme
Version: 3.1 → Trunk

Comment 2

7 years ago
(In reply to Andria Hunter from comment #1)
> Another idea would be to have a button to quickly resort the whole list of
> filters alphabetically.

Bug 461153. And it's a better, more generic solution IMO than comment 0, which i don't think would pass UI-review

comment 1 is reporter's, let's assume Andria approves of duping :)
Status: UNCONFIRMED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 461153
(Assignee)

Comment 3

7 years ago
Bug 461153 doesn't seem to have anything like this. Was that a typo?
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---

Comment 4

7 years ago
quite right - I have folder names on the brain. Now that you've corrected me ...

a) I don't understand how comment 1 helps with comment 0. unless they are completely separate ideas, in which case comment 1 needs a new bug (but I frankly don't see the use case)

b) wouldn't drag and drop (do a direct location) be more useful than moving a filter by 10?  assuming a performant solution exists

lastly, is ludo correct in thinking this is a duplicate?
Summary: Request new feature -- Message Filters, move up and down by 10 entries → Message Filters, move up and down by 10 entries
(Assignee)

Comment 5

7 years ago
Comment 1 seems to be a separate request. I also don't see the use case, as the order of filters is important. Maybe if somebody encoded the final order into the filter names and then sorted them.

Drag and drop doesn't seem to exist currently. I think button moving to top or bottom could be useful.
(Assignee)

Comment 6

7 years ago
I think I could even make a patch for the top/bottom operations.
But it adds buttons and would touch this interface:
[scriptable, uuid(d067b528-304e-11d3-a0e1-00a0c900d445)]
interface nsMsgFilterMotion {
    const long up = 0;
    const long down = 1;
};

So there must me consensus that this is wanted.
Severity: normal → enhancement
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: uiwanted
OS: Other → All
Whiteboard: dupme → [filter-mgmt][DUPEME]
(Assignee)

Comment 7

6 years ago
I didn't get a reply yet if any of the mentioned features are wanted:
1. move up/down by 10 (or any other constant)
2. move to top/bottom of the list

I think I would be able to code something here. I've currently doing bug 103684 where it is at least possible to place a new filter directly at the wished location.

(The ordering of filters is bug 256582.)
Whiteboard: [filter-mgmt][DUPEME] → [filter-mgmt]

Comment 8

6 years ago
The two mods you suggest would seem to take some of the pain out of the existing defects but I don't see it as proper solution. 

Up/down buttons would be enough if they could auto-repeat but if that behaviour is not build into the widget in the underlying library that is not available without changing the lib. 

The other solution that would simple and intuitive is dragging within the list. Again, I don't know whether that is available, that could be checked.

What probably could be done fairly simply would some key combination since keys do auto-repeat.

Once an item is selected some combo like cntl+up_arrow that is not already assigned could be used to shift an item up in the list in the same way that up button does.

Minimal coding required, no added clutter by adding buttons.

Comment 9

6 years ago
Move up+down would require another set of buttons which I think is less ideal (and prob won't pass UI review) than making the buttons repeat, plus add an acceleration factor when holding down more than X seconds.

Dragging by mouse would be great too, but then you have to deal with discoverability.
(Assignee)

Comment 10

6 years ago
What about click on Move up with Ctrl held moves by 10 entries?

Comment 11

6 years ago
Wayne: making the buttons repeat,

I think this is the best from user's point of view but how possible it?

What library provides the widget set that include the buttons. 

If it's gtk+ and it does not already have that (I don't know - I'm asking) you will be in for a 10 year campaign to make anything change in gtk+ . That project is so refractory to change and sure their ideas are already perfect, there's basically no way to get any change without maintaining you own local build.


@aceman: ten up, then five down , like I said above, it would reduce the pain but it more of a workaround than a good solution. 

I think auto repeat is the most useful solution, look if this can be done with buttons though I doubt it. Otherwise, keys can autorepeat, so see if you can catch the keydown event on the arrow keys and check for cntl-key being down. Use this to trigger the "move up" code.

I have not looked at the code but I think it should be simple to implement.

;)
(Assignee)

Comment 12

6 years ago
Ah, plain keys you mean. Good idea. That should be possible. Notice you can already press Space to activate/deactivate a filter. Also you can use arrow keys to move the focus. So the infrastructure is there. I'll look into it if I can add more keys.
(Assignee)

Comment 13

6 years ago
But actually, there already are accesskeys for the existing buttons. Holding Alt-D moves the filter down quickly. Does it not work for you?
(Assignee)

Comment 14

6 years ago
Created attachment 611302 [details] [diff] [review]
patch

So the patch adds this:
Ctrl+PageUp/PageDown = move up/down by 10 steps
Ctrl+Move Up/Move Down = move up/down by 10 steps
Ctrl+Home/End = move to top/bottom

The buttons got tooltips to announce this functionality (exact wording subject to proposals).

I don't know what modifier is available on Mac so I used "Meta" (in addition to Ctrl).

There is one problem with Ctrl+PageUp/PageDown that the widget makes its own movement of the focus ring in this case and does not land back on the moved filter (it moves by page, not 10 fixed steps). I tried to suppress this, but event.stopPropagation() does not seem enough.

So, bwinton, can you now choose which of these options to keep or refine and which to axe?
Assignee: nobody → acelists
Status: NEW → ASSIGNED
Attachment #611302 - Flags: feedback?(bwinton)

Comment 15

6 years ago
"Holding Alt-D moves the filter down quickly. Does it not work for you?"

Why the hell would I be holding down Alt-D ?? Thanks for telling me ;) 

The other keystrokes in the patch seem like a good addition to functionality that should make organising the filters a whole lot easier. Thanks for fixing that. 

One problem I have (linux) is that the list is not updated and there is no feedback that I am even getting an autorepeat until I release the alt key , then the item jumps some unknown number of positions down the list. 

To be useful I need to see the effect of each event on the list at each shift event, not just guess in my head how far it has got then try to adjust any overshoot equally blindly later.
(Assignee)

Comment 16

6 years ago
(In reply to ffux from comment #15)
> Why the hell would I be holding down Alt-D ?? Thanks for telling me ;) 
Because it is the accesskey marked on the Move Down button, at least in the en-US version :)

> One problem I have (linux) is that the list is not updated and there is no
> feedback that I am even getting an autorepeat until I release the alt key ,
> then the item jumps some unknown number of positions down the list. 
> 
> To be useful I need to see the effect of each event on the list at each
> shift event, not just guess in my head how far it has got then try to adjust
> any overshoot equally blindly later.
That is true, I have noticed it. I actually implement the jump by 10 as a loop of 10 repeats of Move by 1. But individual moves are not shown and the filter jumps by 10 atomically. Even though implementation of Move by 1 contains refresh of the filter list. Maybe the widget is not re-drawn until control is returned back from JS. I am not sure what can be done about it but I would also want it to behave as you describe.
I could hack around it like this (calling the moves asynchronously from setTimeout):

function realDown(repeat) {
  if (!document.getElementById("reorderDownButton").disabled && repeat >= 1) {
    moveCurrentFilter(Components.interfaces.nsMsgFilterMotion.down);
    setTimeout(realDown, 0, repeat - 1);
  }
}

function onDown(event)
{
  let repeat = (event.ctrlKey || event.metaKey) ? 10 : 1;
  setTimeout(realDown, 0, repeat);
}

But I am not sure this is wanted, code wise ;)

It looks like you are able to apply and test the patch. Is that true? That would be great.
(Assignee)

Comment 17

6 years ago
If the focus problem from Ctrl-PgUp is solved, we could throw in Ctrl-Up as Move up by 1, just for consistency.

Comment 18

6 years ago
I'm not sure you are understanding my last post. Firstly I am on normal release Earlybird 8.0 , not building from your patch.

My comment about refreshing the list is when doing Alt-D and holding down. Auto-repeat is clearly happening but the result is only visible when I release the key.
(Assignee)

Comment 19

6 years ago
Yes I understand it now. Alt-D available in the official releases and has the problem you describe. I have a fix for that in comment 16, let's see what the UI guys approve.
(Reporter)

Comment 20

6 years ago
I made the original post for this feature, and thought I would followup to say that it will be very nice to have the ability to move a filter by 10 entries using the keys.  I have more than 700 filters, so it will still take some time to organize the list, but certainly an improvement over having to use a button to move a filter one entry at a time.  Much thanks for everyone's work on this!
(Assignee)

Comment 21

6 years ago
Created attachment 615029 [details] [diff] [review]
patch v2

This implements refresh of the filter list after each step of moving a filter DOWN (even when pressing the Move by 10 key).
The UP direction moves the filter atomically for the needed number of steps and does not refresh the list in the mean time. So when holding the key it is not seen what is done (see comment 18).

Can I request a try server build for this (all platforms) so that the commenters can try it out?
Attachment #611302 - Attachment is obsolete: true
Attachment #615029 - Flags: feedback?(bwinton)
Attachment #611302 - Flags: feedback?(bwinton)
(Assignee)

Comment 22

6 years ago
Bwinton, it was not yet decided where it would be better to add new buttons for these functons (Move by 10 (Page) Up/down, Move to Top/Bottom). You can comment on that too.
Comment on attachment 615029 [details] [diff] [review]
patch v2

So, I think this is along the right lines, but there's a bunch of work left to do before it's ready for review.

> So the patch adds this:
> Ctrl+PageUp/PageDown = move up/down by 10 steps
> Ctrl+Move Up/Move Down = move up/down by 10 steps

I think this should be 1 step…

> Ctrl+Home/End = move to top/bottom

Also, there are no "PageUp/PageDown" or "Home/End" keys on my laptop…

> I don't know what modifier is available on Mac so I used "Meta" (in addition to Ctrl).

The Mac modifier is "Command", "Cmd", or "⌘".  There is no "Meta" key.  Using "Super" should give you the right key on all platforms.

We should use a different tooltip for Mac than for Windows and Linux.

> There is one problem with Ctrl+PageUp/PageDown that the widget makes its own movement of the focus ring in this case and
> does not land back on the moved filter (it moves by page, not 10 fixed steps). I tried to suppress this, but
> event.stopPropagation() does not seem enough.

Yeah, I kind of noticed that.  I actually noticed that if I clicked the down button when holding Command, the item moved down one spot ten times, and then didn't focus correctly.

> So, bwinton, can you now choose which of these options to keep or refine and which to axe?

For the keys, I think it's as above.  I also like the new tooltip.  I don't think we want still more buttons.

Does that answer all the questions, or was there something else?

Thanks,
Blake.
Attachment #615029 - Flags: feedback?(bwinton) → feedback+
(Assignee)

Comment 24

6 years ago
(In reply to Blake Winton (:bwinton - Thunderbird UX) from comment #23)
> > So the patch adds this:
> > Ctrl+PageUp/PageDown = move up/down by 10 steps
> > Ctrl+Move Up/Move Down = move up/down by 10 steps
> 
> I think this should be 1 step…
What do you mean with this?

> > Ctrl+Home/End = move to top/bottom
> Also, there are no "PageUp/PageDown" or "Home/End" keys on my laptop…
So what is the solution? So how do you navigate without those keys? do you have any substituting 3-key combos? I hope most people have these keys. Do you propose any other keys?

> Yeah, I kind of noticed that.  I actually noticed that if I clicked the down
> button when holding Command, the item moved down one spot ten times, and
> then didn't focus correctly.
OK, I'll try to reset the focus somehow, when it does not work automatically.

>I also like the new tooltip.  I don't think we want still more buttons.

If no new buttons, how do we advertise the Move to Top/bottom action? Should I add them to the tooltips too? Like "moves filter up, with Super it moves 10 steps, super+home moves to top" ?

> Does that answer all the questions, or was there something else?
What about comment 21, the refresh between each move of filter by 1 position? Even if you decide the move by 10 to be atomic (filter just jumps once to final position), we need the refresh (or asynchronous move via settimeout) for the case of holding down Alt+D.

Comment 25

6 years ago
Most PCs that don't have the Insert/Delete/Home/End/PgUp/PgDn key group allow you to use those functions from the number pad simply by turning off Num Lock.

However, it wouldn't be a bad thing to have buttons available (perhaps as an add-on) for systems where those keys aren't available at all, such as a laptop with no number pad or even somebody using an oddball keyboard design.

Updated

6 years ago
Whiteboard: [filter-mgmt] → [filter-mgmt][gs]
You can use the latest version of quickFilters

http://quickfilters.mozdev.org/version.html#2.5

and the cut / paste buttons to move your filters anywhere you like. Also works for multiple filters and is preferable to moving by a fixed amount of rows, imho. OF course drag and drop might also be nice.
Removing myslef on all the bugs I'm cced on. Please NI me if you need something on MailNews Core bugs from me.
You need to log in before you can comment on or make changes to this bug.