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

RESOLVED FIXED

Status

()

Firefox for iOS
Home screen
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: st3fan, Assigned: st3fan)

Tracking

unspecified
Other
iOS
Dependency tree / graph

Firefox Tracking Flags

(fxios+)

Details

(Whiteboard: noteworthy)

Attachments

(1 attachment)

Comment hidden (empty)
(Assignee)

Comment 1

3 years ago
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.
(Assignee)

Updated

3 years ago
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.
(Assignee)

Comment 3

3 years ago
Created attachment 8616177 [details] [review]
PR: https://github.com/mozilla/firefox-ios/pull/563

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)
(Assignee)

Updated

3 years ago
Duplicate of this bug: 1162629
(Assignee)

Updated

3 years ago
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+
(Assignee)

Comment 6

3 years ago
Fixed nits. Merged PR.
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
(Assignee)

Updated

3 years ago
Duplicate of this bug: 1143156
(Assignee)

Updated

3 years ago
Whiteboard: noteworthy
Added a follow-up to fix some of the non-localized wording:

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