Closed
Bug 877467
Opened 12 years ago
Closed 12 years ago
Remove "children" markup style from Prompt.jsm.
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 24
People
(Reporter: wesj, Assigned: wesj)
Details
Attachments
(1 file)
1.75 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
I realized as I was writing some examples, the the children style of message I created for Prompt.jsm isn't ideal for what consumers probably want. Right now you can pass something like:
prompt.setSingleChoiceItems([
{ label: "Header", children: [
{label: "Child"}
]}
]).show(function(data) {
// data.button is the index of the clicked on item
});
Prompt.jsm converts the list from nested arrays a single flat array, where having an "index" for an item makes sense. In the nested for we return it doesn't. We either need to modify the return value we pass to the callback to indicate "Find the first item inside the first item", or just have callers pass in a flat list. I'm going to vote for the later.
Assignee | ||
Comment 1•12 years ago
|
||
So... I'm still fighting to not expose the normal syntax here. This makes setListItems just take a flat list. Items can have any of "header", "menu", or "child" attributes to control how they're styled (they are all independent so theoretically you could have a header that was indented as a child, and that had a "more" button on its right hand side). That's opposed to what java (currently) expects, "isGroup", "inGroup" or "isParent".
Attachment #756107 -
Flags: review?(mark.finkle)
Comment 2•12 years ago
|
||
Comment on attachment 756107 [details] [diff] [review]
Patch v1
This is a sticky situation. In most cases, I don't expect devs to use, as opposed to the simple list. I'm in favor of simplifying though, but being able to get the right return value is even more important.
Attachment #756107 -
Flags: review?(mark.finkle) → review+
Assignee | ||
Comment 3•12 years ago
|
||
Comment 4•12 years ago
|
||
Assignee | ||
Comment 5•12 years ago
|
||
This was fine on try:
https://hg.mozilla.org/integration/mozilla-inbound/rev/950b81e80876
Comment 6•12 years ago
|
||
Assignee: nobody → wjohnston
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 24
Updated•4 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
•