Open Bug 497348 Opened 15 years ago Updated 2 years ago

Scroll to recently selected/new messages immediately when switching folder

Categories

(Thunderbird :: Folder and Message Lists, defect)

defect

Tracking

(blocking-thunderbird3.1 -)

Tracking Status
blocking-thunderbird3.1 --- -

People

(Reporter: djst, Unassigned)

References

(Blocks 1 open bug, )

Details

Whenever I switch IMAP folder in Thunderbird/Shredder, e.g. between Inbox and Sent, Tb wants to resync with the server _before_ it selects the previously selected message. This order (resync first; select email afterwards) slows me down everytime I switch between folders, and it makes Tb feel slower than it actually is.

Maybe this screencast best describes the problem: http://screencast.com/t/govNyo7b

Note that in this screencast, my connection to the IMAP server is unusually responsive. Most of the time, it takes several seconds to resync, and I'm better off scrolling down manually and select the message.

Steps to reproduce:

1. Use an IMAP account.
2. Select your Inbox folder.
3. Select your Sent folder.

Expected results:
The previously selected email should immediately be selected, and then a server resync should be performed.

Actual results:
A server resync is performed, and _then_ the previously selected email is selected.
I expect this was a regression from bug 498106, although I don't actually get a message reselected even when I had one already selected...
Blocks: 498106
Flags: blocking-thunderbird3?
(In reply to comment #1)
> I expect this was a regression from bug 498106, although I don't actually get a
> message reselected even when I had one already selected...

This bug was filed before bug 474701 landed, so bug 498106 cannot have caused this.  The refactoring uses the same logic as the original code intentionally.

However, we have since intentionally removed the ability to automatically select the last selected message because of the assumption that the folder summary will land soon and that usable/reliable tabs obviate the need for the persistent selection.  (And the logic was complicating things.)

I agree that we generally should be performing whatever scrolling is required immediately.  This would then be augmented by potentially scrolling some more once new messages have arrived if we are "snapped"/"locked" to the bottom of the list and the new messages show up at the bottom.  If new messages show up at the top, it all just works out for us.

I am marking this as blocking 497199 even though this is not a regression because that's where all the important bugs on the subject currently end up.
Blocks: gloda-ui-regressions
No longer blocks: 498106
Component: Mail Window Front End → Folder and Message Lists
QA Contact: front-end → folders-message-lists
Summary: Select previously selected message immediately when switching folder → Scroll to recently selected/new messages immediately when switching folder
(In reply to comment #2)
> However, we have since intentionally removed the ability to automatically
> select the last selected message because of the assumption that the folder
> summary will land soon and that usable/reliable tabs obviate the need for the
> persistent selection.  (And the logic was complicating things.)

Does this mean that the action when selecting a folder will soon be to show a folder summary rather than going back to the last viewed message? In that case I would strongly suggest that you reconsidered that. As useful and interesting the folder summary might be, I'd be willing to bet money that showing the last viewed message will be more useful 99% of the time. 

Switching between Inbox and Sent is one of my most common actions in Thunderbird and I can't imagine that my behavior is particularly unique. Of course, this would all be solved if there was a neat way to group mail by conversations, so you didn't have to switch between Inbox and Sent in the first place. :)
(In reply to comment #3)
> Does this mean that the action when selecting a folder will soon be to show a
> folder summary rather than going back to the last viewed message? In that case

Yes.

> Switching between Inbox and Sent is one of my most common actions in
> Thunderbird and I can't imagine that my behavior is particularly unique. Of

Why don't tabs work for this?

> course, this would all be solved if there was a neat way to group mail by
> conversations, so you didn't have to switch between Inbox and Sent in the first
> place. :)

Threading now works in virtual folders.  If you create a virtual folder that encompasses both your Inbox and your Sent folder and use a threaded display, things should work.

Having said that, gloda (the global database) also enables this if the messages have been indexed.  The 'if' is a big 'if' right now, so we're still working on that.  Look for something more reliable and happy in beta 4.
(In reply to comment #4)
> > Switching between Inbox and Sent is one of my most common actions in
> > Thunderbird and I can't imagine that my behavior is particularly unique. Of
> 
> Why don't tabs work for this?

From my perspective it is a different way of working to what we've been used to.

From a number of clicks it is more clicks/presses - shift-middle click to open tab in foreground (bug 505180).

What could be nice is if there is no new messages in a folder, scroll back to the roughly the location of the message that was last selected. Hence making it easier to get back to where you were.
(In reply to comment #5)
> From a number of clicks it is more clicks/presses - shift-middle click to open
> tab in foreground (bug 505180).

I think it has been proposed that if you have a tab open for a folder, then clicking on that folder in the folder pane just switches to that tab.  This would neatly moot the point.

> What could be nice is if there is no new messages in a folder, scroll back to
> the roughly the location of the message that was last selected. Hence making it
> easier to get back to where you were.

This is problematic in the face of improving our behavior in the face of IMAP folder entry.  (This is tied up with the bug you commented about elsewhere where we transiently displayed account central on entry of empty IMAP folders until the call to updateFolder returned).  Since it can take a very perceptible amount of time before the updateFolder call returns, we need to be where the new messages are going to show up if we don't want to look like we are insanely jumping around all over the place.

I think the best solution for now, besides doing that thing I said above about having the folder pane be aware of already-open tabs, is to punt "super folder memory" off to an extension.  It could super-remember your exact scroll position, exact selection, etc.  Presumably that extension could also bake in good behavior in the face of new/moved messages and then we could consider taking that logic once it gets good.

Note: The code we removed was itself somewhat limited in that it only persisted the message key and so did not work on cross-folder virtual folders.
Extension or not, the default behavior should be the most typical action that makes the most sense. I'm not convinced seeing a summary of a folder is what most people would like, but I could be wrong.

(In reply to comment #4)
> > Switching between Inbox and Sent is one of my most common actions in
> > Thunderbird and I can't imagine that my behavior is particularly unique. Of
> 
> Why don't tabs work for this?

Using tabs just feels like an artificial workaround for such a common use case as switching between mail folders. The folder sidebar is there for a specific reason, so switching by clicking on another UI element (the tab bar) rather than clicking straight on the folder sidebar just isn't intuitive. I could force myself to learn that usage, of course, but that doesn't make the design choices better in my opinion.

> Threading now works in virtual folders.  If you create a virtual folder that
> encompasses both your Inbox and your Sent folder and use a threaded display,
> things should work.

That sounds like something that I would consider making the default behavior, or at least making it easy to switch to this behavior for people that don't even know what a "virtual folder" is. Grouping mail by conversation/thread is one of the features that really made Gmail more useful than many other web based e-mail services (other than the massive storage space!), so it would be nice to see some of those neat ideas make its way into Thunderbird 3.

In any case, thanks for the tip; I will try it out.
Blocks: 505044
Assignee: nobody → clarkbw
Whiteboard: [need input clarkbw]
No longer blocks: 505044
Since the folder summary - bug 492158 is not landing w/ TB3.0 selection of a previous message will probably go back to what it was before, via bug 505044.

However this bug for me, has been about a separate issue. We sync messages before displaying the list, which causes the appearance of slow response times.  As described in comment 0 when you click into a folder we sync the messages and then scroll to the new or last selected after sync.  This is the wrong order.

I believe that in order to fix this we need a better scrolling strategy than we currently have.  asuth and I had talked about several different ways to change the current scroll behavior and I believe we need to pick our best one and use that.  I would use this bug to continue that discussion of scroll strategy, leaving the last message selection state to the other bugs.
As bug 505044 has restored the remembering of scroll position, the drivers are happy that this is enough for Thunderbird 3. Post Thunderbird 3 we'd like to look at this and related issues more, and therefore not blocking Thunderbird 3 but proposing for 3.1.
Flags: blocking-thunderbird3?
Flags: blocking-thunderbird3.1?
Flags: blocking-thunderbird3-
blocking-thunderbird3.1: --- → -
Flags: blocking-thunderbird3.1?
I feel like we have a pretty good grasp of what we want to do here, this is a fairly typical scrolling window behaviour.  Perhaps we can target this bug for post-3.1
Whiteboard: [need input clarkbw]
Flags: wanted-thunderbird+
Fwiw, there's an add-on that does exactly what I'm requesting in this bug: Last Message (https://addons.mozilla.org/en-US/thunderbird/addon/246793/)

It makes a *huge* difference to the perceived snappiness/performance of Thunderbird!
I shouldn't be the assignee for these bugs.  Filter against clarkbfilter to delete all these from your emails.
Assignee: clarkbw → nobody
See Also: → 539468
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.