wiki:GROUP_GUI_REDESIGN_R0

Version 13 (modified by tanya, 16 years ago) (diff)

--

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

Error: Macro TicketQuery(summary=GROUP_GUI_REDESIGN_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

The goal is to come up with a stable design of the UI in Sophie2. Parts of the UI are listed bellow:

  • Layout:
    • The library used and its implementation is Sophie2(currently mydoggy).
    • The book document and book desktop windows.
    • Flaps, tabs, palettes.
  • Halos:
    • Menus
    • Buttons
    • Huds
  • Bound controls
  • Dialogs
  • Color Picker
  • Skins
    • Icons
    • Tool-tips
    • Component titles

Task requirements

  • The code for every part of the UI should be reviewed.
    • Some parts may appear to be OK.
    • Other parts may need a redesign in order to meet the requirements.
    • UI should become consistent with the new resources, changes and templates (see GROUP_RESOURCE_MODEL_REDESIGN_R0, HOT_TEXT_REDESIGN_R0, GROUP_BOOK_MODEL_REDESIGN_R0).
    • For UI parts that need attention define a more suitable design. These include:
      • Layout:
        • MyDoggy - the whole "org.sophie2.main.layout.mydoggy" module should be rewritten (Flaps, tabs and palettes part).
        • The library(mydoggy) itself may also cause problems, so have in mind rewriting some part of it or may be use another library. Since the library is tightly connected with skins (look and feel part of them).
        • "...base.layout" - code should be reviewed for inconsistency. It should be made consistent also with the new model.
      • BookView hierarchy:
        • Examine the hierarchy of classes (BookView, BookContentView, BookDesktopWindow, ReaderBookDesktopWindow, BookDocumentWindow, ReaderBookDocumentWindow).
        • Remove old things that are no longer needed.
      • LogicR3:
        • Refactor FrameLogic, PageLogic, BookLogic, AppLogic classes to be LogicR3 classes.
        • JButtons that perform different actions across Sophie2 should also fire their events through the LogicR3.
      • Halos: - things there seem to be alright for the time being. A refactoring has already been made (see GROUP_BASE_HALOS_AND_FRAME_POSITION_R1 for more details, where the menus were refactored.)
      • Bound controls:
      • Dialogs:
        • See TLID:510
        • Make the non-cancel button default where needed (OK and Open).
        • Underline and make accessible by alt all buttons. Make sure tab works correctly.
        • Change the order of the dropdown menus.
          • The "All files (*.*)" should be at the bottom of the list.
          • The menus should be implemented in a way that if someone adds support for a new Image file for example, it's menu item should be added before the "All files (*.*)" dropdown item. It's extension should be added to the extension list.
        • See if somewhere Cancel button is not at the right bottom size of the dialog
        • Align buttons in Book Properties dialog
        • Rename dropdown items according to the testcase (all of them)
        • Add dropdown items for each file type - for example for image files, there should be "JPEG Image file (*.jpeg;*.jpg)" "GIF Image file (*.gif)" etc dropdown items.
  • Color Picker - the color picker is already a bound to the model.
    • There is a bug with the gradient dialog - clicking the color button breaks Sophie2. Fix it. Consider redesigning the gradient in a similar way to the color picker. Nevertheless the gradient changing component should be bound to the model as all controls in Sophie2 are.
  • Skins - the new skin Sophie2 should be integrated. Icons are ready. Use tool-tips from the default skin.
    • Icons - inconsistent icons of all skins should be fixed. This means that no icons should be used from the fall-back skin, since icons in skins differ a lot for different skins and sophie looks ugly with different icon styles.
    • Tool-tips - Tool-tips of the default skin a OK. Tool-tips of the alternative skin however should be fixed since not all components have an alternative skin tool-tip defined.
    • Component titles - Same as tool-tips.
  • Make all code connected with UI consistent with the new model and resources (this is something that depends on new resources and model).
  • Non-categorized things:
    • "Current" things (like current frame, page etc) should be entirely in the "view" (if there is something left in the model - remove it).
    • BoundColorPicker is not in the proper model - it should be independent of "...base.halos" (currently it depends on HudDialog and base bound things and cannot be put in the "...base.bound..." module).
  • Create diagrams of new designs if they appear to be complicated.

Task result

  • Source code
  • Diagrams

Implementation idea

  • Most of the ideas are already mentioned in some way or another in the requirements section.

How to demo

  • Open sophie and start explaining the new things that are improved. There are a lot of things and a simple how to demo cannot be defined.

Design

  • Layout

  • Halos

  • Bound Controls
    • bugs
    • new bound controls
  • BookView hierarchy
  • Logics - AppLogic, BookLogic, PageLogic, FrameLogic -> LogicR3
  • Menus
    • divide into modules
  • Dialogs
  • Skins
  • All interaction should go through the LogicR3 using EventR3. (This is refactoring of the old Logics).
  • When refactoring the code, have in mind that we need to have a sinle-document-interface for the workarea (preview mode, presentation mode etc.). So when redesigning we should implement such functionality.
  • Along with the Workspace and Layout consider having two separate windows for Author and Reader (one having all flaps and desktop book and one without these).
  • Halos - things there seem to be alright for the time being. A refactoring has already been made (see GROUP_BASE_HALOS_AND_FRAME_POSITION_R1 for more details, where the menus were refactored.)

  • Bound Controls:
    • The wiki page for this task -> BASE_BOUND_CONTROLS_R1
    • What should be refactored:
      • Fixing some bugs:
        • Implementations of bound controls using JTextField have a bug connected with the listeners attached to the text field.
        • Fixed a bug with zoom percentage combobox - When you enter any text (no matter digits or other symbols) and click somewhere else so the combobox loses focus a ClassCastException was thrown. The reason was that ComboInput used in ZoomPercentagePanel.validate() and ZoomPercentagePanel.submitData() should be of type ZoomLevel but in some cases it was of type String. The problem was fixed by adding a check for the type of ComboInput.getLevel(). Another problem came up with the separator used in float numbers. In the combobox was used ',' but it was impossible enter a valid float number using ',', only '.' was aloowed. The problem was fixed by replacing all ',' in the original string with '.'. This change remains invisible for the user as the text entered i nthe combobox doesn't change visually. This change takes palce in dataInputControlMethod(), which belongs to the base class for all bound comboboxes. So in order the change to be made only in Zoom Percenatage combox (we don't want to replace ',' with '.' in all comboboxes), this method was overriden in ZoomPercentagePanel class.
        • BoundCheckBox - a problem connected with Boolean.TRUE/Boolean.FALSE - does not update state properly with the pro lib.
    • Fix the layout of the components in the bound control.
    • Change the hierarchy so that the icon of the state can be dropped (controls should be able to chose whether with such an icon or without it).
    • Create new bound controls:
      • The "bound control" looking panel that most huds use for changing colors is not an actual bounds control. Create such a control:
        • The listener should be attached not to the whole panel, but rather to the color rectangle which may become a "ButtonBoundControl".
      • Introduce a "SliderBoundControl" that has a JSlider bound to some model.
  • Menus
    • The wiki page for this task -> BASE_MENUS_R1?
    • All menus and menu items are in the same module. Every menu/menu item should be in a module that is responding to its functionality.
  • Dialogs
  • Color Picker - the color picker is already a bound to the model.
    • There is a bug with the gradient dialog - clicking the color button breaks Sophie2. Fix it. Consider redesigning the gradient in a similar way to the color picker. Nevertheless the gradient changing component should be bound to the model as all controls in Sophie2 are.
  • Skins - the new skin Sophie2 should be integrated. Icons are ready. Use tool-tips from the default skin.
    • Icons - inconsistent icons of all skins should be fixed. This means that no icons should be used from the fall-back skin, since icons in skins differ a lot for different skins and sophie looks ugly with different icon styles.
    • Tool-tips - Tool-tips of the default skin a OK. Tool-tips of the alternative skin however should be fixed since not all components have an alternative skin tool-tip defined.
    • Component titles - Same as tool-tips.
  • Make all code connected with UI consistent with the new model and resources (this is something that depends on new resources and model).
  • Create diagrams of new designs if they appear to be complicated.
  • Changesets:
    • [4303] - bugfix of the bound controls.
    • [4334] - bugfix of mydoggy library (LookAndFeel stuff).

Implementation

(Describe and link the implementation results here (from the wiki or the repository).)

Testing

(Place the testing results here.)

Comments

(Write comments for this or later revisions here.)