Closed Bug 377669 Opened 18 years ago Closed 17 years ago

[SoC] Create an advanced Microsummary builder extension

Categories

(Firefox Graveyard :: Microsummaries, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: chofmann, Assigned: Techrazy.Yang)

References

Details

Attachments

(2 files, 1 obsolete file)

details to follow.
OS: Windows XP → All
Hardware: PC → All
Summary: Create an advanced Microsummary builder extension → [SoC] Create an advanced Microsummary builder extension
Assignee: nobody → Techrazy.Yang
The main work of this project is as followings: * Task #1 - Create a Basic Microsummary Builder with drag and drop creation of a new summary, possibly based on code available from https://addons.mozilla.org/en-US/firefox/addon/3741 * Task #2 - enhance basic builder to enable editing of generator * Task #3 - Implement “predicator support” for monitoring and use of DOM node changes.
Status: NEW → ASSIGNED
Weekly Report #1: In this week, I have done some coding about drag/drop in user content area, but I am reading and thinking on the whole in most time. I have downloaded the source code of Mozilla_1_8_BRANCH, compiled it successfully, read part of the source code of microsummary component, bookmark component and the existing microsummary builder extension. Now, I get two main question here: 1.For drag/drop microsummary creation. I have write some code to support drag something from the user content area, but the question is how to drop. I found that there is no such mechanism in the onDrop function that can let user to drop a microsummary bookmark. The function only process three flavor "moz/rdfitem","text/x-moz-url" and "text/unicode" and it only process the title and url of the transferable object. So there is no way to add new property such as "MICSUM_GEN_URI", which is essential for microsummary, for a bookmark entry and then there is no way to create a microsummary bookmark by drop. I suggest two method to deal with this. One is to add another bookmark ondrop observer, which will do the job to create a microsummary bookmark, in my microsummary extension. Another is to change the existing bookmark ondrop observer to make it process more drag/drop data than just url and title. I prefer the second way to do this. While the existing bookmark service itself if very flexible, by which user can add microsummary, live bookmarks and etc, the existing drop mechanism is ugly to some extend. It can't satisfy the various bookmark creation. Changing the ondrop handler to make it be able to add new property or annotation in firefox 3 will yield a more flexible bookmark manager. 2.For the microsummary generator. Now, there is only one kind of microsummary generator, XSL. But I think there is many limits in that one. For example, if I want to sum a page which contains many news links to "4 unread news", I must to access the history information of Firefox. But the existing generator mechanism can't satisfy the need. And the question is do we need to make such a summary as "4 unread news" or just "8 news". If the "4 unread news" is the better one, making a better microsummary generator service is necessary. Maybe we will modify the microsummary service, make it a manager of all the microsummary generators. And there will be various kinds of generators in the system, which will register itself to the microsummary service to maintain its microsummary as needed. So, any extension can make its own generator and microsummary instead the existing XSL one. The two question are all refering some modification of Firefox components, so I post it here and any suggestion or comment are welcomed.
> 1.For drag/drop microsummary creation. I have write some code to support drag > something from the user content area, but the question is how to drop. > > I found that there is no such mechanism in the onDrop function that can let > user to drop a microsummary bookmark. The function only process three flavor > "moz/rdfitem","text/x-moz-url" and "text/unicode" and it only process the > title and url of the transferable object. So there is no way to add new > property such as "MICSUM_GEN_URI", which is essential for microsummary, for a > bookmark entry and then there is no way to create a microsummary bookmark by > drop. > > I suggest two method to deal with this. One is to add another bookmark > ondrop observer, which will do the job to create a microsummary bookmark, in > my microsummary extension. Another is to change the existing bookmark ondrop > observer to make it process more drag/drop data than just url and title. > > I prefer the second way to do this. While the existing bookmark service itself > if very flexible, by which user can add microsummary, live bookmarks and etc, > the existing drop mechanism is ugly to some extend. It can't satisfy the > various bookmark creation. Changing the ondrop handler to make it be able to > add new property or annotation in firefox 3 will yield a more flexible > bookmark manager. I agree. And this seems like functionality that might be very useful for other extensions that want to support drag-and-drop creation of bookmarks annotated with their own particular meta-data. Bo, please file a separate bug on this additional functionality, since it's something that should go into the Firefox core. I'm also cc:ing Seth Spitzer on this bug to get his feedback on this change to the core bookmarks functionality. (Seth, let me know if you think someone else should be looking at this instead.) > 2.For the microsummary generator. > Now, there is only one kind of microsummary generator, XSL. But I think there > is many limits in that one. For example, if I want to sum a page which > contains many news links to "4 unread news", I must to access the history > information of Firefox. But the existing generator mechanism can't satisfy > the need. This example seems better accomplished with live bookmarks. We could modify live bookmarks to display the number of unread stories somewhere in the bookmark label, f.e. after the name of the bookmark, just like folders in Thunderbird: BBC News (4) > And the question is do we need to make such a summary as "4 unread news" or > just "8 news". If the "4 unread news" is the better one, making a better > microsummary generator service is necessary. Although "4 unread news" is probably best accomplished with live bookmarks, there may well be other kinds of such "calculated" summaries that work best as microsummaries. Nevertheless, I think it makes sense to start by focusing on the simplest and highest value functionality that this project can provide, which is to enable a user to pick some content from the page and turn it into the label of a bookmark. Once we have that working well (and I would caution us against underestimating the amount of time it will take to get this working well), then we can proceed to more complicated calculations, for which we may well need to support different types of generators (like those that power the manipulations made by Platypus - http://platypus.mozdev.org/). > Maybe we will modify the microsummary service, make it a manager of all the > microsummary generators. And there will be various kinds of generators in the > system, which will register itself to the microsummary service to maintain its > microsummary as needed. So, any extension can make its own generator and > microsummary instead the existing XSL one. This seems like a fine way to implement this functionality.
Weekly Report #2: In this week, I have read most of code for bookmark component and the now existing microsummary generator extension. Also, I have got myself more familiar with XUL,XPath,DOM and so on. I must to say I am nearlly ready for composing my own code. I found most of Mozilla guys are in vocation this week and I am very happy Myk is availabe now. Anyway, wish you a good holiday and I am confident to complete the extension.
Weekly Report #3: I composed a draft UI and am discussing it with Myk this week. I will upload the attachment of UI summary document. And I have got a full understanding of the microsummary service and extension. Some coding work and more detailed UI work will start next week.
Weekly Report #4: A new UI design have been composed by Myk and I. Some code of the microsummary edit box were written in XBL and JS. The development work progress swiftly. There is a problem that the bug of "bookmark creation by drag-drop with flexble meta data" has not been assigned to anybody util now. How to deal with this? Is that that you think this is not a bug and did not want to take this function into consideration or there is nobody want to accept it? If it falls into the second situation, I think I am happy to accept it.
> There is a problem that the bug of "bookmark creation by drag-drop with flexble > meta data" has not been assigned to anybody util now. How to deal with this? Is > that that you think this is not a bug and did not want to take this function > into consideration or there is nobody want to accept it? I think it's the latter. > If it falls into the second situation, I think I am happy to accept it. Please do, that'd be great!
weekly report #5 & #6: I think I need to say sorry for these two weeks, but there are various matters of graduating. Although I have past very busy two weeks, some works are done for the extension. Firstly, a draft node selection function are implemented. Secondly, I make a rough framework for the XBL file. Thirdly, I have make some preparation for the fix of the bug https://bugzilla.mozilla.org/show_bug.cgi?id=383044 The main of work of next week : Make a patch to fix the bug https://bugzilla.mozilla.org/show_bug.cgi?id=383044. I submit the first draft extension code here. And I must say, it can't work fully. I hope some of you can review my code and point out my fault if there is any. Thank you!
Attached file A rar archive of the extension (obsolete) —
I upload the RAR archive of the extension, I hope this is suitable.
Comment on attachment 270492 [details] A rar archive of the extension I wouldn't call that acceptable; unrar is kinda proprietary. ;) (changing the mime type)
Attachment #270492 - Attachment mime type: application/octet-stream → application/x-rar-compressed
> I upload the RAR archive of the extension, I hope this is suitable. Unfortunately I don't have a RAR decompresser on my machine, so I can't take a look at this. Bo, can you convert the archive into an installable XPI? That's the ideal format for an extension.
This is a very basic version of the extension. I know there are many core feature of the extension did not include. So, please review the code instead of the feature. I will add more feature into it in the following days. Thanks !
Attachment #270492 - Attachment is obsolete: true
weekly report #7: I spend most of work time in this week on inspecting Places code and designing the drag-and-drop creation of bookmark with meta-data. Basically, I add a new PlacesTransaction in Controller.js "PlacesEditBookmarkAnnotationTransaction" which is used to edit an annotation of given bookmark. And in the PlacesControllerDragHelper, I will add a new mechanism to process a new kind of flavor "text/x-places-url" from which the PlacesEditBookmarkAnnotationTransaction will be constructed. After I complete the above work, some new test code extension will be written to test the new function.
weekly report #8 & #9: I put so much energy into developing the basic version of the extension that I forget to fill the weekly report last week. So I put the two reports together here. And in the last two weeks, I compose a basic version of the extension which include following features: 1.Flexible node selection with both click and drag-and-drop. 2.Flexible Microsummary editing control. 3.Microsummary save and install function. There are also some problems left: 1.When user click on a link in selection mode, the browser will load it. 2.When the text is too long in the MS editor, the overflow will disappear. 3.The way to save the current microsummary is not clear enough. In the remaining days of this month, I will improve basic version and also begin to develop the features which include a more full-feature editor and more sane node selection.
weekly report #10: I spend most of my time last week in searching various developer document to find how to deal with some XUL matters such as how to support scroll without scrollbar. Although I did not get an answer for all my troubles. But I have done: 1. Disable mouse click when the user run into selection mode(Myk point out this bug); 2. Disable the unwanted drag-and-drop of the scrollbar thumb; 3. Make save button invoke the bookmark save dialog directly(Myk propose this good idea); And the left troubles are: 1. The editor still can not scroll without scrollbar; 2. Ah, I think I only find the above one, hehe! What I will do this week: 1. Make the editing function more sanity; 2. Advanced options UI implement; 3. Implement some of the predicator(Maybe value-changed first); Thanks!
report #11: In this week, I designed a generator XML file which support predicator and a more advanced feature(getting the number of siblings of desired node). I upload the example file here. And the advanced options UI are partly out. Myk, I will send you a new draft version of the extension to discuss the new UI's pros/cons. I completed the "number of new siblings" predicator. Also, there are some problems left this week: 1. I get some trouble with XUL box model. The advanced UI elements did not fit well with each other. 2. I find that I did not change the "save" handler into desired behavior although it may only need a few lines of code. I will complete it next week. And I will continue to implement another two predicator features in the coming weeks as well as repair the existing flaws.
This is just an example of a microsummary generator file which display how to achieve "number of siblings" and "value-changed","sibling-changed" predicator in it.
weekly report #12: In this week, I have made the extension able to generate XSTL file which support predicator. And to completely support the predicator feature, the generator XML file should be updated after the user has visited the bookmarked page. For this feature, I add a new file "predicatorUpdater.js" which is responsible for update the XML file when necessary. This means that when I compose the advanced UI(after Myk's advice), a roughly completed extension will come up. And I also add the drag-and-drop bookmark creation feature into the extension. But I found that the patch for bug 383044 is still in review. So the feature will not work until the patch pass reviews.
weekly report #13 In this week, I make almost all backend functions work. And I have a long and meaningful talk with Myk. Through that talk, we got a list of improvements for the extension. In the following two weeks, I will work on these improvements to make the initial version better.
Ah, I nearly forget to close this bug. The internship is over and I will continue to improve the extension. Thanks!
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: