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)
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.
Assignee | ||
Updated•11 years ago
|
Summary: Show informative view when there are no panels available for install → Display message in HomePanelPicker when no Home panels are available for install
Assignee | ||
Comment 1•11 years ago
|
||
Assignee | ||
Comment 2•11 years ago
|
||
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)
Comment 3•11 years ago
|
||
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)
Assignee | ||
Comment 4•11 years ago
|
||
Rebase on top of new "Add panels" patches.
Attachment #8383496 -
Attachment is obsolete: true
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → liuche
Assignee | ||
Comment 5•11 years ago
|
||
Attachment #8385178 -
Attachment is obsolete: true
Assignee | ||
Comment 6•11 years ago
|
||
Attachment #8383497 -
Attachment is obsolete: true
Assignee | ||
Comment 7•11 years ago
|
||
Ian, I added a couple of screenshots, let me know what text size or margin changes you want.
Assignee | ||
Updated•11 years ago
|
Attachment #8385579 -
Flags: review?(margaret.leibovic)
Assignee | ||
Updated•11 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Updated•11 years ago
|
Flags: needinfo?(ibarlow)
Comment 8•11 years ago
|
||
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 9•11 years ago
|
||
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+
Assignee | ||
Comment 10•11 years ago
|
||
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+
Assignee | ||
Updated•11 years ago
|
Attachment #8387307 -
Attachment description: Patch: Display Remove for dynamic panels → Patch: Display message when no home panels are available for install.
Assignee | ||
Comment 11•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Target Milestone: --- → Firefox 30
Comment 12•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•5 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•