Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DescriptionDisplayTest #123

Merged
merged 13 commits into from
Nov 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ classes/
/bin/
src/main/resources/docs/
out/
src/test/data/sandboxmanyCalendarEvents.xml
14 changes: 7 additions & 7 deletions docs/DeveloperGuide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,8 @@ image::StorageClassDiagram.png[width="800"]
The `Storage` component,

* can save `UserPref` objects in json format and read it back.
* can save the Address Book data in xml format and read it back.
* can save the Scheduler data in xml format and read it back.
* can save the ToDoList data in xml format and read it back.

[[Design-Commons]]
=== Common classes
Expand Down Expand Up @@ -541,19 +542,18 @@ The user can:

The navigation features included are:

1. Toggling between weekly view and daily view using `T` key.
1. View a `CalendarEvent` in the time table display by selecting the event. The time table display will jump to the correct time period and attempt to centralize the selected event.

2. View a `CalendarEvent` in the time table display by *selecting* the event. The time table display will jump to the correct time period and attempt to centralize the selected event.
2. View the next/previous week or using the `left` and `right` arrows keys.

3. View the next/previous week or day (depending on the current view) using the `left` and `right` arrows keys.

4. The user can scroll up and down the 24-hour timeline using `up` and `down` arrow keys, or using the mouse scroll wheel.
3. The user can scroll up and down the 24-hour timeline using `up` and `down` arrow keys, or using the mouse scroll wheel.

===== Design considerations

Initially, the navigation features were implemented for ease of testing CalendarDisplay, with the intention to implement
Command Line Interface commands in the future. This would agree with the project direction, since this application is intended to be controlled using the command line.
Navigation method `2` would also be sufficient in most cases.
Having the calendar jump to display selected events would also be
would also be sufficient in most cases.

However, `Agenda` 's time table display was implemented using a customized ScrollPane, which could be scrolled using the `up` and `down` arrow keys and the scroll wheel. Hence, using the `left` and `right` arrow keys for navigation felt very natural and user-friendly.

Expand Down
42 changes: 34 additions & 8 deletions docs/UserGuide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ e.g. typing *`help`* and pressing kbd:[Enter] will open the help window.

=== Viewing help : `help`

Opens the User Guide in a new window.

Format: `help`

=== Adding: `add`
Expand Down Expand Up @@ -258,19 +260,36 @@ The `redo` command fails as there are no `undo` commands executed previously.
Clears all entries from the calendar. +
Format: `clear`

=== Interact with the Calendar Display
=== Using the Calendar Display

==== Manual navigation:

Navigating the calendar to viewing the events:

1. Double click on displayed events to open a dialog box containing the details of the event.
* kbd:[←]: Display previous week
* kbd:[→]: Display next week
* kbd:[↓]: Scroll up to events earlier in the day
* kbd:[↑]: Scroll down to events later in the day

[NOTE]
====
Scrolling with the mouse wheel is also possible.
====

2. Jump to the time period containing an event by selecting the event in the list of calendar events.
[NOTE]
====
The calendar display msut be in focus in order to navigate with the arrow keys.
====

The user can navigate the calendar display using the `arrow keys` and `T` key.
==== Automatic Navigation:

1. The user can toggle between weekly view and daily view using `T` key.
When selecting an event, either by `select` command or clicking in the list of calendar events,
the calendar display will navigate to that event and attempt to centralize it in the display.

2. The user can view the next / previous day or week using `left` and `right` arrows keys.
==== Viewing Event Details

3. The user can scroll up and down using `up` and `down` arrow keys, or using the mouse scroll wheel.
The compact display of the calendar does not allow all the information of the event to be displayed.
To view full details of an event, double click on it to open a dialog box containing the details of the event.


=== Exiting the program : `exit`
Expand All @@ -294,13 +313,19 @@ _{explain how the user can enable/disable data encryption}_
*Q*: How do I transfer my data to another Computer? +
*A*: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous U-Schedule folder.

*Q*: Why is the calendar display not responding to the arrow keys? +
*A*: The calendar display must be in focus in order for it to receive the arrow key events. Try clicking on the calendar display. If a blue highlight is present around the edges, the calendar display is in focus and will now receive the key presses.

*Q*: The date time parser is parsing dates unexpectedly! +
*A*: The Natural Language Parser we used tries its best to parse a datetime out of any input. Hence, there are some inputs which even humans would not consider a valid date, but the parser would still try to find a best fit. Most of the time, if a human can understand the input, the parser will parse the input correctly.

== Command Summary

* *Add* `add event t/TITLE d/DESCRIPTION s/START_DATETIME e/END_DATETIME v/VENUE [tag/TAG]...` +
e.g. `add event t/CS2103 Lecture d/Abstraction, IntelliJ, Gradle s/2018-10-16 14:00 e/2018-10-16 16:00 v/i3 Auditorium tag/lecture`
* *Add* `add todo t/TITLE d/DESCRIPTION p/{H/M/L}` +
e.g. `add todo t/CS2103 Assignment d/Version Control p/L`
* *Clear* : `clear`
* *Clear* : `clear calendar`
* *Delete* : `delete {event/todo} INDEX` +
e.g. `delete event 3`
* *Edit* : `edit event INDEX [t/TITLE] [d/DESCRIPTION] [s/START_DATETIME] [e/END_DATETIME] [v/VENUE] [tag/TAG]...` +
Expand All @@ -318,3 +343,4 @@ e.g.`show todo 2`
* *History* : `history`
* *Undo* : `undo`
* *Redo* : `redo`
* *Calendar navigation* : kbd:[↑] kbd:[↓] kbd:[←] kbd:[→]
2 changes: 0 additions & 2 deletions src/main/java/seedu/address/commons/core/GuiSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
* A Serializable class that contains the GUI settings.
*/
public class GuiSettings implements Serializable {
// TODO change the default height and width to something appropriate
// TODO look at ui component and see if anything else belongs to GuiSettings
private static final double DEFAULT_HEIGHT = 600;
private static final double DEFAULT_WIDTH = 740;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
import seedu.address.commons.events.BaseEvent;

/**
* Indicates a request for the calendar ui to display a particular localDateTime
* Indicates a request for the calendar ui to display a particular localDateTime.
* The {@code targetLocalDateTime} will have nanoseconds set to 0.
*/
public class JumpToDateTimeEvent extends BaseEvent {

public final LocalDateTime targetLocalDateTime;

public JumpToDateTimeEvent(LocalDateTime targetLocalDateTime) {
this.targetLocalDateTime = targetLocalDateTime;
this.targetLocalDateTime = targetLocalDateTime.withNano(0);
}

@Override
Expand Down
Loading