Closed
Bug 359462
(placescontroller)
Opened 19 years ago
Closed 19 years ago
Redesign PlacesController interaction with places views (was: context menu delete and keyboard delete (select all, cut, copy, etc) doesn't work in places-based history sidebar)
Categories
(Firefox :: Bookmarks & History, defect, P2)
Firefox
Bookmarks & History
Tracking
()
RESOLVED
FIXED
Firefox 3 alpha2
People
(Reporter: moco, Assigned: asaf)
References
Details
Attachments
(1 file, 14 obsolete files)
|
227.49 KB,
patch
|
Details | Diff | Splinter Review |
context menu delete and keyboard delete doesn't work in places-based history sidebar
this will soon be a regression.
will work on this as soon as the big patch for bug #356487 lands.
| Reporter | ||
Comment 1•19 years ago
|
||
note, other items in the edit menu need to be fixed as well, such as select all.
Fx 2 has some bugs (such as copy not doing the right thing)
I've got a patch started, which leverage's the existing places controller (controller.js), but it needs some work.
I'll attach a rough draft and list the open issues I'm still working on.
Status: NEW → ASSIGNED
Summary: context menu delete and keyboard delete doesn't work in places-based history sidebar → context menu delete and keyboard delete (select all, cut, copy, etc) doesn't work in places-based history sidebar
| Reporter | ||
Comment 2•19 years ago
|
||
| Reporter | ||
Comment 3•19 years ago
|
||
> and list the open issues I'm still working on.
1) top level delete of date does not work
2) delete of host, when view by host + date, will delete all for that host, not just those in that date!
3) select all
4) copy in fx 2 is enabled, but on paste, it doesn't work (on mac). fix this in trunk
5) make cut work on trunk, too?
6) fix this dnd issue. XXX ex [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDragSession.isDataFlavorSupported]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://global/content/nsDragAndDrop.js :: anonymous :: line 424" data: no]
7) make sure VK_BACK works on the mac
I'll attach a new patch, now that bug #356487 has landed.
| Reporter | ||
Comment 4•19 years ago
|
||
Attachment #245015 -
Attachment is obsolete: true
| Reporter | ||
Comment 5•19 years ago
|
||
Attachment #246231 -
Attachment is obsolete: true
| Reporter | ||
Comment 6•19 years ago
|
||
a brain dump on the current patch:
1) not happy with the changes i've made to controller.js (the places controller) and how the history side bar uses it.
2) as for the delete by date code, dmills points out that I could generalize and re-use the nsNavHistoryExpire.cpp code, instead of rewriting the code.
| Reporter | ||
Comment 7•19 years ago
|
||
spinning off problems with delete (when grouped by date, or date and site) to bug #363621.
| Assignee | ||
Comment 9•19 years ago
|
||
The concept of one controller for all views (and then setting the active view in a focus handlers) doesn't work all that well - automated commands updating is done before the focus event is fired. There's a hack in the places-tree binding (and probably in few more places) to work around that which calls updateCommands for the commandDispatcher of window.docuemnt. This means commands were not updated in the parent/child windows (in the sidebar case, that means edit-commands were not updated for the browser-window's edit menu).
So, I got rid of the entire activeView story, meaning views should create and use their owen PlacesController. This works except I didn't yet update views other than the sidebar.
Context-menu code changes here are wrong, my plan is to factor this code out of the places controller.
| Assignee | ||
Comment 10•19 years ago
|
||
Comment on attachment 248602 [details] [diff] [review]
v1
If no one objects, I would like to land this first and fix other views separately (meaning --enable-places-bookmarks will be broken for few days at the very least). Please ignore the changes to buildContextMenu and LOG.
Attachment #248602 -
Flags: review?(sspitzer)
| Assignee | ||
Comment 11•19 years ago
|
||
Comment on attachment 248602 [details] [diff] [review]
v1
Don't review this yet.
Attachment #248602 -
Attachment is obsolete: true
Attachment #248602 -
Flags: review?(sspitzer)
| Assignee | ||
Comment 12•19 years ago
|
||
Attachment #246651 -
Attachment is obsolete: true
Attachment #248693 -
Flags: review?(sspitzer)
| Assignee | ||
Updated•19 years ago
|
Alias: placescontoller
Priority: -- → P2
Summary: context menu delete and keyboard delete (select all, cut, copy, etc) doesn't work in places-based history sidebar → Redeisgn PlacesController interaction with places views (was: context menu delete and keyboard delete (select all, cut, copy, etc) doesn't work in places-based history sidebar)
Target Milestone: --- → Firefox 3 alpha2
| Assignee | ||
Comment 13•19 years ago
|
||
Attachment #248693 -
Attachment is obsolete: true
Attachment #248693 -
Flags: review?(sspitzer)
Updated•19 years ago
|
Summary: Redeisgn PlacesController interaction with places views (was: context menu delete and keyboard delete (select all, cut, copy, etc) doesn't work in places-based history sidebar) → Redesign PlacesController interaction with places views (was: context menu delete and keyboard delete (select all, cut, copy, etc) doesn't work in places-based history sidebar)
| Assignee | ||
Comment 14•19 years ago
|
||
Attachment #248753 -
Attachment is obsolete: true
Comment 15•19 years ago
|
||
I have some thoughts on this, please ping me sometime on how I think transactions should work.
Basically, I think the transactions in the JS "controller" were a bad idea. I think the Nav* services should have functions that return transactions, instead of implementing the function directly, and these transactions should be written in C++ within the service.
| Assignee | ||
Comment 16•19 years ago
|
||
Transactions code was (almost) not changed here at all.
| Assignee | ||
Comment 17•19 years ago
|
||
Attachment #248786 -
Attachment is obsolete: true
| Assignee | ||
Comment 18•19 years ago
|
||
Attachment #248821 -
Attachment is obsolete: true
| Assignee | ||
Comment 19•19 years ago
|
||
Fix busted delete folder and copy transactions;
Attachment #248841 -
Attachment is obsolete: true
| Assignee | ||
Comment 20•19 years ago
|
||
Attachment #248850 -
Attachment is obsolete: true
Attachment #248873 -
Flags: review?(sspitzer)
| Assignee | ||
Comment 21•19 years ago
|
||
Attachment #248873 -
Attachment is obsolete: true
Attachment #248932 -
Flags: review?(sspitzer)
Attachment #248873 -
Flags: review?(sspitzer)
Updated•19 years ago
|
Alias: placescontoller → placescontroller
Status: NEW → ASSIGNED
| Reporter | ||
Comment 22•19 years ago
|
||
asaf, sorry for the delay. looking over (and testing) your patch today.
Comment 23•19 years ago
|
||
Excuse me, about trivial coding style.
|PlacesUtils._uri| and |PlacesUtils._wrapString| need "_" ?
If I understand correctly, by prefix "_" the original authors mean
"the property/method is private" and "to be called only by |this|
or |self|". That's the difference between |activeView| and
|_activeView| etc.
So, _uri(...) -> wrapURI(...) and _wrapString(...) -> wrapString(...),
as they are public utilities now...?
| Assignee | ||
Comment 24•19 years ago
|
||
Attachment #248932 -
Attachment is obsolete: true
Attachment #249056 -
Flags: review?(sspitzer)
Attachment #248932 -
Flags: review?(sspitzer)
| Assignee | ||
Comment 25•19 years ago
|
||
This fixes the on-startup JS error I introduced.
Attachment #249056 -
Attachment is obsolete: true
Attachment #249062 -
Flags: review?(sspitzer)
Attachment #249056 -
Flags: review?(sspitzer)
| Reporter | ||
Comment 26•19 years ago
|
||
got a little sidetracked with regression bug #364018, but I'm back on the test / review of this patch now.
No longer blocks: 364401
| Reporter | ||
Comment 27•19 years ago
|
||
asaf, still working through the patch. when testing, everything looks good.
one question so far, which did you move this into a timeout?
else {
// Set the mode on an existing places window.
- organizer.selectPlaceURI(place);
- organizer.focus();
+ setTimeout(function() {
+ organizer.selectPlaceURI(place);
+ organizer.focus();
+ }, 0);
}
},
| Assignee | ||
Comment 28•19 years ago
|
||
Ignore it, I forgot to remove this when I realized it fixes nothing.
| Reporter | ||
Comment 29•19 years ago
|
||
Comment on attachment 249062 [details] [diff] [review]
don't initialize views twice
r=sspitzer
sorry for the delay. the history sidebar on place tests out fine. I only had a few more questions and requests for spin of bugs.
Attachment #249062 -
Flags: review?(sspitzer) → review+
| Reporter | ||
Comment 30•19 years ago
|
||
1)
+ <!-- XXXmano: not yet supported -->
<command id="placesCmd_reload"
label="&cmd.reload.label;" accesskey="&cmd.reload.accesskey;"
oncommand="PlacesController.reloadSelectedLivemarks();"
disabled="true"/>
- </commandset>
-</commandset>
+ <command id="placesCmd_sortby:name"
+ label="&cmd.sortby_name.label;"/>
+ <!-- XXXmano: not implemented? -->
+ <command id="placesCmd_rename"
+ label="&cmd.rename.label;"
+ accesskey="&cmd.rename.accesskey;"/>
+#endif
+</commandset>
Can you log a spin off bug on these XXX items?
2)
+#include commands.inc
<!-- XXX fix me:
context menu delete and cmd_delete are not working yet. see bug #359462
-->
I think you can remove my XXX fix me comment, as you have fixed this, right?
3)
+ /**
+ * XXXmano: this used to be a hack which allowed using few places commands
+ * when the search field is focused. Re-implementing it would probably
+ * require adding a controller to the searchbox which would forward over
+ * those commands to the places tree controller.
+ *
+ * // Initialize the active view so that all commands work properly without
+ * // the user needing to explicitly click in a view (since the search box is
+ * // focused by default).
+ * PlacesController.activeView = this._places;
+ */
do we need a spin of bug on restoring this hack?
4)
+ <implementation implements="nsIDOMEventListener">
<constructor><![CDATA[
// Support an asyncinit attribute that causes the view to populate
// itself only after the window has been shown. This is to ensure we
// do not regress browser window show time (Ts/Txul)
+#if 0
if (this.hasAttribute("asyncinit")) {
var self = this;
//setTimeout(function() { self._init(); }, 0);
}
else
+#endif
this._init();
]]></constructor>
Can you explain why you turned this code off?
| Assignee | ||
Comment 31•19 years ago
|
||
(In reply to comment #30)
> 1)
Sure.
> 2)
>
> +#include commands.inc
> <!-- XXX fix me:
> context menu delete and cmd_delete are not working yet. see bug #359462
> -->
>
> I think you can remove my XXX fix me comment, as you have fixed this, right?
>
There's still some work to do here (delete of a anything but folders is not undo-able at the very least). Spin of, I guess.
> 3)
> do we need a spin of bug on restoring this hack?
Maybe, we should investigate this when we implement Fx2-bookmarks-manager functionality.
> 4)
> Can you explain why you turned this code off?
>
It's not me, it's Ben (see setTimeout prefixed with //). These hacks were used to improve/fake Ts, we should spin of this as well (and see how much it actually affects Ts either way).
| Assignee | ||
Comment 33•19 years ago
|
||
mozilla/browser/base/content/browser-places.js 1.14
mozilla/browser/base/content/browser-sets.inc 1.86
mozilla/browser/base/content/browser.js 1.747
mozilla/browser/base/content/browser.xul 1.331
mozilla/browser/base/content/global-scripts.inc 1.12
mozilla/browser/components/places/jar.mn 1.29
mozilla/browser/components/places/content/bookmarkProperties.js 1.26
mozilla/browser/components/places/content/bookmarkProperties.xul 1.15
mozilla/browser/components/places/content/commands.inc 1.21
mozilla/browser/components/places/content/context.inc 1.12
mozilla/browser/components/places/content/controller.js 1.102
mozilla/browser/components/places/content/history-panel.xul 1.2
mozilla/browser/components/places/content/menu.xml 1.59
mozilla/browser/components/places/content/places.js 1.68
mozilla/browser/components/places/content/places.xul 1.50
mozilla/browser/components/places/content/toolbar.xml 1.65
mozilla/browser/components/places/content/tree.xml 1.44
mozilla/browser/components/places/content/treeHelpers.js 1.4
mozilla/browser/components/places/content/utils.js initial revision: 1.1
Attachment #249062 -
Attachment is obsolete: true
| Assignee | ||
Comment 34•19 years ago
|
||
@O. Atsushi: I missed comment 23, mind to file a bug?
| Assignee | ||
Updated•19 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Comment 35•19 years ago
|
||
This appears to have broken a couple of extensions:
Console2
Gmail Notify
Adblock Plus
See forum thread:
http://forums.mozillazine.org/viewtopic.php?p=2662949#2662949
Posts by Littlemutt, and -fullmetaljacket-
| Assignee | ||
Comment 36•19 years ago
|
||
Double check checkins ranges, I doubt any of those extensions rely on the places controller.
(And, please, file a bug).
Comment 37•19 years ago
|
||
(In reply to comment #36)
> Double check checkins ranges, I doubt any of those extensions rely on the
> places controller.
>
> (And, please, file a bug).
>
Yikes!, your right, missed a check-in, it looks more likely as the culprit.
Sorry for the spam
Comment 38•16 years ago
|
||
Bug 451915 - move Firefox/Places bugs to Firefox/Bookmarks and History. Remove all bugspam from this move by filtering for the string "places-to-b-and-h".
In Thunderbird 3.0b, you do that as follows:
Tools | Message Filters
Make sure the correct account is selected. Click "New"
Conditions: Body contains places-to-b-and-h
Change the action to "Delete Message".
Select "Manually Run" from the dropdown at the top.
Click OK.
Select the filter in the list, make sure "Inbox" is selected at the bottom, and click "Run Now". This should delete all the bugspam. You can then delete the filter.
Gerv
Component: Places → Bookmarks & History
QA Contact: places → bookmarks
You need to log in
before you can comment on or make changes to this bug.
Description
•