wiki:PREVIEW_MODE_R0

Version 14 (modified by kyli, 16 years ago) (diff)

--

Error: Macro BackLinksMenu(None) failed
compressed data is corrupt

Error: Macro TicketQuery(summary=PREVIEW_MODE_R0, format=table, col=summary|owner|status|type|component|priority|effort|importance, rows=description|analysis_owners|analysis_reviewers|analysis_score|design_owners|design_reviewers|design_score|implementation_owners|implementation_reviewers|implementation_score|test_owners|test_reviewers|test_score|) failed
current transaction is aborted, commands ignored until end of transaction block

Analysis

Overview

This mode shows the book as it will look like in Reader. This mode is most convenient for reading books. It allows the user to test his links, events, etc.

Note: Preview mode = Reader mode = Test mode.

Author mode = Edit mode.

Task requirements

The user can’t edit his book in preview mode. He can only interact with it. Actually currently the book can edit the book using links/timelines; however, these changes should not affect the original book. This is why it is a good idea to make a copy of the book, operate on it, and this will not change the original book.

In preview mode, all links are functional, unlike in Edit mode. Timelines must be functional, too

Reader mode applies to current book. A good idea is the reader mode to be applied to a copy of the book, so it will not apply to the current one.

The user can switch back and forth from edit mode to preview mode by:

  • checking the reader mode check box in the bottom bar of every book window
  • selecting View -> Reader Mode from the menu. (Create View menu first) Here the suggestiong is to have a button "Go to preview" instead of checkbox.. this way it will be much more adequate. Decide about the menu.

The frame borders are turned off. Will they? currently they are not.

All menu items related to editing, for example the Insert menu, File->Save, should be disabled. Decide how the items will be disabled - whether each item/functionality will watch the current book previewMode option, or someone will disallow book editing.. If every item will disable itself, define which are these items.

Some tabs are hidden: Timelines, Resources, Styles Define exactly.

On exiting Reader Mode, all such changes are reverted. This should be defined more clear - maybe the user wants to see other than the X on the top right corner.

Although editing is not allowed, comments and annotations (stickies, highlightings) can be created/modified/deleted.

Selecting objects and copying them to the clipboard is allowed.

Should define relations to the preview mode with the reader, with the fullscreen mode, etc. Should also define what will the user most probably do in the preview mode.

Preview mode needs performance optimizations and bugfixing - define these two problems, research for more.

Task result

The result of this task should be source code.

Implementation idea

  • Currently there is a boolean property inReaderMode in org.sophie2.main.view.book.BookView. According to the specification, reader mode is applied to all books, so move it to AppView. We will define more ideas soon :)

How to demo

  • Run Sophie 2
  • Create a new book
  • Insert a text frame
  • Switch to Preview Mode
  • Try to move the frame or to edit its text content
  • Switch to Editing Mode
  • Try to move the frame again - this time it must be possible

Design

  • Create a menu in the main menu bar called View. (class ViewMenu)
    • Title - "View"
    • Tool-tip - "View menu"
    • Mnemonic - KeyEvent.VK_V
  • Create a preview mode menu item. (class PreviewModeItem)
    • Title - "Preview mode"
    • Tool-tip - "Switch current book in preview mode."
    • Memonic - KeyEvent.VK_P
  • ViewMenu and PreivewModeItem should go in:trunk/sophie2-platform/modules/org.sophie2.main.view.menus package. The new package should be called "org.sophie2.main.view.menus.view".
    • Done - check commit before merging the release (when merging the release branch it was forgotten).
  • Disable the menus that should not be active by checking the inPreviewMode() value of the BookDocumentWindow.
    • Some menu items in File menu:
    • Most of the items in the Edit menu except for: UndoItem and RedoItem which should be available for Stickies and Comment frames only. - partially done (should fix the Undo and Redo items).
    • Whole Insert menu. InsertMenu
  • Hide HaloMenus and Frame borders, changing the computeVisible() method by checking the inPreviewMode() value of the BookDocumentWindow.
  • Create a copy of the book that should be used for preview mode. It should be computed for every BookWindow.
    • the book() method should return an AutoProperty that return either the original book or a copy of it depending on whether the BookDocumentWindow is in preview mode.
    • the original book should be set in a value property editableBook().
  • In in preview mode the scene interaction should not be included. Check the SceneInteractionLogic class for more details. It should not handle most of the input events in preview mode.

Implementation

(Implementation results should be described and linked here (from the wiki or the repository))

Testing

Comments

(Write comments for this or later revisions here.)