| Summary: | [client] we should make an effort to avoid dojo in editor components! | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Susan McCourt <susan> |
| Component: | Client | Assignee: | Simon Kaegi <simon_kaegi> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | bokowski, eclipse.felipe, mamacdon, mihai.sucan, nathan, simon_kaegi |
| Version: | 0.2 | ||
| Target Milestone: | 0.2 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Susan McCourt
Do you have an idea how much of Dojo we are using in that subset? If it's just a handful of things (things that come to mind are DOM access, XHR, animation) then it shouldn't be too hard to do. Of course, the question would be how we could ensure that no new Dojo dependencies creep in over time. I haven't looked in detail, but I would imagine that we are mostly using the DOM utilities. The embedded editor doesn't go getting files from the server or anything like that, it's just supposed to demonstrate stand-alone js/css/html editing where the file came "from somewhere" and there is a save hook. (In reply to comment #1) > Do you have an idea how much of Dojo we are using in that subset? I did a quick grep and found that embedded/minimal editor are using these (in order of most to least often) - dojo.hitch - dojo.byId - dojo.connect - dojo.Deferred, dojo.DeferredList (for content assist only) - dojo.query, dojo.create (for content assist only) - dojo.forEach, dojo.map (for content assist only) - dojo.regexp.escapeString (for Find only) - themes (dojo.css, nihilo.css) This would be a good since the editor files are the only ones that declare global names (so they can work without requireJS), this forces dojo to end up as global too. We also use the low-level dojo animation support for animating things like go to line. It's very late in the release so what we've done is to ensure that the textview components are not using dojo and the editor components are using just the subset of dojo exposed in the base. e.g. no build required and no need for dojo runtime downloading of components etc. e.g. <script src="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dojo/dojo.xd.js" type="text/javascript"></script> or <script type="text/javascript" src="/org.dojotoolkit/dojo/dojo.js.uncompressed.js"></script> These changes are now in HEAD. (Mark reviewed) At the moment our example is importing the dijit css files so before closing this bug for 0.2 we also want to ensure our examples look right after removing these files. Closing this for 0.2. We're tracking the changes in the examples in bug 349705. |