Closed
Bug 991190
Opened 11 years ago
Closed 11 years ago
Rename Home.panels.authHandler API to Home.panels.auth
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 31
People
(Reporter: Margaret, Assigned: Margaret)
References
Details
Attachments
(1 file)
3.17 KB,
patch
|
liuche
:
review+
|
Details | Diff | Splinter Review |
Follow-up to bug 942281.
mfinkle made this suggestion, and I like it. The "authHandler" option property is really more than a handler, since it specifies a function, as well as UI elements. We only use the term "authHandler" in the JS code, so this should be a simple change to make.
Assignee | ||
Comment 1•11 years ago
|
||
FYI, this is built on top of the patch for bug 978991, so I'll need to land that first.
This would make the set of API options look like:
function optionsCallback() {
return {
title: "My Panel",
views: [{
type: Home.panels.View.LIST,
dataset: DATASET_ID,
backImageUrl: "myBackIcon.png",
itemHandler: Home.panels.ItemHandler.BROWSER
}],
layout: Home.panels.Layout.FRAME,
auth: {
authenticate: function authenticate() {
// do some stuff to authenticate the user
Home.panels.setAuthenticated(PANEL_ID, true);
},
messageText: "Please log in to this panel",
buttonText: "Log in"
}
};
}
I like how this makes all the top-level properties into short all-lowercase names.
Attachment #8400799 -
Flags: review?(liuche)
Comment 2•11 years ago
|
||
Comment on attachment 8400799 [details] [diff] [review]
Rename Home.panels.authHandler API to Home.panels.auth
Review of attachment 8400799 [details] [diff] [review]:
-----------------------------------------------------------------
LGTM
Attachment #8400799 -
Flags: review?(liuche) → review+
Assignee | ||
Comment 3•11 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/042d3099b1f7
FYI, I updated the wiki and MDN.
Comment 4•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 31
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
•