Closed Bug 877603 Opened 11 years ago Closed 11 years ago

registerArea should let non-legacy consumers specify defaults as part of the options

Categories

(Firefox :: Toolbars and Customization, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 28

People

(Reporter: Gijs, Assigned: Gijs)

References

(Blocks 1 open bug)

Details

(Whiteboard: [Australis:M6])

Attachments

(1 file, 1 obsolete file)

Per discussion on IRC about tests for bug 873501
Attached patch Patch (obsolete) — Splinter Review
Attachment #755866 - Flags: review?(jaws)
Depends on: 877851
Blocks: 877851
No longer depends on: 877851
Attached patch Patch v1.1Splinter Review
This fixes the current defaults for the nav-bar (test in bug 877178 verifies this) and fixes the special widget ids in default placements (without which, if there are special widget ids in the default placements, we can never get to the default state..).

I'm not toooo happy with the specialcasing of the defaultPlacements option, but it was the best thing I could think of.
Attachment #755866 - Attachment is obsolete: true
Attachment #755866 - Flags: review?(jaws)
Attachment #756505 - Flags: review?(jaws)
This is now tied-up enough that I think we should take this for M6 if possible.
Whiteboard: [Australis:M6]
Comment on attachment 756505 [details] [diff] [review]
Patch v1.1

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

::: browser/components/customizableui/src/CustomizableUI.jsm
@@ -63,5 @@
> -/**
> - * If the user does not have any state saved, this is the default set of
> - * placements to use.
> - */
> -let gDefaultPlacements = new Map([

Great! One less global :)

@@ +166,5 @@
>        legacy: true,
> +      type: CustomizableUI.TYPE_TOOLBAR,
> +      defaultPlacements: [
> +        "personal-bookmarks"
> +      ]

nit: Place commas at the end of the defaultPlacement arrays so that the next update doesn't need to touch the hg annotation history for that line.
Attachment #756505 - Flags: review?(jaws) → review+
Pushed: https://hg.mozilla.org/projects/ux/rev/70c6c10dd1c8
Whiteboard: [Australis:M6] → [Australis:M6][fixed-in-ux]
https://hg.mozilla.org/mozilla-central/rev/70c6c10dd1c8
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [Australis:M6][fixed-in-ux] → [Australis:M6]
Target Milestone: --- → Firefox 28
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: