Closed
Bug 731145
Opened 13 years ago
Closed 10 years ago
Provide a checkbox for "default offline.autoDetect" option
Categories
(Thunderbird :: Preferences, defect)
Thunderbird
Preferences
Tracking
(thunderbird38 fixed)
RESOLVED
FIXED
Thunderbird 37.0
Tracking | Status | |
---|---|---|
thunderbird38 | --- | fixed |
People
(Reporter: stransky, Assigned: aceman)
References
Details
Attachments
(2 files, 10 obsolete files)
8.87 KB,
patch
|
neil
:
review+
|
Details | Diff | Splinter Review |
2.43 KB,
patch
|
rkent
:
review+
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #391732 +++
I believe Thunderbird should provide a checkbox for it (in Offline Settings dialog), because the offline mode is more used than in Firefox, the online/offline status autodetection may be buggy (depends on wifi drivers and so) or the user may want to control it manually (bandwidth save for instance).
Reporter | ||
Updated•13 years ago
|
Summary: Provide a checkbox for "default offline.autoDetect" options → Provide a checkbox for "default offline.autoDetect" option
Reporter | ||
Comment 1•13 years ago
|
||
Btw. Why is the "File -> Offline -> Offline Settings..." disabled? It still works from "Edit -> Preferences -> Advanced -> Network & Disk Space".
Reporter | ||
Comment 2•13 years ago
|
||
I hope it's correct, it's my first GUI patch ;-) Mark, I guess you're a right person to review this one?
Attachment #604051 -
Flags: review?
Reporter | ||
Updated•13 years ago
|
Attachment #604051 -
Flags: review? → review?(mbanner)
Reporter | ||
Comment 3•13 years ago
|
||
Comment 4•13 years ago
|
||
Maybe the wording should be something like "Detect network state automatically"? I don't think it's clear what is automatic as is.
Please also add an accesskey, and the file header should be mpl2 now
http://www.mozilla.org/MPL/headers/
Reporter | ||
Comment 5•13 years ago
|
||
Thanks for the comments, there's the updated one.
Attachment #604051 -
Attachment is obsolete: true
Attachment #604366 -
Flags: review?(mbanner)
Attachment #604051 -
Flags: review?(mbanner)
Comment 6•13 years ago
|
||
Comment on attachment 604366 [details] [diff] [review]
v2
Start off with ui/ux review, then we'll review the code once the experience is okayed.
Attachment #604366 -
Flags: review?(mbanner) → ui-review?(bwinton)
Comment 7•13 years ago
|
||
Comment on attachment 604366 [details] [diff] [review]
v2
So, I've got some UI comments below, but while I was trying to find them a few things jumped out at me…
>+++ b/mail/components/preferences/offline.js
>@@ -0,0 +1,49 @@
>+# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
>+# ***** BEGIN LICENSE BLOCK *****
>+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
(Just to save time in your next review, this should be the much shorter MPL2 header…)
>+++ b/mail/components/preferences/offline.xul
>@@ -43,26 +43,35 @@
> <prefwindow id="OfflineSettingsDialog" type="child"
> xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
>+ onload="gOfflineDialog.dialogSetup();"
> dlgbuttons="accept,cancel"
> title="&offlineDialog.title;">
>
> <prefpane id="OfflineSettingsDialogPane">
> <preferences id="OfflineSettingsPreferences">
>+ <preference id="offline.autoDetect" name="offline.autoDetect" type="bool"
>+ onchange="gOfflineDialog.dialogSetup();"/>
Why are you calling this function twice?
>+++ b/mail/locales/en-US/chrome/messenger/preferences/offline.dtd
>@@ -1,10 +1,12 @@
>+<!ENTITY textAutoDetect "Detect network state automatically">
Since all the other strings here use "online state", I think this should be "Detect online state automatically".
As for the UI…
It seems to me that the "autoDetect" you've implemented kind of controls the rest of the screen, yet it's at the same level of indent as the other things. (Check the "Manual proxy configuration" option in the Connection Settings dialog for an example of how I think it should look.)
But that kind of raises another problem. It seems to me that I would want to be able to choose whether to download or send messages even if I had chosen to detect the network state automatically. So those shouldn't be enabled or disabled. And at that point, I think it might be clearer to just make it one of the options in the "When starting up" option list. (Which should probably be renamed at that point, since one of the options won't be only for startup.)
So, given all that, I think I'm going to have to say ui-r-, but hopefully I haven't added too much work for you, and I promise that I'll ui-review your next version of this patch _much_ sooner!
Thanks,
Blake.
Attachment #604366 -
Flags: ui-review?(bwinton) → ui-review-
Reporter | ||
Comment 8•13 years ago
|
||
Attachment #604058 -
Attachment is obsolete: true
Reporter | ||
Comment 9•13 years ago
|
||
Ohh, I missed your reply, sorry for the delay. There's a new version which should address your comments.
Thanks!
Attachment #604366 -
Attachment is obsolete: true
Attachment #650883 -
Flags: ui-review?(bwinton)
Comment 10•13 years ago
|
||
Comment on attachment 650883 [details] [diff] [review]
patch, v3
Perfect! ui-r=me!
Thanks,
Blake.
Attachment #650883 -
Flags: ui-review?(bwinton) → ui-review+
Reporter | ||
Comment 11•13 years ago
|
||
Comment on attachment 650883 [details] [diff] [review]
patch, v3
Thanks! Mark, can you please look at it?
Attachment #650883 -
Flags: review?(mbanner)
Comment 12•13 years ago
|
||
Comment on attachment 650883 [details] [diff] [review]
patch, v3
I think you've missed handling the case where automatic detection is on but one of the non-always start up online options. With the patch, if I've got always start offline selected but then choose automatic, it'll still come up offline.
Not quite sure what to do here. I can't remember if automatic detection still works in that instance or not.
Attachment #650883 -
Flags: review?(mbanner) → review-
Reporter | ||
Comment 13•13 years ago
|
||
Ahh, it looks like we need some changes in offlineStartup.js
Reporter | ||
Comment 14•13 years ago
|
||
Hm, it looks more complicated than I expected. Because there's a start-up state (offline.startup_state) which can be:
0 = remember last state, 1 = ask me, 2 == online, 3 == offline, 4 = automatic
Note that the "3 == offline and 4 = automatic" states are used by seamonkey only.
And there's offline.autoDetect which controls whether the link state can be managed by system or not.
Another online/offline state control is in Menu, File->Offline->Work Offline check box, which controls the recent online/offline state and is independent on the start-up state (and this state is not saved).
So I guess we need to provide a check-box for the offline.autoDetect (to enable link-control by system) and add the missing start-up states (offline, autodetection).
Reporter | ||
Comment 15•12 years ago
|
||
Attachment #650882 -
Attachment is obsolete: true
Reporter | ||
Comment 16•12 years ago
|
||
I believe this one is more accurate. It adds missing start-up states and allows to enable/disable automatic online state detection when thunderbird is running.
Attachment #650883 -
Attachment is obsolete: true
Attachment #656405 -
Flags: ui-review?(bwinton)
Comment 17•12 years ago
|
||
I'd suggest
Automatic detection -> Use detected system online state
I'd hesitate to have UI for "always start up offline". The use case is odd, and the list is very long already. Ideally we should just be able to always just follow system state.
Reporter | ||
Comment 18•12 years ago
|
||
The "always start up offline" is useful when you're connected over some expensive connection (like GSM phone) and don't want to access the net just after the TB start.
Comment 19•12 years ago
|
||
But who's "always" connected that way? In such cases i'd still much prefer if it just asks me.
Reporter | ||
Comment 20•12 years ago
|
||
"always" does not have to mean "forever". It could be "for this 14 days when I'm traveling" for instance.
Comment 21•12 years ago
|
||
Sure, but i doubt people go into preferences for such things.
Comment 22•12 years ago
|
||
Comment on attachment 656405 [details] [diff] [review]
v4 patch
This seems like a step back from https://bugzilla.mozilla.org/attachment.cgi?id=650882 It's adding a lot of extra choices that I don't believe most people will want most of the time. (Just because the back-end is complicated doesn't mean that the front-end needs to also be complicated. ;)
Thanks,
Blake.
Attachment #656405 -
Flags: ui-review?(bwinton) → ui-review-
Reporter | ||
Comment 23•12 years ago
|
||
Okay. Do you have a problem with the "When running" part or with "When starting up"? Because I have no idea how to combine the two controls (start-up state and automatic link control) to the one.
Comment 24•12 years ago
|
||
I guess it's like https://bugzilla.mozilla.org/attachment.cgi?id=650882 - if system state is enabled, the startup options would be disabled and automatically use system state, why would you use system state only while running?
---
[x] Automatically follow detected system online state
Manual online state when starting up:
[o] Remember from last time
[ ] Ask me
[ ] Online
---
Reporter | ||
Comment 25•11 years ago
|
||
I'm not going to work on that anytime soon.
Assignee: stransky → nobody
Comment 27•10 years ago
|
||
Any chance that this will be picked up any time soon?
A checkbox would indeed be helpful for users to discover this useful option.
Thanks
Updated•10 years ago
|
Whiteboard: [patchlove]
![]() |
Assignee | |
Comment 28•10 years ago
|
||
I am actually in favor of the "manual offline" option so I have kept it. So this is mkmelin's proposal (automatic disabled all the manual options) + the one offline option. And the offline.autoDetect and offline.startup_state == 4 are tied in the UI. I am not sure if the offlineStartup.js changes are enough. Please try on Windows as there it is most possible the automatic detection is supposed to work.
Attachment #656404 -
Attachment is obsolete: true
Attachment #656405 -
Attachment is obsolete: true
Attachment #8503601 -
Flags: ui-review?(josiah)
Attachment #8503601 -
Flags: feedback?(standard8)
Attachment #8503601 -
Flags: feedback?(mkmelin+mozilla)
Comment 29•10 years ago
|
||
> Please try on Windows as there it is most possible the automatic detection is supposed to work.
Will it work on Linux?
![]() |
Assignee | |
Comment 30•10 years ago
|
||
I don't know how the backend actually works. But it allows the options so we just offer them in the UI here.
Comment 31•10 years ago
|
||
The backend offline detection very recently got a lot of love in bug 939318. Should be mostly windows yet, but other platforms are coming.
Comment 32•10 years ago
|
||
Comment on attachment 8503601 [details] [diff] [review]
v5 path
Review of attachment 8503601 [details] [diff] [review]:
-----------------------------------------------------------------
Looks reasonable, although I've not tested it/gone into depth.
Attachment #8503601 -
Flags: feedback?(standard8) → feedback+
Comment 33•10 years ago
|
||
Comment on attachment 8503601 [details] [diff] [review]
v5 path
Review of attachment 8503601 [details] [diff] [review]:
-----------------------------------------------------------------
This looks fine, but I would drop the "system" word, it just adds clutter.
Attachment #8503601 -
Flags: ui-review?(josiah) → ui-review+
Comment 34•10 years ago
|
||
Comment on attachment 8503601 [details] [diff] [review]
v5 path
Review of attachment 8503601 [details] [diff] [review]:
-----------------------------------------------------------------
The manual options should get disabled when you choose automatic, no?
Attachment #8503601 -
Flags: feedback?(mkmelin+mozilla) → feedback+
![]() |
Assignee | |
Comment 35•10 years ago
|
||
(In reply to Magnus Melin from comment #34)
> The manual options should get disabled when you choose automatic, no?
It is behaving like that for me. If "automatically..." is checked, all the other 4 options are disabled. Is it not behaving like that for you?
But I see a small glitch in the patch. If we check "automatic" a hidden radio option is selected (the automatic value 4), so none of the visible ones. But when we uncheck the "automatic" one, one of the visible option should become selected. I'll fix that quickly.
Assignee: nobody → acelists
Status: NEW → ASSIGNED
Flags: needinfo?(mkmelin+mozilla)
![]() |
Assignee | |
Comment 36•10 years ago
|
||
Solved the nit from Josiah and added a default selection when "automatic" is unchecked.
Attachment #8503601 -
Attachment is obsolete: true
Attachment #8530898 -
Flags: ui-review+
Attachment #8530898 -
Flags: review?(mkmelin+mozilla)
Comment 37•10 years ago
|
||
Comment on attachment 8530898 [details] [diff] [review]
v5.1 patch
Review of attachment 8530898 [details] [diff] [review]:
-----------------------------------------------------------------
::: mail/components/preferences/offline.js
@@ +2,5 @@
> + * License, v. 2.0. If a copy of the MPL was not distributed with this
> + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
> +
> +var gOfflineDialog = {
> + dialogSetup: function ()
nit: no space before () I think
@@ +14,5 @@
> + offlineStartupStatePref.value = startupRadio.querySelector("[_automatic]").value;
> + } else {
> + if (offlineStartupStatePref.value == startupRadio.querySelector("[_automatic]").value)
> + offlineStartupStatePref.value = startupRadio.querySelector("[_default]").value;
> + }
I don't know what the _automatic and _default is supposed to be good for? Seems to me it'd be clearer just using the values
![]() |
Assignee | |
Comment 38•10 years ago
|
||
That was just a fancy way to not hardcode the constants in the JS code but fetch the values via marking the options via attributes.
I have rewritten it if you don't like it.
Attachment #8530898 -
Attachment is obsolete: true
Attachment #8530898 -
Flags: review?(mkmelin+mozilla)
Attachment #8531716 -
Flags: review?(mkmelin+mozilla)
Comment 39•10 years ago
|
||
Comment on attachment 8531716 [details] [diff] [review]
v5.2 patch
Review of attachment 8531716 [details] [diff] [review]:
-----------------------------------------------------------------
Yes I prefer using constants
::: mail/components/preferences/offline.xul
@@ +39,3 @@
> <radiogroup id="whenStartingUp" class="indent" preference="offline.startup_state">
> <radio value="0" label="&radioRememberPrevState.label;" accesskey="&radioRememberPrevState.accesskey;"/>
> + <radio value="1" label="&radioAskState.label;" accesskey="&radioAskState.accesskey;"/>
odd extra spaces in between here (and the ones below)
either wrap it or remove them
Attachment #8531716 -
Flags: review?(mkmelin+mozilla) → review+
Updated•10 years ago
|
Flags: needinfo?(mkmelin+mozilla)
![]() |
Assignee | |
Comment 40•10 years ago
|
||
(In reply to Magnus Melin from comment #39)
> Comment on attachment 8531716 [details] [diff] [review]
> v5.2 patch
>
> Review of attachment 8531716 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> Yes I prefer using constants
>
> ::: mail/components/preferences/offline.xul
> @@ +39,3 @@
> > <radiogroup id="whenStartingUp" class="indent" preference="offline.startup_state">
> > <radio value="0" label="&radioRememberPrevState.label;" accesskey="&radioRememberPrevState.accesskey;"/>
> > + <radio value="1" label="&radioAskState.label;" accesskey="&radioAskState.accesskey;"/>
>
> odd extra spaces in between here (and the ones below)
> either wrap it or remove them
The spaces are to align the accesskey attributes vertically. As is done in all the other radiogroups in that file. Is that an old pattern that is no longer accepted?
![]() |
Assignee | |
Comment 41•10 years ago
|
||
Comment on attachment 8531716 [details] [diff] [review]
v5.2 patch
Review of attachment 8531716 [details] [diff] [review]:
-----------------------------------------------------------------
According to comment 14, the automatic value (4) is used by Seamonkey. Neil, please see if the change to mailnews/extensions/offline-startup/js/offlineStartup.js doesn't break anything there.
Attachment #8531716 -
Flags: review?(neil)
![]() |
Assignee | |
Comment 42•10 years ago
|
||
(In reply to Martin Stránský from comment #1)
> Btw. Why is the "File -> Offline -> Offline Settings..." disabled?
This is a different dialog than "Edit -> Preferences -> Advanced -> Network & Disk Space". If you are in an IMAP account the menuitem gets enabled and upon clicking it it opens the Synchronization & Storage pane of account settings of that account. So if that is unexpected or is a misleading label, please file that as a new bug. Thanks.
Hardware: x86 → All
Whiteboard: [patchlove]
Comment 43•10 years ago
|
||
(In reply to :aceman from comment #40)
> The spaces are to align the accesskey attributes vertically. As is done in
> all the other radiogroups in that file. Is that an old pattern that is no
> longer accepted?
Generally I think that should be avoided yes. Assuming the code ever changes, you'd easily have to align a lot of rows just to keep in sync. Besides, the line lengths here end up over 100ch.
![]() |
Assignee | |
Comment 44•10 years ago
|
||
Attachment #8531716 -
Attachment is obsolete: true
Attachment #8531716 -
Flags: review?(neil)
Attachment #8532146 -
Flags: review?(neil)
Comment 45•10 years ago
|
||
Comment on attachment 8532146 [details] [diff] [review]
v5.3 patch [checked in]
>- if (gOfflineStartupMode == kAlwaysOffline)
>+ if (gOfflineStartupMode == kAutomatic)
>+ {
>+ // Offline state should be managed automatically
>+ // so do nothing specific at startup.
>+ }
>+ else if (gOfflineStartupMode == kAlwaysOffline)
r=me because this change has no actual effect on the code, amirite?
Attachment #8532146 -
Flags: review?(neil) → review+
![]() |
Assignee | |
Comment 46•10 years ago
|
||
Yes, as there seems to be no fall-through "else" branch that would now not be reached with value of 4.
Keywords: checkin-needed
Updated•10 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 38.0
Updated•10 years ago
|
Target Milestone: Thunderbird 38.0 → Thunderbird 37.0
Comment 48•10 years ago
|
||
Comment on attachment 8532146 [details] [diff] [review]
v5.3 patch [checked in]
>+++ b/mail/locales/en-US/chrome/messenger/preferences/offline.dtd
>-<!ENTITY radioAlwaysOnline.label "Always start up online">
>+<!ENTITY radioAlwaysOnline.label "Online">
> <!ENTITY radioAlwaysOnline.accesskey "l">
As you have not changed the entity name, have you posted to m.d.l10n about this change?
Flags: needinfo?(acelists)
Comment 50•10 years ago
|
||
Wouldn't it be better to change the name in the patch?
![]() |
Assignee | |
Comment 51•10 years ago
|
||
Yes, should I attach a fix here?
Comment 52•10 years ago
|
||
Others are more familiar with l10n than I am, but my understanding is that changing the name triggers all of the automatic processes for translation, while a post to the newsgroup forces people to treat this as an exception. So I think a correction patch would be a better approach.
Comment 53•10 years ago
|
||
It will depend on whether you can get approval to land a string change on what will be comm-beta in the next few days. Looking at mxr - http://mxr.mozilla.org/l10n-mozilla-aurora/search?string=radioAlwaysOnline.label - about 40% of them have picked it up (br, cy, en-GB, es-ES, fr, gd, hr, hu, hy-AM, it, lt, nb-NO, pl, pt-PT, ru, sk, sl, sv-SE, zh-CN, zh-TW, hsb and dsb; maybe fi; sq have both strings!), 40% haven't (be, bg, ca, cs, da, de, es-AR, et, eu, fy-NL, ga-IE, is, ja, ja-JP-mac, ko, nl, nn-NO, pt-BR, rm, tr) and 20% haven't got a recent localisation (before TB 31).
Note: this was just a rough google translate on the strings, but shouldn't be too far out.
I guess the important target is TB 38 for the next ESR.
tracking-thunderbird38:
--- → ?
tracking-thunderbird_esr38:
--- → ?
Comment 54•10 years ago
|
||
Oh I'm sorry, I did notice that this had landed TB 37. Then maybe we do need to handle it with a note to m.d.l10n
![]() |
Assignee | |
Comment 55•10 years ago
|
||
I'd think we are fine if TB37 (that almost nobody uses) will just have a wrong translation (but the sense of the message is still understandable). We can still save TB38 by pushing this patch.
Attachment #8567388 -
Flags: review?(rkent)
Comment 56•10 years ago
|
||
Comment on attachment 8567388 [details] [diff] [review]
update string after change
Review of attachment 8567388 [details] [diff] [review]:
-----------------------------------------------------------------
Yes I think this is the safest thing to do. Might annoy people who caught the issue, but will help insure that TB 38 is correct.
Attachment #8567388 -
Flags: review?(rkent) → review+
Attachment #8532146 -
Attachment description: v5.3 patch → v5.3 patch [checked in]
![]() |
Assignee | |
Comment 57•10 years ago
|
||
Thanks.
Keywords: checkin-needed
Whiteboard: [check in the remaining patch]
Comment 58•10 years ago
|
||
Comment on attachment 8567388 [details] [diff] [review]
update string after change
Checked in https://hg.mozilla.org/comm-central/rev/a6a86951b08c
This patch landed in Thunderbird 38
Updated•10 years ago
|
Keywords: checkin-needed
Whiteboard: [check in the remaining patch]
Updated•10 years ago
|
status-thunderbird38:
--- → fixed
Updated•10 years ago
|
tracking-thunderbird38:
? → ---
tracking-thunderbird_esr38:
? → ---
You need to log in
before you can comment on or make changes to this bug.
Description
•