Skip to content

Commit dbb4273

Browse files
authored
Merge pull request #94 from isaactodo/branch-autocomplete-docs
Update DG and UG to include autocomplete feature
2 parents c0d9c17 + 94a1433 commit dbb4273

6 files changed

+43
-20
lines changed

docs/DeveloperGuide.md

+22-20
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ The **API** of this component is specified in [`Ui.java`](https://github.com/se-
7272

7373
![Structure of the UI Component](images/UiClassDiagram.png)
7474

75-
The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`, `StatusBarFooter` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class which captures the commonalities between classes that represent parts of the visible GUI.
75+
The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`, `StatusBarFooter` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class which captures the commonalities between classes that represent parts of the visible GUI. However, `DialogBox` inherits from `HBox`.
7676

7777
The `UI` component uses the JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the [`MainWindow`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/ui/MainWindow.java) is specified in [`MainWindow.fxml`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/resources/view/MainWindow.fxml)
7878

@@ -83,6 +83,7 @@ The `UI` component,
8383
* keeps a reference to the `Logic` component, because the `UI` relies on the `Logic` to execute commands.
8484
* depends on some classes in the `Model` component, as it displays `Person` object residing in the `Model`.
8585

86+
`CommandBox` holds a reference towards `AutocompleteParser` which helps parses user input for a list of suggestions to show to the user.
8687
### Logic component
8788

8889
**API** : [`Logic.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/logic/Logic.java)
@@ -295,25 +296,26 @@ _{Explain here how the data archiving feature will be implemented}_
295296

296297
Priorities: High (must have) - `* * *`, Medium (Good to have) - `* *`, Low (nice to have) - `*`
297298

298-
| Priority | As a …​ | I want to …​ | So that I can…​ |
299-
|----------|----------|--------------------------------------------------|----------------------------------------------------------------|
300-
| `* * *` | educator | add students into the database | easily refer to their information when needed |
301-
| `* * *` | educator | list all students to view the number of students | collate that information |
302-
| `* * *` | educator | delete a student | remove entries that I no longer need |
303-
| `* * *` | educator | find a person by name | find the relevant person without scrolling through a long list |
304-
| `* *` | educator | clear all information | start anew for a new academic year |
305-
| `* *` | educator | update details easily when there are changes | have the most updated information |
306-
| `* *` | educator | categorize students into groups | |
307-
| `* *` | educator | record students grades for tests and assignments | |
308-
| `* *` | educator | view a summary of each student's grade | |
309-
| `* *` | educator | tag students with relevant labels | prioritize students based on their status |
310-
| `* *` | educator | record notes on student behaviour | easily track issues related to their behaviour |
311-
| `* *` | educator | archive old student data | keep my AB clean while being able to retrieve old information |
312-
| `*` | educator | set learning goals | track their progress towards these goals |
313-
| `*` | educator | undo/redo any changes | avoid re-entering the data during a mis-entry |
314-
| `*` | educator | export student data | share the information with others |
315-
| `*` | educator | keep track of meetings with students | keep track of my commitments |
316-
| `*` | educator | see sample data | try out the app's feature without adding my own student data |
299+
| Priority | As a …​ | I want to …​ | So that I can…​ |
300+
|----------|----------|-----------------------------------------------------------|----------------------------------------------------------------|
301+
| `* * *` | educator | add students into the database | easily refer to their information when needed |
302+
| `* * *` | educator | list all students to view the number of students | collate that information |
303+
| `* * *` | educator | delete a student | remove entries that I no longer need |
304+
| `* * *` | educator | find a person by name | find the relevant person without scrolling through a long list |
305+
| `* *` | educator | clear all information | start anew for a new academic year |
306+
| `* *` | educator | update details easily when there are changes | have the most updated information |
307+
| `* *` | educator | categorize students into groups | |
308+
| `* *` | educator | record students grades for tests and assignments | |
309+
| `* *` | educator | view a summary of each student's grade | |
310+
| `* *` | educator | tag students with relevant labels | prioritize students based on their status |
311+
| `* *` | educator | record notes on student behaviour | easily track issues related to their behaviour |
312+
| `* *` | educator | archive old student data | keep my AB clean while being able to retrieve old information |
313+
| `*` | educator | set learning goals | track their progress towards these goals |
314+
| `*` | educator | undo/redo any changes | avoid re-entering the data during a mis-entry |
315+
| `*` | educator | see a list of suggested commands when typing out commands | easily type in the commands that I want and reduce typos |
316+
| `*` | educator | export student data | share the information with others |
317+
| `*` | educator | keep track of meetings with students | keep track of my commitments |
318+
| `*` | educator | see sample data | try out the app's feature without adding my own student data |
317319

318320

319321

docs/UserGuide.md

+15
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,21 @@ Exits the program.
207207

208208
Format: `exit`
209209

210+
### Autocomplete
211+
212+
When using the program, you might have noticed that suggestions pop up when you are entering in commands. This is the autocomplete feature.
213+
214+
Autocomplete searches for keywords matching the word under the caret position. For example, when you type in `ad`, autocomplete will show a list of commands matching this initial string.
215+
216+
Autocomplete also supports autocompletion for fields. These include:
217+
* Modules `m/`
218+
* Tags `t/`
219+
* Gender `g/`
220+
221+
When these prefixes are detected, autocomplete automatically displays a list of suggestions related to these fields.
222+
223+
![Autocomplete example when keying in gender](images/AutocompleteExample.png)
224+
210225
### Saving the data
211226

212227
AddressBook data are saved in the hard disk automatically after any command that changes the data. There is no need to save manually.

docs/diagrams/UiClassDiagram.puml

+6
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ Class PersonListPanel
1515
Class PersonCard
1616
Class StatusBarFooter
1717
Class CommandBox
18+
Class DialogBox
19+
Class HBox
20+
Class AutocompleteParser
1821
}
1922

2023
package Model <<Rectangle>> {
@@ -31,6 +34,7 @@ HiddenOutside ..> Ui
3134
UiManager .left.|> Ui
3235
UiManager -down-> "1" MainWindow
3336
MainWindow *-down-> "1" CommandBox
37+
MainWindow *-down-> "1" DialogBox
3438
MainWindow *-down-> "1" ResultDisplay
3539
MainWindow *-down-> "1" PersonListPanel
3640
MainWindow *-down-> "1" StatusBarFooter
@@ -42,6 +46,8 @@ MainWindow -left-|> UiPart
4246

4347
ResultDisplay --|> UiPart
4448
CommandBox --|> UiPart
49+
CommandBox --down-> "1" AutocompleteParser
50+
DialogBox --|> HBox
4551
PersonListPanel --|> UiPart
4652
PersonCard --|> UiPart
4753
StatusBarFooter --|> UiPart

docs/images/AutocompleteExample.png

90.1 KB
Loading

docs/images/Ui.png

31.1 KB
Loading

docs/images/UiClassDiagram.png

13.2 KB
Loading

0 commit comments

Comments
 (0)