Search Wiki:

Future Focus: Document Map Margin

By Jonathan Tsao

Introduction

Welcome to another Future Focus post. This time, we’ll take a look at a new IDE feature named Document Map Margin. Its goals are three-fold:
  • To enable quick navigation in a long document
  • To identify specific areas of code that require attention
  • To visualize the structure of the document
Please enter your feedback on Document Map Margin here.

As always, it is important that readers of this post have the right expectations. The information presented here is not a binding commitment nor is it necessarily our most current or most complete design. The Visual Studio schedule, unforeseen technical problems, intellectual property rights and competitive pressures may impact our schedule or our ability to share our plans.

Future focus is not designed to present a detailed specification of future features. Instead, its purpose is to outline in broad strokes, and easy to understand terms, the directions the team will take in the future. The design and screenshots presented below are likely to change. Keep in mind that the screen shots presented are not taken from actual prototypes, but rather hypothetical design mock-ups.

Overview

Navigating long files can often prove unwieldy and inefficient. Document Map Margin offers improved navigation of code files in two ways:
  1. By providing a thumbnail overview of a document in the margin, users can quickly navigate through files through spatial recognition. The thumbnail provides a helpful map of the code structure, which allows users to quickly identify familiar code patterns; upon identification, they can click on the thumbnail to navigate directly to their target. The thumbnail also helps in situations where users may not quite recall the name of what they are looking for, but know where it may be in the document.
  2. Specific sections in the code that need attention, such as errors and breakpoints, are highlighted (and gathered in a common window) so that users can easily navigate to those areas. With Document Map Margin, no longer must a user open separate tool windows to see this information.

Document Map Margin consists of two views:
  • Marker bar view
  • Thumbnail view
DMM - mockup small - thumbnail and marker - 2008-8-13.png
Marker bar view (left) and thumbnail view (right).

We plan to embed the Document Map Margin within the editor window, with the default position next to the vertical scrollbar. Users can easily toggle between the two views. Both views contain a location window (displayed in light gray), which indicates the position of the editor view in relation to the entire document.

Marker bar view

DMM - mockup small - marker - 2008-8-7.png

The marker bar is a thin strip that represents the height of the entire document. At the top of the bar is a toggle button to toggle between marker bar view and thumbnail view. At the bottom of the bar is a status indicator that informs the user whether the code in the current document has any errors or warnings. A dark gray location window gives context to users as to where the editor is in relation to the markers and the rest of the document.

Colored clickable markers represent important areas of code. The colors of the markers match the color settings of the user under Tools | Options. In the marker bar view, we’re considering highlighting:

  • Find in file results
  • Errors
  • Warnings
  • Find symbol results
  • Breakpoints/Tracepoints
  • Bookmarks
  • Task list shortcuts

Hovering over a marker invokes a tooltip which displays more information about the marker. Clicking on the marker will take the user directly to its location in the editor.

Thumbnail view

DMM - mockup small - thumbnail with regions - 2008-8-7.png

The thumbnail represents a zoomed out view of the entire document, including the text and a miniature version of the indicator margin. On longer files, the thumbnail starts scaling so that the entire document is always in view; text size shrinks vertically (but not horizontally). The thumbnail is resizable horizontally; doing so does not result in any scaling. At the top of the thumbnail is a toggle button to switch to marker bar view. At the bottom of the thumbnail is a status indicator.

Important items in the code are highlighted in color. Besides the markers of the marker bar view, we’re planning on having thumbnail view also highlight tracked changes and the beginning of regions. Collapsed code is shown in its entirely in the thumbnail; it is colored lighter to differentiate collapsed and un-collapsed code to the user.

Extensibility

We intend to make Document Map Margin customizable for third-party developers who wish to build their own markers.

  • Developers can hook up and display a custom marker at a specific point in the code.
  • The marker can be tied to a particular user-specified color in tools | options or a developer-specified color.
  • Developers can provide a custom tooltip to be displayed when a user hovers over the marker.

Feedback

We’d love to hear what you think about this feature and its design. Click here to post your feedback. Thanks!
Last edited Aug 13 2008 at 10:38 PM  by JonTsao, version 6
Updating...
Page view tracker