ufopleds / DengueME

BSD 2-Clause "Simplified" License
4 stars 5 forks source link

Redesign the feature "Rename Model" (main interface) #12

Closed tiagofml closed 7 years ago

tiagofml commented 7 years ago

Redesign the feature "Rename Model" (main interface)

Specification

User Storie

AS user, I WANT to rename a model SO THAT I can better organize the project. See other templates https://en.wikipedia.org/wiki/User_story.

General behavior

Preconditions: a model is selected (Project Explorer View) or opened (Editor) and it has a valid name. Postconditions: 1) the model (XML file) is updated with a valid new name, 2) the model script folder is updated with a valid new name. Rules / restrictions:

Basic Flow

  1. The user access the "Rename Model" feature: File -> Rename | Toolbar icon | F2 | Context menu
  2. The "Rename Model" window is opened (auto-focus), with no warning/error message and with "OK" button disabled.
  3. User types a valid name for the model.
  4. The "OK" button is enabled.
  5. User clicks on "OK" or user types ("ENTER") on keyboard.
  6. The focus must be on the renamed model on the project tree view.
  7. The model (XML file) is updated with the new name, and the model script folder is also updated. The "Rename Model" window is closed and the user returns to the main interface.

Alternative Flow: user cancel the operation

N.1. User clicks on "Cancel" or "X" N.2. The "Rename Model" window is closed and the user returns to the main interface

Alternative Flow: name is invalid

3.1. User types an invalid name for the model. 3.2. A warning message is presented.

Alternative Flow: name already exists

3.1. User types a name of a model that already exists in the same project. 3.2. A warning message is presented.

GUI

Prototype

image

Guildelines

Messages and labels (english | portuguese)

tiagofml commented 7 years ago

@Guelmisp The window is not translated to Portuguese. image

tiagofml commented 7 years ago

@Guelmisp The translation problem must be addressed in issue #13.

tiagofml commented 7 years ago

@Guelmisp

1) The window size must be fixed with proper dimensions, without allowing resize. (630 x 290)

2) Update the visual feedback of the focus when user type a valid name. For example, if I type a valid name and press "Enter", the action of "OK" button will be performed (fine), but the visual feedback is wrong (it seems that the "Cancel" button has the focus)

image

3) Check the tab order

saraiva3 commented 7 years ago

The rename window has a small problem in its interface, the buttons should be self containned in the layout, so it moves all together

image

miguelspe commented 7 years ago

The required changes were addressed by #20 pull request.

  1. The window size is now 630x290.
  2. focus is now updated when a user types a valid name.
  3. The Window was fixed and the problem reported by @saraiva3 was fixed.
tiagofml commented 7 years ago

@Guelmisp Please check the following problems:

3) press "OK" - the model has the focus, but the Rename feature is disabled. Actually, it seems that the file does not have the focus, despite the visual feedback. The same problem happens when the window is opened and closed using "Cancel' (1) select a model, 2) press F2, 3) click "Cancel"). image

A suggestion to solve this is to not enable the "OK" button if the name remains the same. And remember and mantain the selection in the Project Explorer view.