Open Bug 616821 Opened 9 years ago Updated 3 years ago

Disable links/buttons in Sync pane when not connected

Categories

(SeaMonkey :: Preferences, defect)

defect
Not set

Tracking

(Not tracked)

People

(Reporter: InvisibleSmiley, Unassigned)

References

Details

IanN suggested on bug 576970 that some links/buttons on the Sync pane might need to be disabled when Sync is not connected. Since this is just nice to have and might need some tweaking (broadcaster/observer combination, gSyncUI integration), I'm moving it to this follow-up bug.
Neil noted in bug 631852:
> When I originally tested Sync, I only synced my tabs, which means I've got
> nothing that I can Reset ;-) I don't suppose we can detect this?

So the scope of this bug should be extended to the investigation of whether it is possible to detect the case where nothing can be reset and disable the Reset Sync button in that case.
The Connect/Disconnect buttons are long gone, so AFAICT the two things that still make this bug somehow relevant are Offline mode and not having a connection. Personally I feel we can/should ignore the latter case, but support the former.

So, let's see what depends on whether you're online or not (all accessible through the Manage Account button):
* View Quota
* Change Password
* My Recovery Key [1]
* Reset Sync
* Deactivate This Device
* Add a Device

And what doesn't (needs no adaption):
* Account Name
* Sync My
* Computer Name
* Terms of Service and Privacy Policy (open normal websites which could be available in Offline mode)

[1] My Recovery Key includes three actions that require no connection (copying the key, printing or saving it) and one that does ("Generate a new key" -> "Change Recovery Key" - the text field is disabled). We feel that we must ensure that the three actions are accessible even in Offline mode, so simply disabling the Manage Account button won't do. We'll need to disable the individual items, plus adapt the wizard to not enable the Change Recovery Key button in Offline mode.
Whiteboard: [mentor=InvisibleSmiley][lang=js]
Ratty informed me that there have been questions regarding this bug on IRC. Let's recap:

1. The items from the previous comment's first list shall be disabled if we're in Offline mode, with the exception of My Recovery Key. The corresponding code is in pref-sync.js.

2. For My Recovery Key, the Change Recovery Key button must not be enabled in Offline mode. Since the button is disabled by default and only enabled if the  "Generate a new key" link is used, it's probably easiest to disable/hide/remove the link in Offline mode. The corresponding code needs to go to syncGenericChange.js (beware, this file also handles the Sync setup wizard case!).

3. For the Preferences pane, instead of checking Offline mode just once (using Services.io.offline), any change to Offline mode shall be detected at runtime, triggering the enabling/disabling accordingly. This can be done by observing the "network:offline-status-changed" event (cf. [1]).

[1]: http://mxr.mozilla.org/comm-central/source/suite/mailnews/compose/MsgComposeCommands.js#701 and following lines
Whiteboard: [mentor=InvisibleSmiley][lang=js] → [good first bug][mentor=InvisibleSmiley][lang=js]
Hi Jens

I would like to be assigned to this bug, I have previous experience in javascript, so this would be a first good bug for me to tackle.
Thanks.
Assignee: nobody → zulfa2all
Status: NEW → ASSIGNED
Mentor: jh
Whiteboard: [good first bug][mentor=InvisibleSmiley][lang=js] → [good first bug][lang=js]
Zulfa's last activity here more than 1 year ago
Assignee: zulfa2all → nobody
Status: ASSIGNED → NEW
hello jens Hatlak (:InvisibleSmiley), I'm new to open source. Can you please assign this bug to me and tell me how do i proceed?
Sorry but I'm not an active SM developer anymore. Also this bug is probably not the best to start with since, as far as I know, SM Sync is not working anymore so it will be hard or impossible to test.
Mentor: jh
Well, goodfirstbug-decision was by our most experienced user "nobody" ;-)

@07yogeshgupta:
Thank you for your interest in contribution to the SeaMonkey project.
Without knowledge concerning your experience it's difficult to help you. Please follow advice on <https://wiki.mozilla.org/SeaMonkey/FAQ#How_To_Start_Contributing_Code>
.
Whiteboard: [good first bug][lang=js]
So this doesn't now fall under good-first-bug?@Rainer Bielefeld
You need to log in before you can comment on or make changes to this bug.