Closed Bug 973039 Opened 11 years ago Closed 11 years ago

Display message in HomePanelPicker when no Home panels are available for install

Categories

(Firefox for Android Graveyard :: Awesomescreen, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 30

People

(Reporter: oogunsakin, Assigned: liuche)

References

Details

Attachments

(3 files, 4 obsolete files)

When a user tries to add a panel and there are no panels available. Show an informative view on how to add a panel add-on.
Depends on: 942878
Summary: Show informative view when there are no panels available for install → Display message in HomePanelPicker when no Home panels are available for install
Attached file WIP: Display "No panels" (obsolete) —
Attached image Screenshot: placeholder "No panels" (obsolete) —
We need something to put here, when the user has no new panels to install (because they have no new add-ons that support panels).
Flags: needinfo?(ibarlow)
Blocks: 977980
I could see us doing this in two stages. 1. Just do a message that says "we couldn't find anything" 2. When we have more add-ons for about:home on AMO, we could provide a link out to let users do a search on their own. We probably should wait until such add-ons are available online though. So for now, I would suggest the text read something like: ------------------------ Add new panel ------------------------ Sorry, we couldn't find any panels for you to add. ------------------------
Flags: needinfo?(ibarlow)
Attached patch WIP: Display "No panels" (obsolete) — Splinter Review
Rebase on top of new "Add panels" patches.
Attachment #8383496 - Attachment is obsolete: true
Assignee: nobody → liuche
Attachment #8385178 - Attachment is obsolete: true
Attached image Screenshot: Medium text
Attachment #8383497 - Attachment is obsolete: true
Attached image Screenshot: Small text
Ian, I added a couple of screenshots, let me know what text size or margin changes you want.
Attachment #8385579 - Flags: review?(margaret.leibovic)
Status: NEW → ASSIGNED
Flags: needinfo?(ibarlow)
Chenxia this looks good. For the "sorry" text I would just use the same margins on the top and bottom as you have on the sides, like so: http://cl.ly/image/1L3K3F3q1u40
Flags: needinfo?(ibarlow)
Comment on attachment 8385579 [details] [diff] [review] Patch: Display message when no panels available Review of attachment 8385579 [details] [diff] [review]: ----------------------------------------------------------------- Looks good, just a few questions. ::: mobile/android/base/home/HomePanelPicker.java @@ +125,5 @@ > > + if (availablePanels.isEmpty()) { > + setContentView(R.layout.home_panel_picker_empty); > + return; > + } Trying to familiarize myself with HomePanelPicker a bit... am I correct that only one set of panelInfos ever gets loaded per fragment lifetime? I'm just trying to verify that it isn't possible to hit this code path once where there are no available panels, followed by one when there are. ::: mobile/android/base/resources/layout/home_panel_picker_empty.xml @@ +15,5 @@ > + > + <TextView android:layout_width="match_parent" > + android:layout_height="match_parent" > + android:textAppearance="?android:attr/textAppearanceSmall" > + android:text="@string/home_add_panel_empty" /> Any reason why we can't just make this layout the TextView itself, and give it the desired padding/margin?
Attachment #8385579 - Flags: review?(margaret.leibovic) → review+
Carrying over r+. (In reply to :Margaret Leibovic from comment #9) > Comment on attachment 8385579 [details] [diff] [review] > Patch: Display message when no panels available > > Review of attachment 8385579 [details] [diff] [review]: > ----------------------------------------------------------------- > > Looks good, just a few questions. > > ::: mobile/android/base/home/HomePanelPicker.java > @@ +125,5 @@ > > > > + if (availablePanels.isEmpty()) { > > + setContentView(R.layout.home_panel_picker_empty); > > + return; > > + } > > Trying to familiarize myself with HomePanelPicker a bit... am I correct that > only one set of panelInfos ever gets loaded per fragment lifetime? I'm just > trying to verify that it isn't possible to hit this code path once where > there are no available panels, followed by one when there are. Yep, the panels are only loaded once, when the (dialog) Fragment is created, and the fragment is destroyed when you close the dialog. > > ::: mobile/android/base/resources/layout/home_panel_picker_empty.xml > @@ +15,5 @@ > > + > > + <TextView android:layout_width="match_parent" > > + android:layout_height="match_parent" > > + android:textAppearance="?android:attr/textAppearanceSmall" > > + android:text="@string/home_add_panel_empty" /> > > Any reason why we can't just make this layout the TextView itself, and give > it the desired padding/margin? For some reason I thought you always needed a *Layout, but that's actually not true. Updated!
Attachment #8385579 - Attachment is obsolete: true
Attachment #8387307 - Flags: review+
Attachment #8387307 - Attachment description: Patch: Display Remove for dynamic panels → Patch: Display message when no home panels are available for install.
Target Milestone: --- → Firefox 30
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: