Closed Bug 1171599 Opened 9 years ago Closed 9 years ago

Remote Tabs Home Panel needs a 'not logged in' state

Categories

(Firefox for iOS :: Home screen, defect)

Other
iOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
fxios + ---

People

(Reporter: st3fan, Assigned: st3fan)

References

Details

(Whiteboard: noteworthy)

Attachments

(1 file)

      No description provided.
This bug is about displaying https://bug1144760.bugzilla.mozilla.org/attachment.cgi?id=8593086 on the Remote Tabs Home Panel when the user is not logged in.
Status: NEW → ASSIGNED
Component: General → Home screen
N.B., there are three null states:

* Not logged in
* Logged in but can't sync
* Logged in but there are no other devices (synced successfully but no data)

Then there's the semi-success case:

* There are other devices, but they have no open tabs to show.
This bug is about displaying https://bug1144760.bugzilla.mozilla.org/attachment.cgi?id=8593086 on the Remote Tabs Home Panel when the user is not logged in.

This patch actually also shows three addition states:

* When the sync of tabs failed
* When the sync was good but the user has no other devices with open tabs
* When the sync was good but the user has no other devices at all

It was easier to combine all these empty states in a single change.

To keep this code simple, I have implemented this with custom `UITableViewCell` instances.

Also, instead of doing a lot of conditional work in the UITableViewDataSource, like we do in `ClientPickerViewController`, I have chosen to instead make a few separate datasource/delegate subclasses that are swapped in and out depending on the state.

This keeps the main `RemoteTabsPanel` class relatively small and moves the logic for each state case into a much smaller and independent classes.
Attachment #8616177 - Flags: review?(sleroux)
Attachment #8616177 - Flags: feedback?(rnewman)
Attachment #8616177 - Flags: feedback?(rnewman) → feedback+
Comment on attachment 8616177 [details] [review]
PR: https://github.com/mozilla/firefox-ios/pull/563

PR looks good - just some minor nitpicking comments. I really liked the error data source pattern + enum you used for the error states and custom error cells.
Attachment #8616177 - Flags: review?(sleroux) → review+
Fixed nits. Merged PR.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Whiteboard: noteworthy
Added a follow-up to fix some of the non-localized wording:

d9965ad
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: