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

Merge V0.5rc ruiwen for integration #129

Merged
merged 8 commits into from
Nov 7, 2016
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
13 changes: 11 additions & 2 deletions docs/AboutUs.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,17 @@
<img src="images/ruiwen.png" width="150"><br>
**Role**: Developer <br>
Responsibilities: Team Lead<br>
Component SME: UI

Component SME: [UI](DeveloperGuide.md#UI-component)
* Aspects/tools in charge of: Documentation, Code Quality
* Features implemented:
* [Storage](UserGuide.md#change-storage-location--storage)
* [UP](UserGuide.md#command-stack-history)
* [DOWN](UserGuide.md#command-stack-history)
* [LEFT](UserGuide.md#week-selection)
* [RIGHT](UserGuide.md#week-selection)
* Code written: [[functional code](../collated/main/A0138431L.md)][[test code](../collated/test/A0138431L.md)][[docs](../collated/docs/A0138431L.md)]
* Other major contributions:
* Design of UI which includes MainWindow.fxml, DailyList.fxml, FloatingList.fxml and UpcomingList.fxml
-----

#### [Low Zheng Heng Henry](http://github.com/e0003801)
Expand Down
9 changes: 7 additions & 2 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,15 @@ The sections below give more details of each component.

[//]: # (@@author)

[//]: # (@@author A0138431L)
### UI component

<img src="images/UiClassDiagram.png" width="800"><br>

**API** : [`Ui.java`](../src/main/java/seedu/savvytasker/ui/Ui.java)

The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`,
`StatusBarFooter`, `BrowserPanel` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class
The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `TaskListPanel`, `UpcomingPanel`, `DailyPanel`, `FloatingPanel`,
`StatusBarFooter` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class
and they can be loaded using the `UiPartLoader`.

The `UI` component uses JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files
Expand All @@ -129,6 +130,10 @@ The `UI` component,
* Binds itself to some data in the `Model` so that the UI can auto-update when data in the `Model` change.
* Responds to events raised from various parts of the App and updates the UI accordingly.

The cursor will be focus to the `CommandBox` by default as the `CommandBox` carries out numerous keyboard shortcuts to make the app more user-friendly.

[//]: # (@@author)

[//]: # (@@author A0139916U)

### Logic component
Expand Down
37 changes: 34 additions & 3 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,13 @@ Format: `modify INDEX [t/TASK_NAME] [s/START_DATE] [e/END_DATE] [l/LOCATION] [p/

#### Change storage location : `storage`
Changes the storage location of Savvy Tasker.<br>
Format: `storage PATH`
Format: `storage NEW_FILEPATH`

> Parameters | Description
> -------- | :--------
> PATH | `Mandatory` Specifies the path where Savvy Tasker's task list is saved at.
> <br>
> If the new storage location specified by `PATH` is not accessible by Savvy Tasker, no change will be made to the existing path.
> If the new storage location specified by `NEW_FILEPATH` is not accessible by Savvy Tasker, no change will be made to the existing path.

[//]: # (@@author A0097627N)

Expand Down Expand Up @@ -258,6 +258,17 @@ Add task named "pjm" to task list

[//]: # (@@author A0139915W)

[//]: # (@@author A0138431L)
#### Command stack history
[UP]: Return last user input command in command box
[DOWN]: Return (if any) next user input command in command box
> Note that [DOWN] is only allowed after at least an [UP] is being entered


#### Week Selection
[LEFT]: Display previous week’s daily task list
[RIGHT]: Display next week’s daily task list

## Command Summary

Command | Format
Expand All @@ -272,8 +283,28 @@ Command | Format
[Help](#viewing-help--help) | `help`
[Modify](#modifies-a-task--modify) | `modify INDEX [t/TASK_NAME] [s/START_DATE] [e/END_DATE] [l/LOCATION] [p/PRIORITY_LEVEL] [r/RECURRING_TYPE] [n/NUMBER_OF_RECURRENCE] [c/CATEGORY] [d/DESCRIPTION]`<br>Example: `modify 2 t/Wednesday Weekly Milestone s/wed d/Project Meeting and Finalization`
[Mark](#mark-a-task-as-done--mark) | `mark INDEX [MORE_INDEX]`<br>Example: `mark 1 2 3`
[Storage](#change-storage-location--storage) | `storage PATH`<br>Example: `storage data/savvytasker.xml`
[Storage](#change-storage-location--storage) | `storage NEW_FILEPATH`<br>Example: `storage data/savvytasker.xml`
[Unmark](#unmark-a-task-as-done--unmark) | `unmark INDEX [MORE_INDEX]`<br>Example: `unmark 1 2 3`
[Undo](#undo-the-most-recent-operation--undo) | `undo`
[Redo](#redo-the-most-recent-undo-operation--redo) | `redo`
[Unalias](#unalias-a-keyword--unalias) | `unalias s/SHORT_KEYWORD`<br>Example: `unalias s/mss`

## Keyboard Shortcuts

Key Codes | Function | Command Box Input
-------- | :--------
[ESC] | Toggle to show/hide a list of keyboard shortcuts | -
[Ctrl-D](#clearing-all-entries--clear) | Clear all entries | `clear`
[Ctrl-Q](#exiting-the-program--exit) | Exit | `exit`
[Ctrl-L](#listing-all-tasks-list) | List all unmarked task by date, earliest task first | `list`
[Ctrl-A](#listing-all-tasks-list) | List archived tasks | `list archived`
[Ctrl-P](#listing-all-tasks-list) | List all unmarked task by priority level, high priority first | `list priorityLevel`
[Ctrl-I](#listing-all-tasks-list) | List all alias keys | `list alias`
[Ctrl-H](#viewing-help--help) | `help`
[Ctrl-S](#change-storage-location--storage) | popup a directory chooser dialog box to choose new filepath |`storage NEW_FILEPATH`
[Ctrl-Z](#undo-the-most-recent-operation--undo) | `undo`
[Ctrl-Y](#redo-the-most-recent-undo-operation--redo) | `redo`
[UP](#command-stack-history) | Return last user input command in command box | -
[DOWN](#command-stack-history) | Return (if any) next user input command in command box | -
[LEFT](#week-selection) | Display previous week’s daily task list | -
[RIGHT](#week-selection) | Display next week’s daily task list | -
Binary file modified docs/images/UiClassDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//@@author A0138431L

package seedu.savvytasker.commons.events.ui;

import seedu.savvytasker.commons.events.BaseEvent;

/** Indicates cheatsheet display has been toggled */
public class ShowCheatsheetEvent extends BaseEvent {
@Override
public String toString() {
return "Cheatsheet display has been toggled";
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//@@author A0138431L

package seedu.savvytasker.commons.events.ui;

import seedu.savvytasker.commons.events.BaseEvent;

/** Indicates the SavvyTasker in the model has changed*/

public class WeekSelectionChangedEvent extends BaseEvent {

@Override
public String toString() {
return "Selected week has been changed";
}

}
3 changes: 0 additions & 3 deletions src/main/java/seedu/savvytasker/logic/Logic.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ public interface Logic {
/** */
boolean canParseHeader(String keyword);

/** Returns the list of tasks that are overdue */
ObservableList<ReadOnlyTask> getFilteredOverdueTasks();

/** Returns the list of floating tasks */
ObservableList<ReadOnlyTask> getFilteredFloatingTasks();

Expand Down
4 changes: 0 additions & 4 deletions src/main/java/seedu/savvytasker/logic/LogicManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,6 @@ public ObservableList<AliasSymbol> getAliasSymbolList() {
//@@author

//@@author A0138431L
@Override
public ObservableList<ReadOnlyTask> getFilteredOverdueTasks() {
return model.getFilteredOverdueTasks();
}

@Override
public ObservableList<ReadOnlyTask> getFilteredFloatingTasks() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import seedu.savvytasker.model.Model;
import seedu.savvytasker.storage.Storage;

//@@author A0139915W
//@@author A0138431L
/**
* Represents a command which requires the Storage class as a dependency.
* Commands should inherit this class if they only require dependency for
Expand Down
7 changes: 1 addition & 6 deletions src/main/java/seedu/savvytasker/model/Model.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ public interface Model {
int getAliasSymbolCount();

//@@author A0138431L
/** Returns the filtered task list of overdue task as an {@code UnmodifiableObservableList<ReadOnlyTask>}
* as of current date */
UnmodifiableObservableList<ReadOnlyTask> getFilteredOverdueTasks();

/** Returns the filtered task list of floating task as an {@code UnmodifiableObservableList<ReadOnlyTask>} */
UnmodifiableObservableList<ReadOnlyTask> getFilteredFloatingTasks();
Expand All @@ -97,9 +94,6 @@ public interface Model {
/** Returns the filtered task list of upcoming task as an {@code UnmodifiableObservableList<ReadOnlyTask>}
* as of expected date */
UnmodifiableObservableList<ReadOnlyTask> getFilteredUpcomingTasks(Date date);

/** Updates the filter of the filtered task list to show all overdue tasks */
void updateFilteredListToShowOverdue();

/** Updates the filter of the filtered task list to show all floating tasks */
void updateFilteredListToShowFloating();
Expand All @@ -109,5 +103,6 @@ public interface Model {

/** Updates the filter of the filtered task list to show all upcoming tasks after the selected week*/
void updateFilteredListToShowUpcoming();

//@@author
}
27 changes: 0 additions & 27 deletions src/main/java/seedu/savvytasker/model/ModelManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ public class ModelManager extends ComponentManager implements Model {
private final SortedList<Task> sortedAndFilteredTasks;
private final FilteredList<Task> filteredFloatingTasks;
private final SortedList<Task> sortedAndFilteredFloatingTasks;
private final FilteredList<Task> filteredOverdueTasks;
private final SortedList<Task> sortedAndFilteredOverdueTasks;
private final FilteredList<Task> filteredDay1Tasks;
private final SortedList<Task> sortedAndFilteredDay1Tasks;
private final FilteredList<Task> filteredDay2Tasks;
Expand Down Expand Up @@ -82,9 +80,6 @@ public ModelManager(SavvyTasker src) {
filteredFloatingTasks = new FilteredList<>(savvyTasker.getTasks());
sortedAndFilteredFloatingTasks = new SortedList<>(filteredFloatingTasks, new TaskSortedByDefault());

filteredOverdueTasks = new FilteredList<>(savvyTasker.getTasks());
sortedAndFilteredOverdueTasks = new SortedList<>(filteredOverdueTasks, new TaskSortedByDefault());

filteredDay1Tasks = new FilteredList<>(savvyTasker.getTasks());
sortedAndFilteredDay1Tasks = new SortedList<>(filteredDay1Tasks, new TaskSortedByDefault());
filteredDay2Tasks = new FilteredList<>(savvyTasker.getTasks());
Expand Down Expand Up @@ -118,9 +113,6 @@ public ModelManager(ReadOnlySavvyTasker initialData) {
filteredFloatingTasks = new FilteredList<>(savvyTasker.getTasks());
sortedAndFilteredFloatingTasks = new SortedList<>(filteredFloatingTasks, new TaskSortedByDefault());

filteredOverdueTasks = new FilteredList<>(savvyTasker.getTasks());
sortedAndFilteredOverdueTasks = new SortedList<>(filteredOverdueTasks, new TaskSortedByDefault());

filteredDay1Tasks = new FilteredList<>(savvyTasker.getTasks());
sortedAndFilteredDay1Tasks = new SortedList<>(filteredDay1Tasks, new TaskSortedByDefault());
filteredDay2Tasks = new FilteredList<>(savvyTasker.getTasks());
Expand Down Expand Up @@ -293,11 +285,6 @@ private void updateFilteredTaskList(Expression expression, Comparator<Task> comp

//@author A0138431L
//Get filtered task list according to date category
@Override
public UnmodifiableObservableList<ReadOnlyTask> getFilteredOverdueTasks() {
updateFilteredListToShowOverdue();
return new UnmodifiableObservableList<ReadOnlyTask>(filteredOverdueTasks);
}

@Override
public UnmodifiableObservableList<ReadOnlyTask> getFilteredFloatingTasks() {
Expand Down Expand Up @@ -336,20 +323,6 @@ public UnmodifiableObservableList<ReadOnlyTask> getFilteredUpcomingTasks(Date da
return new UnmodifiableObservableList<ReadOnlyTask>(filteredUpcomingTasks);
}

//Binding isOverdue quantifier predicate to filtered list
@Override
public void updateFilteredListToShowOverdue() {
updateFilteredOverdueTaskList(new PredicateExpression(new TaskIsOverdueQualifier()));
}

private void updateFilteredOverdueTaskList(Expression expression) {
updateFilteredOverdueTaskList(expression, new TaskSortedByDefault());
}

private void updateFilteredOverdueTaskList(Expression expression, Comparator<Task> comparator) {
filteredOverdueTasks.setPredicate(expression::satisfies);
sortedAndFilteredOverdueTasks.setComparator(comparator);
}

//Binding isFloating quantifier predicate to filtered list
@Override
Expand Down
Loading