Closed Bug 982190 Opened 6 years ago Closed 6 years ago

Allow addons to specify custom filter 'up' image

Categories

(Firefox for Android :: Awesomescreen, defect)

ARM
Android
defect
Not set

Tracking

()

RESOLVED FIXED
Firefox 31
Tracking Status
firefox30 --- fixed
firefox31 --- fixed

People

(Reporter: jdover, Assigned: jdover)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

Addons should be able to specify their own 'up' icon to be used in the filter navigation with an API like:

Home.panels.register("my-panel", {
  title: "My Panel",
  layout: Home.panels.Layout.FRAME,
  views: [{
    type: Home.panels.View.LIST,
    dataset: "my-data",
    backImageUrl: "http://example.com/back-image.png"
  }]
});
Attached patch patch (obsolete) — Splinter Review
Addressed comments from bug 975055, comment #41
Attachment #8389336 - Flags: review?(lucasr.at.mozilla)
Status: NEW → ASSIGNED
Comment on attachment 8389336 [details] [diff] [review]
patch

Review of attachment 8389336 [details] [diff] [review]:
-----------------------------------------------------------------

Great.

::: mobile/android/base/home/PanelBackItemView.java
@@ +6,5 @@
>  package org.mozilla.gecko.home;
>  
>  import org.mozilla.gecko.R;
>  import org.mozilla.gecko.home.PanelLayout.FilterDetail;
> +import org.mozilla.gecko.home.PanelLayout.FilterManager;

Unused.
Attachment #8389336 - Flags: review?(lucasr.at.mozilla) → review+
I assume this patch doesn't require any change on the JS side? Have you tested this with an actual add-on?
Attached patch patchSplinter Review
(In reply to Lucas Rocha (:lucasr) from comment #3)
> I assume this patch doesn't require any change on the JS side? Have you
> tested this with an actual add-on?

Yes, I did find one bug though where if the backImageUrl isn't specified there was an error with Picasso. I forgot that JSON#optString defaults to an empty string rather than null. Fixed in this patch.
Attachment #8389336 - Attachment is obsolete: true
Attachment #8392309 - Flags: review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/b4a1adc469bd
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 31
Comment on attachment 8392309 [details] [diff] [review]
patch

Note to release managers: I'm requesting uplift for a series of Firefox Hub bugs. The main fixes we need are in bugs at the end of the series, but trying to rebase those patches proved difficult and risky, so I think we should just uplift the dependecies.

Note to sheriffs: I have a local patch series that I can land on aurora when these bugs all get approval.

[Approval Request Comment]
Bug caused by (feature/regressing bug #): dependency for initial Firefox Hub release (promoted feed add-ons in fx30)
User impact if declined: panels won't update when data changes
Testing completed (on m-c, etc.): baked on m-c
Risk to taking this patch (and alternatives if risky): only affects dynamic panels, need an add-on to trigger this
String or IDL/UUID changes made by this patch: none
Attachment #8392309 - Flags: approval-mozilla-aurora?
Attachment #8392309 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.