Skip to content

[CS2113T-T12-3] Zer0Note#31

Open
NeilBaner wants to merge 1007 commits into
nus-cs2113-AY2021S1:masterfrom
AY2021S1-CS2113T-T12-3:master
Open

[CS2113T-T12-3] Zer0Note#31
NeilBaner wants to merge 1007 commits into
nus-cs2113-AY2021S1:masterfrom
AY2021S1-CS2113T-T12-3:master

Conversation

@NeilBaner

Copy link
Copy Markdown

OneNote meets vim. Zer0Note is a command-line note-taking and organisation application, that combines the easy-to-use hierarchical structure of popular GUI based applications like OneNote, Evernote, Notion etc. with the speed of the command line.

@alstontham alstontham left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, a well explained DG! The information was well spaced out and sorted into categories clearly. I left some comments for possible improvements/clarifications, such as standardization of sequence diagrams as each style seems to have its own quirks/features that could be confusing for the reader.

Comment thread docs/DeveloperGuide.md Outdated
&nbsp;&nbsp;[4.3. Notebook Mode](#43-notebook-mode) <br>
&nbsp;&nbsp;&nbsp;&nbsp;[4.3.1. Notebook Management Feature](#431-notebook-management-feature) <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[4.3.1.1. Implementation](#4311-implementation)
&nbsp;&nbsp;&nbsp;&nbsp;[4.3.2. Tag Feature](#432-tag-feature) <br>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this line displayed the way you want it to be? Not sure if its unintentional but maybe it would look better on a line of its own?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we forgot a <br> tag. Thanks for pointing this out.

Comment thread docs/DeveloperGuide.md
contributing code to the project.

{Describe the target user profile}
### 1.2. How to use this document

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was a bit confused when reading this section. It kind of looks like one giant section and I had some trouble distinguishing one example from the next. Perhaps there could be a better way to separate/space out the examples to make it clearer?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the tip. I wrote this section, and looking at it I definitely see what you mean. We'll experiment with subheadings and <hr>s to try and make it more readable.

@Ang-Cheng-Jun Ang-Cheng-Jun Oct 29, 2020

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is some design or alignment issues on the ListCommand sequence diagram. Maybe you want to look into it.
image

@Ang-Cheng-Jun Ang-Cheng-Jun Oct 29, 2020

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is error in the Storage UML Diagram, I cant view it from my end. Maybe you want to look into it
image

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, thank you! We will fix it.

Comment thread docs/DeveloperGuide.md Outdated
The `UserInterface` component,

* Executes user commands using the `Commands` component.
* // how it interacts with the other components

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the double slashes on this line intentional?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we are not done with this section so the "double slash" is an homage to the Java/C comment style, indicating that this isn't the actual guide, but rather a description of what should go here :)

Comment thread docs/DeveloperGuide.md Outdated
* Executes user commands using the `Commands` component.
* // how it interacts with the other components

/* TODO explain the various variables and methods */

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this section be explaining the UML diagram in section 3.3? If not then I think it would be beneficial to have a brief description of how the different components of Command (and other like Tasks, Notebooks, etc) work together.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3.3 will indeed explain the UML diagrams in that section, yes. We didn't realise it needed to be done for today so bits of it like this one are incomplete. Sorry about that.

Comment thread docs/DeveloperGuide.md Outdated

#### 4.2.1. TaskList Management Feature

##### 4.2.1.1. Implementation

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps you could make this heading a bit larger? I find it a bit strange if the size of the heading text is smaller than the body text below it.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've been having some issues with headings; we're still experimenting with different heading levels to make it the most readable. Thanks for the feedback, we'll try to fix this as best as possible.

Comment thread docs/DeveloperGuide.md Outdated
Step 6. To signal that the user has successfully added a task, a message is printed with `CliMessages#printAddedTaskMessage`.

The UML sequence diagram below shows how the add task command works.
![Sequence Diagram for Add Task Command](/diagrams/class/jpeg/add_task.jpg)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to standardize the UML diagrams? For example in this diagram in the top right corner there is a box showing me what the user input is, but for the next two diagrams its shown on the left most arrow.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another point is to ensure that the return value for each method is shown in the arrow pointing back and to make sure it is standardized across the diagrams.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted. Thank you.

Comment thread docs/DeveloperGuide.md Outdated
<hr>

The figure below shows how the delete task command works:
<img src= "https://user-images.githubusercontent.com/60319628/96657942-02dc6900-1376-11eb-9284-38322e1a2b09.png">

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this UML diagram, for the methods that execute within a class like "executeCommand(userInput)", isn't there supposed to be another box overlaid on top of the existing box? Like how it's shown for the executeCommand in the tag operation sequence diagram?

Comment thread docs/DeveloperGuide.md Outdated
1. The `CliUserInterface` receives the "delete 1" input by the user and passes it to the `InputParser` class.
2. `InputParser` parses the input to determine the type of command and the index of the task that is required to delete.
The Parser then constructs a `RemoveCommandTimetableMode` with constructor as shown below.
```java

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not too sure if this is necessary? It's nice to include but there isn't a description that expands on it, and if this part of the code was changed, then this code snippet would need to change as well.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point about having to change it if we change the code. We'll reconsider this section.

Comment thread docs/DeveloperGuide.md Outdated

The following sequence diagram shows how the list operation works:

![Sequence Diagram for List command](/diagrams/class/jpeg/SequenceDiagram_List.jpg)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if it's a hard rule, but I think the labels for the method calls should be above the lines pointing to the right, not in the middle of the line? e.g. InputParser()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2020-10-28 at 12 42 26 PM

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, another suggestion: perhaps space out the alt block? All the content within looks very crammed together and hard to read.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2020-10-28 at 12 45 14 PM

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted, thank you.

Comment thread docs/DeveloperGuide.md Outdated
Some of these members may be empty.
2. `InputParser` constructs and returns the `RemoveCommandNotebookMode` class with constructor as shown below:
```java
public RemoveCommandNotebookMode(String notebookTitle, String sectionTitle,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code snippet is nice to have, but I don't feel like it adds that much to the description, and if the code changes then this needs to be changed too.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, thanks.

Comment thread docs/DeveloperGuide.md Outdated
### 1.2. How to use this document

### Value proposition
Text that looks like this is normal text. It should be read as-is; it has no special meaning beyond what it says.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this statement is redundant.You do clearly show the other types of syntax available in this document in the subsequent lines. Hence, it is not necessary to point out how a normal text should be read.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. We'll reconsider this section then. I wrote this section and wanted it to be as unambiguous as possible. However I agree that it does seem extremely redundant.

Comment thread docs/DeveloperGuide.md
##### 4.3.2.1. Implementation
The `Notebook`, `Section` and `Page` classes each contain a member `tag` of type String.

The figure below shows how the tag operation works:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The image inserted here is too pixelized. It is not clear.
image

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oof yeah, we'll rework this one. Thanks for pointing it out.

Comment thread docs/DeveloperGuide.md Outdated

<hr>

The figure below shows how the "remove task" command works:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I think that this is the best UML diagram in the DG. It is clear and is formal.
Nonetheless, I think that the line used for the command getAppMode() should not be dotted.
image

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe credit goes to @Lusi711 for this one.

Comment thread docs/DeveloperGuide.md

The following sequence diagram describes the operation of the `saveToFile()` operation

![Sequence Diagram for saveToFile command](diagrams/class/jpeg/storage_neil.jpg)

@syncode98 syncode98 Oct 28, 2020

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This diagram seems too colorful. You could try out another color instead of pink. Furthermore, the methods should be labeled on top of the arrows. Right now, some of the methods completely cover the arrows.
image

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think I should leave it to be the same blue as the rest of the blocks?

Noted on the labels, that was what Visio did by default and I didn't think to change it.

Comment thread docs/DeveloperGuide.md Outdated
<hr>

The figure below shows how the delete task command works:
<img src= "https://user-images.githubusercontent.com/60319628/96657942-02dc6900-1376-11eb-9284-38322e1a2b09.png">

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the lines be a solid line instead?
dg1

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe you're right, we'll change that.

Comment thread docs/DeveloperGuide.md Outdated

The figure below shows how the tag operation works:

![Sequence Diagram for Tag Timetable command](/diagrams/class/jpeg/SequenceDiagram_TagTimetable.jpg)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as the previous diagram, should the lines be a solid line instead?
2020-10-28-131555

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.

Comment thread docs/DeveloperGuide.md Outdated
Comment on lines +427 to +429
![Sequence Diagram for Tag Notebook command](/diagrams/class/jpeg/SequenceDiagram_TagNotebook.jpg)

There are 3 crucial processes during the tag operation. When the user enters `tag /tCS2113T` into the command window while using the application:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to separate the sequence diagrams into the 3 processes mentioned here? Right now it's quite hard to understand the diagram because the text in the diagram is quite small (opening it as a new image doesn't help). You could also consider breaking it into ref frames too.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, it does look quite pixelated and hard to read. We'll try to break it up into smaller parts.

Comment thread docs/DeveloperGuide.md Outdated

### 3.3. Commands Component (Neil)

![UML diagram for Timetable Commands](/diagrams/class/jpeg/timetable_commands.jpg)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you can consider omitting some less important details from the class diagram, such as private members?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted. Thank you.

@NeilBaner

Copy link
Copy Markdown
Author

@alstontham @jerichochua @syncode98 Thank you for your reviews and feedback. We'll be sure to improve the DG based on your comments! 😄

@gohsonghan98 gohsonghan98 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, the Developer Guide is developing well, but do be careful of the accuracy of the sequence diagram. To further improve, you may also consider using labels for your diagrams and make more references to those diagrams. Good luck!

Comment thread docs/DeveloperGuide.md

### 3.1 Architecture (Neil)

**How the architecture components interact with each other**

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a subheading. You may want to consider using a new line after this to differentiate between a subheading and your contents.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. I've changed this and submitted a PR.

Comment thread docs/DeveloperGuide.md Outdated
<hr>

The figure below shows how the delete task command works:
<img src= "https://user-images.githubusercontent.com/60319628/96657942-02dc6900-1376-11eb-9284-38322e1a2b09.png">

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
I think there are some inaccuracies in the method call and return arrow in the class diagram. For example the getCommandFromInput(userInput,uiMode) method call should have its solid arrow pointed to the top edge of the activation bar in the parser object. Whereas for the parser constructor, the return arrow should begin from the bottom edge of the activation bar.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well spotted, thanks.

Comment thread docs/DeveloperGuide.md Outdated

The figure below shows how the tag operation works:

![Sequence Diagram for Tag Notebook command](/diagrams/class/jpeg/SequenceDiagram_TagNotebook.jpg)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
The labels in this sequence diagram is too small and blurry, perhaps due to the compression of the image size. If your sequence diagram is too large, I think it would be better if you could split it up into multiple parts where possible.

Comment thread docs/DeveloperGuide.md Outdated

![UML diagrams for Notebook Commands](/diagrams/class/jpeg/notebook_commands.jpg)

/* to insert UML diagram */

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it will be good if you could give a brief description of the diagram. You may also consider labelling your diagrams.

Comment thread docs/DeveloperGuide.md Outdated

### 3.4. Tasks Component

/* to insert UML diagram */

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned above, you may consider having a brief description of the diagrams to be presented.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. The document is still a WIP as you can tell, so we'll have to add those once we have the UML diagrams.

@NeilBaner

Copy link
Copy Markdown
Author

@gohsonghan98 Thanks for your review and feedback 😄

Comment thread docs/DeveloperGuide.md Outdated

### 3.5. Notebooks Component

![UML diagram for Notebooks Component](diagrams/class/jpeg/notebooks_simplified.jpg)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
The methods are being covered by the arrow. Please look into it. Thanks

Comment thread docs/DeveloperGuide.md Outdated

The `NotebookShelf` class,

- has methods to add new `Notebook` object and remove existing one.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One suggestion might be to refer to the method names so that it is easier for the developer. It is hard to see from the diagram.

Comment thread docs/DeveloperGuide.md Outdated

### 3.6. Storage Component

![UML diagram for Storage](diagrams/class/jpeg/Storage_UML_class.jpg)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
I believe you are missing the diagram?

Comment thread docs/DeveloperGuide.md Outdated

The `Storage` component,

* Contains the method `saveToFile` to save the current AppState of the application in the `notebooks.txt` and `tasks.txt` files.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the txt file stored in the same directory or is it stored in another directory?

Comment thread docs/DeveloperGuide.md

#### 4.1.1. Implementation

The mode switch mechanism is facilitated by `AppState`. It contains an `AppMode` object and can be accessed from

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it might be better if you had talked about the different modes before this feature as it is a bit difficult to keep track of the different modes that are present in the app?

Comment thread docs/DeveloperGuide.md Outdated

Step 2. `execute()` is called, which then initialises a variable `taskList` of type TaskList. The method then calls `AppState#getTaskList`, which returns all exisiting tasks in the current tasklist.

Step 3. The `execute()` method proceeds to parse the user's intended task index to be marked as done through `Integer.parseInt()`. Using this index, it initialises a varible `taskDone` of type task and calls `AppState#markAsDone(index)`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spelling mistake with 'variable'. Isnt the variable already initialized to False and this method changes it to True?

Comment thread docs/DeveloperGuide.md Outdated
- **Alternative 2:** Store as a Hash Table with the key as the tag and value as `Task`
- Pros: It has a better time complexity for search operations since this data structure is more optimized (O(1) can
be achieved).
- Cons: It is hard to retrieve the tag for a specific `Task` due to the structure of the key-value pair.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you use the approach from the first method, wouldnt this be fixed?

Comment thread docs/DeveloperGuide.md Outdated
This section describes some considerations involved when designing the find feature.

**Aspect: Distinction between finding by keyword and finding by tag**
- **Alternative 1 (current choice):** Handle as a if-else statement in a single class

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please try to elaborate on this?

Comment thread docs/DeveloperGuide.md
`TaskList`, `Task`,`NotebookShelf`, `Notebook`, `Section`, and `page` contain methods called `serialize()`.
These methods return`String` representations of themselves, as specified [here](#441-storage-format).

The `serialize()` method in `TaskList` calls the `serialize()` methods for every `Task` object within

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 suggestion - an example of how it serializes might be a bit more informative?

Comment thread docs/DeveloperGuide.md

1. The user launches the application for the first time. `CliUserInterface#executeCommand` is called when the user types in `hello`.

2. The `hello` command is passed through a switch-case block within `InputParser#getCommandFromInput`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A small snippet of the switch case might be better

Lusi711 and others added 30 commits November 9, 2020 20:57
Changed longngyugen to longngng
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.