Firefox/Projects/Console: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
Line 137: Line 137:
Chris Blizzard mentioned the "timing" interface Google is working on with the WC3: http://dev.w3.org/2006/webapi/WebTiming/
Chris Blizzard mentioned the "timing" interface Google is working on with the WC3: http://dev.w3.org/2006/webapi/WebTiming/


It appears as thought the timing interface is implemented in Chromium nightlies, it is cool.
It appears as though the timing interface is implemented in Chromium nightlies, it is cool.

Revision as of 20:10, 19 April 2010

Do not edit this page RESTRICTED Do not edit this page
Please do not edit this page without permission; comments should be added to the discussion page.

Interactive Console, 'HeadsUpDisplay'

Create an interactive Console to help web developers understand everything that happens during the creation of a web-page. Console entries will be time-stamped objects representing errors, network traffic, javascript events, DOM/HTML mutation and logging output. The Console will also have an interactive command line for evaluating javascript against the current webpage and an interactive Workspace window for entering and evaluating larger blocks of code.

For web-developers, the Console should include a logging API and a richer interactive environment for executing live javascript against the active webpage.

The Console should fully-replace the existing Error Console window.

Goals/Use Cases

  • Replace Error Console
  • Provide rich logging experience for web developers
  • Provide interactive JS editing environment
  • Provide simple object inspection (either via console or separate UI)

Non Goals

  • chrome manipulation
  • provide enough information to actually recreate the webpage from the logs
    • e.g., displaying images in expanded boxes
  • overly pretty display. it's text!

Status

Latest work and patches on bug 534398. Review requested. Currently working on 'GlobalConsole' bits

Latest Try Build is here: https://build.mozilla.org/tryserver-builds/ddahl@mozilla.com-HUDConsole0415/

Timeline / Milestones

milestone 0.1

  • Testing, jsm and component scaffolding: bug 545266 bug 546708
  • create proper, threadsafe hud-service
    • possibly modify/reuse existing console service to serve our purposes - check.
    • bug 534398

milestone 0.2

  • console reattachment on reload, new window creation
  • console panel (preliminary XUL widget)
  • add global console object / API
  • (submit for toolkit peer feedback/review) - check.

milestone 0.3

  • ConsoleMessage class: abstract all console message types into a ConsoleMessage object
  • HTTP traffic observation and logging
  • DOM Mutation event logging
  • eval JS from command-line
  • "Terminal-like" UI for each "JS context" - "JS Workspaces"
  • JS command line history
  • GeckoApplication "Mixins": allow any Gecko application (beginning with Firefox) to insert UI and JS Context hooks

milestone 0.4 - CURRENT WORK 2010-04-19

  • Preferences to toggle functionality
  • Global Console implementation: interleaves global console service messages that are "content js", "CSS Parser", etc... messages.
    • Exception Listener to surface all exceptions, css warnings, etc...
  • Attach console input to console UI: the "JSTerm" object should be able to be used as either an input for the console or a JS Workspace (modularization)
  • JS Workspaces polish: key bindings, history, tab completion
  • break bigger files down to stand-alone "support" jsms for easier maintainability and review (with isolated tests)
  • Firefox UI front-end planning/brainstorm/mockups bug 559481 bug 559482
  • get reviews from platform people, vlad

Land on trunk after 0.4 reviews

End of Q2??

milestone 0.5

  • evaluate nightly web dev user feedback / refactor (milestone cleanup)
  • Firefox UI front-end implementation
  • add links to view source in console
  • Popup menus to expose additional functionality
    • create popup menu for workspaces, eg file, edit, evaluate
    • create popup menu for console content area
    • edit (copy / paste), save (import(?), apply(?) for later)
  • Create event for Reflow
  • Jetpack Integration
  • console command line aliases and magic: make extensibility API for Gecko apps, Jetpack

milestone 0.6

  • Refactor HeadsUpDisplay.jsm to not be Firefox-specific
  • Fennec Integration / remote logging/debugging
  • Thunderbird Integration
  • W3C Timing Spec??
  • more events!

milestone 0.7

  • ...

Delivery Requirements

  • Talked to jst about using an observer to instantiate our console object inside of the nsIDOMWindow's constructor to really make our implementation not have to deal with wrappers (or the details of) so much. This may be a mute point thanks to sicking's patch on bug 549539

Constraints

  • Wrappers, but I think this will be a mute point, as mrbkap is close to landing a patch to make contentWindow property attachment "easy" and "fun"
  • Security reviews early and often?

Dependencies

JSD API: bug 560314

Testing

  • now that the testing scaffolding is up, I plan on testing every method written, and am trying to write all of this code with testing on the "front burner"
  • TDD!

Related Projects

Firefox/Projects/Inspector

new JSD API: [1] bug 560314

Related Bugs

Patches on bug 549539 Tracking bug 529086 UX bugs: bug 559481 bug 559482

bug 545266 bug 546708 bug 551056 bug 552140 bug 552143 bug 552144 JSD API: bug 560314

Team

  • Project Lead: robc
  • Participants: ddahl

Screenshots

Console Screenshot


JS Workspace Screenshot

Additional Thoughts

Chris Blizzard mentioned the "timing" interface Google is working on with the WC3: http://dev.w3.org/2006/webapi/WebTiming/

It appears as though the timing interface is implemented in Chromium nightlies, it is cool.