-
Notifications
You must be signed in to change notification settings - Fork 4
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
Update UG and DG #156
Update UG and DG #156
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, UML diagrams will be reviewed in minutes
docs/DeveloperGuide.md
Outdated
|
||
#### Path Execution of Delete Command | ||
|
||
The workflow of an `Delete` Command when it is executed by a user is shown in the activity diagram below: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor typo, should be "workflow of a" instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can consider removing "it is" too
@@ -14,7 +14,7 @@ $spacing-unit: 30px !default; | |||
$table-text-align: left !default; | |||
|
|||
// Width of the content area | |||
$content-width: 800px !default; | |||
$content-width: 1000px !default; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this do? Expand the width of md?
@@ -83,6 +83,21 @@ public Product getProductByName(Name targetName) throws ProductNotFoundException | |||
return matchedProduct; | |||
} | |||
|
|||
/** | |||
* Remove a product sold by the Warehouse. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be removes
@@ -78,6 +78,21 @@ public Product getProductByName(Name targetName) throws ProductNotFoundException | |||
return matchedProduct; | |||
} | |||
|
|||
/** | |||
* Remove a product sold by the Supplier. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be removes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some minor issues/suggestions you may want to consider! :)
docs/DeveloperGuide.md
Outdated
|
||
#### Path Execution of Delete Command | ||
|
||
The workflow of an `Delete` Command when it is executed by a user is shown in the activity diagram below: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be a Delete
command
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is already fixed, thank!
1. The target to delete is a `supplier`/`warehouse` <br> | ||
CLI-nic finds the target `supplier`/`warehouse` at the specified `INDEX` of the displayed list, and remove it completely. | ||
|
||
1. The `INDEX` specified is invalid (e.g. exceeds the length of the list) <br> | ||
A **`CommandException`** error message wil be thrown. | ||
|
||
1. The target to delete is a `product` in a particular 'supplier' <br> | ||
CLI-nic finds the target `supplier` at the specified `INDEX` of the displayed supplier list, and retrieve its product list.<br> | ||
It finds the `product` with specified `PRODUCT_NAME` and remove it from the product list. | ||
|
||
1. No `product` has the `PRODUCT_NAME` in the target warehouse/supplier <br> | ||
A **`CommandException`** error message wil be thrown. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the numbering be changed to "1. 2. 3. 4." ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, this is the markdown standard actually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh okay, I didn't know that, sorry about that!:)
docs/DeveloperGuide.md
Outdated
<center><i>Figure n. Delete Command Class Diagram</i></center> | ||
<br> | ||
|
||
Note that some commonly applied methods (like getter/setter methods for each attribute) are not included to reduce verbosity. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe "such as" instead of like would be better in this sentence :)
docs/DeveloperGuide.md
Outdated
CLI-nic's `ClinicParser` will parse the user input and if the `delete` command word is present, the parser will try to parse the | ||
input into a valid `DeleteCommand` via `DeleteCommandParser`. <br> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would "parse the input to generate a valid DeleteCommand
" be better rather than "parse the input into a valid DeleteCommand
"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's right! Thanks for the suggestion!
docs/DeveloperGuide.md
Outdated
|
||
If multiple entries of `ct/TYPE` or `i/INDEX` are found, the last entry will be used as the argument. <br> | ||
|
||
Afterwards, all the valid arguments (`INDEX` and `TYPE`) will form a `DeleteCommand`, which will be executed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"form a DeleteCommand
" sounds a bit weird, maybe "will create a new DeleteCommand
" is better.
docs/DeveloperGuide.md
Outdated
|
||
It then locates the warehouse/supplier entry that user wants to delete via the `INDEX` passed in. | ||
|
||
Afterwards, `model#deleteWarehouse`/`model#deleteSupplier` will remove the target entry from the list in the `model`, and the `model` will then update the displayed list. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think splitting this long sentence up to shorter sentences would be clearer :) Maybe something along like:
Afterwards, model#deleteWarehouse
/model#deleteSupplier
will remove the target entry from the list in the model
. The model
will then update the displayed list.
docs/DeveloperGuide.md
Outdated
|
||
The parsing workflow is the same except that now an additional field `pd/PRODUCT_NAME` will be checked (with both prefix and argument) and parsed. <br> | ||
|
||
Afterwards, all the valid arguments (`INDEX`, `TYPE` and `PRODUCT_NAME`) will form a `DeleteCommand`, which will be executed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same issue as above, I think maybe using create would be more appropriate
docs/DeveloperGuide.md
Outdated
|
||
Base on the classification, the model will again retrieve the relevant displayed list of warehouse/supplier via `model#getFilteredWarehouseList()`/`model#getFilteredSupplierList()`. <br> | ||
|
||
It then locates the warehouse/supplier entry from whom the product to delete via the `INDEX` passed in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is a bit unclear to me, maybe "It then locates the respective warehouse/supplier entry at the INDEX
passed in for deletion".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion! I guess my original intention is to establish the link between warehouse/supplier and the product to delete
docs/DeveloperGuide.md
Outdated
|
||
Next, the product matching the required `PRODUCT_NAME` will be retrieved via `getProductByName`, and an updated target entry with this product removed will be returned through `removeProduct` call. | ||
|
||
Afterwards, `model#setWarehouse`/`model#setSupplier` will replace the old entry with the updated target entry from the list in the `model`, and the `model` will then update the displayed list. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps breaking this long sentence up would be clearer as well! "replace the old entry with the updated target entry from the list in model
. The model
will then update the displayed list." would be better :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
docs/UserGuide.md
Outdated
@@ -75,6 +75,9 @@ and efficient Graphical User Interface interaction. | |||
|
|||
* Parameters can be in any order.<br> | |||
e.g. if the command specifies `n/NAME p/PHONE`, `p/PHONE n/NAME` is also acceptable. | |||
|
|||
* If multiple arguments with same prefixes are in the input and all the values are valid, the last value is chosen. <br> | |||
e.g. if the command specifies `ct/w ct/s`, because both `w` and `s` are valid, there is no error, and the type __s - supplier__ is chosen. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we can consider to split up this long sentence as well. Maybe something like:
"if a user's input specifies ct/w ct/s
where both w
and s
are valid, there will be no error thrown. However, the type s - supplier will be chosen instead.
* `delete ct/w i/1` Removes the warehouse at index 1. | ||
* `delete ct/s i/12` Removes supplier at index 12 from the list of suppliers. | ||
* `delete ct/w i/1` Removes the warehouse at index 1 of the list of warehouses. | ||
* `delete ct/s i/12` Removes supplier at index 12 of the list of suppliers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps can add "the" like you did in warehouse
* The PRODUCT_NAME must be identifiable and starts with alphanumeric character. | ||
* The TYPE specified should be one of these values: `pw` / `ps`. | ||
* The INDEX must be a positive integer, not exceeding the total length of the displayed list. | ||
* The PRODUCT_NAME must be an identifiable full name of the product chosen, and must starts with an alphanumeric character. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"start".
Also "an identifiable full name of the product" sounds a bit off, perhaps can change to "the"
* `delete supplier 12 pd/Aspirin` Removes product with the name _Aspirin_ | ||
from the supplier at index 12 of the list of suppliers. | ||
<div markdown="span" class="alert alert-info">:information_source: | ||
**Note:** If additional PRODUCT_NAME behind prefix `pd/` is added when the TYPE `ct/` given is "w" or "s", the PRODUCT_NAME will be ignored |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps can put "an".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually I think the word "additional" is unecessary here also
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, will be reading through UG/DG after merging everyone's requests to fix any phrasing/grammatical errors for UG/DG
Update UG and DG
Update UG and DG
Update UG and DG
No description provided.