200 likes | 354 Views
Enhance Feature of Mozilla Firefox - Tab Grouping. Iris Lai Jared Haines John,Chun-Hung,Chiu Josh Fairhead. August 3, 2007. Tab Grouping. Problem: too many tabs can become difficult to navigate Proposed solution: add functionality to group tabs by: Domain File type.
E N D
Enhance Feature of Mozilla Firefox - Tab Grouping Iris Lai Jared Haines John,Chun-Hung,Chiu Josh Fairhead August 3, 2007
Tab Grouping • Problem: too many tabs can become difficult to navigate • Proposed solution: add functionality to group tabs by: • Domain • File type
Approach 1 - Add Grouping Component to UI Definition Files • This modification should only impact one file in the UI layer: mozilla/toolkit/content/widgets/tabbrowser.xml.
Approach 1 (cont.) • Three operations need to be implemented: • Grouping/ungrouping open tabs • Adding a new tab to a group • Switching between groups • One new object: the group container
mTabContainer Tab1 Tab2 Tab3 Tab4 Tab5 Tab6 Approach 1 (cont.) • The current tab container structure
Group Container Group1 Group2 Group3 Tab1 Tab2 Tab3 Tab4 Tab5 Tab6 Approach 1 (cont.) • Proposed modification to the tab container structure
Approach 2 - Add Tab Grouping Extension • XUL Overlays are a way of attaching other UI widgets to a XUL document at run time. • A XUL Overlay is a .xul file that specifies XUL fragments to insert at specific merge points within a "master" document. These fragments can specify widgets to be inserted, removed, or modified.
Approach 2 (cont.) • Basic idea is to attach overlay .xul file to browser.xul (master document) so tab grouping UI widgets is built everytime we start the browser. • Create overlay .js file which will bound functionalities to user actions upon tab grouping UI.
Approach 2 (cont.) • Tab Grouping Diagram
Approach 2 (cont.) • Basics of DOM Element properties • attributes[] : can add attributes into the DOM node • childNodes[]: can Inserts a new node "newElement" as a child node of the current node.
Approach 2 (cont.) • Everytime user create “new group”, a element “Group” will be created and insert into DOM tree. • Group.name • Group.id • Everytime user create “tab”, a element tab is generated as usual, but adding 2 more attributes into tab element • Tab.Group_name • Tab.Group_id
Approach 2 (cont.) • When user clicks on “Group” that already exists, basically just search all existing tabs’ group id and group name • The matched tabs will be shown on the original tab bars. • Click on a tab, the web page will be displayed
SAAM Architectural Analysis • Stakeholders • User • Developer • Maintainer • Scenarios • User selects to group tabs (indirect) • User selects to ungroup tabs (indirect) • Developer implements the enhancement (indirect) • Maintainer modifies or removes the enhancement (indirect)
SAAM Architectural Analysis - First Approach • Potential risks • Implementation Risks • Interactions with the current tab feature • Interactions with other features • Tab grouping may produce unexpected behaviour in Firefox’s saved session functionality • Maintenance Risks • Enhancement will be tightly coupled with the current tab feature • Implementation will affect multiple methods within tabbrowser.xml • Modification will require retesting the original tab feature
SAAM Architectural Analysis - Second Approach • Potential risks • Implementation Risks • it might cause problems when UI elements talk to each other, which include Tabs, browser DOM tree, new Group elements. • Maintenance Risks • The maintenance risk of second approach is very low. • Performance Risks • The Firefox browser might be slowed down since extension must be read every time a browser is open.
Reveal Scenario Interactions • Testing the enhancement • Must pass test cases developed for the original tab feature • Must also pass test cases developed for the enhanced tab feature • Test general tabbing and grouping behaviors • Test saving sessions while tab grouping is enabled/disabled. • Test tabs and groups displays
Conclusion • The first approach has better performance and readability. • The second approach has better maintainability and reusability. • Both approaches have the same reliability problems.