Release Notes: Sprint 18

peterflynn edited this page Dec 22, 2012 · 17 revisions
Clone this wiki locally

Note that this build has a new download location:

This final sprint of 2012 focused largely on architectural work preparing for future sprints, so there are fewer new features than usual (and more API changes).

What's New in Sprint 18

Full change logs: brackets and brackets-shell

UI Changes

No major changes to existing features.

API Changes

Code hints

  • registerHintProvider() - When registering with CodeHintManager, hint providers must now specify a list of supported CodeMirror mode names (e.g., "html" or "css"), and an integer priority (the UI is currently "winner take all," so the first provider to offer hints for a given mode is the only one whose hints are shown). Higher numbers should be used for providers that are more specialized (higher specificity).
  • Hint provider interface - Code hint providers must now implement a different, simpler interface. There are three required methods:
  1. hasHints() - Indicates whether a provider is willing to provide hints for the current editor and cursor location, and begins a new hinting session if so.
  2. getHints() - Returns either an immediate, synchronous response or a Promise that will eventually resolve to the response; the response contains a list of hints along with several other parameters.
  3. insertHint() - Inserts a hint into the current editor context and indicates whether code hints should remain open afterward (updated for the new cursor position).

Inline widgets

  • InlineWidget now automatically adjusts its width to match the host editor (see updateWidth()).
  • Widgets no longer have to provide an _editorHasFocus() method or override close() to avoid crashes when that function doesn't exist.
  • EditorManager.closeInlineWidget() no longer takes a moveFocus parameter. Instead, it auto-detects whether the inline widget has focus.
  • EditorManager.getFocusedInlineWidget() now returns any focused InlineWidget, not just subclasses of InlineTextEditor. It returns the widget directly instead of a bag containing it.
  • If you override InlineWidget.onClosed(), chaining to the original method is now required since it's no longer an empty stub.
  • New APIs: InlineWidget.hasFocus() and InlineTextEditor.getFocusedEditor()

NativeFileSystem - several changes to match the latest Directories and System draft spec:

  • requestNativeFileSystem() - successCallback is now passed a FileSystem object with a root DirectoryEntry property (instead of being passed the DirectoryEntry directly).
  • FileError -> NativeFileError (which implements DOMError) - For error codes, FileError.code -> and the constants for these values have moved from FileError to the NativeFileError enumeration (in its own separate module).
  • JSDocs in NativeFileSystem are much improved

Toolbar icons - Any icons added to the #main-toolbar > .buttons div must be 16px tall; otherwise all icons in the toolbar will become misaligned.

Native shell build - The brackets-shell build procedure has changed. Note: you only need to build brackets-shell if you're editing the native shell code - editing Brackets' HTML/JS/LESS code does not require this. To set up for the new build environment, follow the updated build setup instructions. You can follow these steps either on a fresh clone of brackets-shell or on an existing environment that was previously using the old build setup.

Warning: do NOT attempt to use the new build process on Windows XP. Building brackets-shell is not supported on XP, and the new scripts could delete your entire Brackets repo as a result (specifically, if you have a pre-existing XP build environment rigged up that you run these scripts on).

New/Improved Extensibility APIs

CSSUtils - Use getInfoAtPos() to get info about the CSS code near a given cursor position, similar to the longstanding HTMLUtils.getTagInfo() API.

Key bindings - to decline to handle a key event, a command can return a Promise that is already (synchronously) rejected at the time it's being returned. Other code or the browser default action will then handle the event. This is useful when you don't want to a bind key globally - e.g. the Emmett extension handles the Enter key when the focus is in an HTML editor, but not when the focus is in the Find bar.

It is now possible to specify a default platform-agnostic keybinding alongside one or more platform-specific bindings. This is a useful distinction as the experimental Linux build continues progressing.

ExtensionUtils - new APIs:

  • addEmbeddedStyleSheet() - Appends an inline <style> tag to the document's head.
  • addLinkedStyleSheet() - Appends a <link> tag to the document's head and tracks its loading.
  • parseLessCode() - Converts LESS code to CSS code.
  • getModulePath() - Returns the local disk path of an extension module.
  • getModuleUrl() - Returns the file:// URL of an extension module.
  • loadFile() - Loads a file from an extension-module-relative path.
  • The existing loadStyleSheet() now supports .less files in addition to .css

Known Issues

  • #1551: Changes within an extension (or a unit test) are not reflected by a simple "Debug > Reload Brackets." Workarounds:
    • Quit and re-launch Brackets to pick up the changes.
    • Open Developer Tools, click the gear icon in the lower-right, and select "Disable cache." This setting is remembered, but is only in effect so long as the Developer Tools browser tab remains open.
  • Debug > Run Tests is disabled in the installer/DMG distributions of Brackets, because the unit test code is not included. To run unit tests, pull Brackets from GitHub instead.
  • Debug > Show Developer Tools opens in a new tab in Chrome, rather than a new window in Brackets.
  • #1283: Text selection highlight sometimes jiggles when horizontally resizing window.
  • Mountain Lion (OS X 10.8) by default will not allow Brackets to run since it's not digitally signed yet. To work around this, right click the Brackets app and choose Open. You only need to do that once -- afterward, launching Brackets the normal way will work also.
  • #2272: Windows Vista may not allow the Brackets installer to run (you may not see any error message). To work around this, right-click the installer file, choose Properties, and click the Unblock button.

Community contributions to Brackets

Contributions from Brackets

Contributions to CodeMirror:

Bugs fixed in Sprint 18

For details on the bugs addressed, please refer to closed sprint 18 bugs. A few of the fixed bugs might not be caught by this search query, however.