Closed
Bug 615164
Opened 15 years ago
Closed 15 years ago
rename Tab.pinned to isPinned, make read-only, and add pin()/unpin() methods
Categories
(Add-on SDK Graveyard :: General, defect)
Add-on SDK Graveyard
General
Tracking
(Not tracked)
RESOLVED
FIXED
1.0b1
People
(Reporter: myk, Assigned: irakli)
References
Details
Attachments
(1 file)
4.72 KB,
patch
|
dietrich
:
review+
|
Details | Diff | Splinter Review |
For consistency with API conventions for boolean properties and recent changes away from the use of setters for side effects, the "pinned" property of tabs should be renamed "isPinned", it should become read-only, and pin() and unpin() methods should be added to replace the behavior of setting the property.
This should block the beta because of the difficulty of changing the behavior afterwards.
Updated•15 years ago
|
Assignee: nobody → dietrich
Assignee | ||
Updated•15 years ago
|
Assignee: dietrich → rFobic
Assignee | ||
Comment 1•15 years ago
|
||
Still think that pinned had advantage of simpler toggling API:
tab.pinned = !tab.pinned
vs
if (tab.isPinned) tab.unpin()
else tab.pin()
Attachment #493660 -
Flags: review?(dietrich)
Reporter | ||
Comment 2•15 years ago
|
||
Yes, toggling is simpler with the old API, but you can still toggle in one statement with the new one:
tab.isPinned ? tab.unpin() : tab.pin()
Comment 3•15 years ago
|
||
Comment on attachment 493660 [details] [diff] [review]
https://github.com/mozilla/addon-sdk/pull/56
r=me, thanks for adding the doc clarifications.
Attachment #493660 -
Flags: review?(dietrich) → review+
Assignee | ||
Updated•15 years ago
|
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•