Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
tsulim committed Apr 12, 2024
2 parents 2676eb2 + 083181e commit 2c1ae30
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 60 deletions.
98 changes: 72 additions & 26 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,41 @@ StaffConnect (SC) is a **desktop app for managing contacts of Professors and Tut

## Navigability

### Overall UI layout
<br>![Overall Layout](images/OverallLayout.png)


### Mouse and Keyboard controls

Before we get started StaffConnect offers a unique suite of UI controls for users to customise their own unique experience!

1. Clicking any items on the left panel will allow you to select the person contact to display.
<br>Alternatively, clicking anywhere in the list panel then using your arrow keys to navigate and hitting enter to select would give the same result.
1. Clicking any items on the left contacts panel will allow you to select the person contact to display.
<br>Alternatively, clicking anywhere in the contacts panel then using your arrow keys to navigate and hitting enter to select would give the same result.
<br>**Intended Behaviour:**
<br> Hovering the selection with mouse or arrow keys would not cause the details panel to switch to the selected person. This is to allow users to browse the contacts panel without switching.
<br>![Region to select the person](images/personPanelRegion.png)


2. There is a divider that is draggable up and down to hide and show details on the right side and to customise the look of your application.
<br>![Region to select the divider](images/detailsDividerRegion.png)

3. Each of the 3 display panes of information they are able to pan in all four directions to view the content:
3. Each of the 2 detail panels on the right are able to pan in all four directions to view the content:
- For mouse pad users, dragging around with two fingers the around would pan around the pane.
- For mouse users, __[mouse wheel]__ will scroll up and down while __[shift + mouse wheel]__ will scroll left and right.
- __[Left click + drag]__ would pan around in the details pane as well.
- For mouse users, __[Mouse Wheel]__ will scroll up and down while __[Shift + Mouse wheel]__ will scroll left and right.
- __[Left click + Drag Mouse]__ would pan around in the details pane as well.
- Keyboard arrow keys are able to pan around as well, but the scroll speed may differ on different systems.
- There are scroll bars at the vertical and horizontal dividers of the window pane, dragging them in the respective direction will pan around as well.


4. The Result display:<br>
The scroll bars can only be scrolled by two ways:
1. For mouse pad users, dragging around with two fingers the around would pan around the pane.
2. For mouse users, __[Mouse Wheel]__ will scroll up and down while __[Shift + Mouse Wheel]__ will scroll left and right.
3. Simply dragging the scroll bar with a left mouse click.
<br>**Scrolling by arrow keys is not fully supported in the result display**

5. The Command box:<br>
The input can only be scrolled by __[Holding Left Click + Drag Mouse]__ to the edge in the direction to scroll. This is to allow making adjustments on very long commands.


<Br><Br>
### Alternative UI arrangements
Expand All @@ -69,7 +86,7 @@ Before we get started StaffConnect offers a unique suite of UI controls for user

**Intended Limitations**
1. The divider position is not controllable by keyboard input, hence the only way to customise the look is mostly by mouse input.
2. Pane switching by keyboard input, like a terminal is not supported.
2. Panel switching by keyboard input, like a terminal is not supported.
3. Font sizes does not automatically resize in this application, scroll bars will appear in smaller window variants of this application to help with the viewing of details.
4. The UI will do a soft reset on its divider position every time the application is relaunched, as this is to allow users who wish to fall back to the default layout settings.

Expand Down Expand Up @@ -137,6 +154,15 @@ Format: `list`

Edits an existing person in the contacts.

<div markdown="block" class="alert alert-info">

**:information_source: Notes:**<br>

* The displayed view in StaffConnect will reset to the default view after the `edit` command is called.

* The changes made are displayed in the result display above the command box.
</div>

Format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [m/MODULE] [f/FACULTY] [v/VENUE] [t/TAG]…​ [a/AVAILABILITY]…​`

* Edits the person at the specified `INDEX`. The index refers to the index number shown in the displayed person list. The index **must be a positive integer** 1, 2, 3, …​
Expand All @@ -159,7 +185,7 @@ Examples:
<br>**After editing the second person:** <br>
![After editing the second person](images/AfterEditCommand.png)

### Filtering persons by attribute: `filter`
### Filtering persons: `filter`

Filters persons whose module, faculty, tags or availabilities match the given filtering criteria.

Expand Down Expand Up @@ -449,25 +475,45 @@ Furthermore, certain edits can cause the StaffConnect to behave in unexpected wa
## Known issues

1. **When using multiple screens**, if you move the application to a secondary screen, and later switch to using only the primary screen, the GUI will open off-screen. The remedy is to delete the `preferences.json` file created by the application before running the application again.
2. **Restrictions on the valid user input of `Faculty` values**: For the current version, a valid user input for `Faculty` with prefix `f/` can only match exactly the same string as suggested below. Cases can be ignored though.
- Faculty of Arts of Social Sciences; Arts and Social Sciences; FASS
- Business School; Business; Biz School; Biz
- School of Computing; Computing; SoC
- School of Continuing and Lifelong Education; Continuing and Lifelong Education; SCALE
- Faculty of Dentistry; Dentistry
- School of Design and Environment; Design and Environment; SDE
- Duke-NUS Medical School; Duke-NUS
- Faculty of Engineering; Engineering; FoE
- Integrative Sciences and Engineering; ISEP
- Faculty of Law; Law
- Yong Loo Lin School of Medicine; Medicine
- Yong Siew Toh Conservatory of Music; Music; TST Conservatory of Music
- Saw Swee Hock School of Public Health; Public Health
- Lee Kuan Yew School of Public Policy; Public Policy; LKY School of Public Policy
- Faculty of Science; Science; FoS
- University Scholars Programme; USP
- Yale-NUS College; Yale-NUS

--------------------------------------------------------------------------------------------------------------------

## Attribute summary

Attribute | Prefix | Restrictions | Examples
----------|--------|--------------|---------------------
Name | n/ | Case-sensitive.<br>Only alphanumeric characters allowed. Spaces are only allowed between alphanumeric characters. | `alex yeoh`, `Bernice Yu`, `test1`
Phone Number | p/ | Numeric digits only, no special characters, at least 3 digits long. | `123`, `88888888, 12345678`
Email | e/ | Valid email of the format `local-part@domain`.<br>1. `local-part` should only contain alphanumeric characters and the special characters `+_.-`<br>2. `local-part` may not start or end with any special characters.<br>3. `local-part` must be followed by exactly one `@` and then a `domain` name.<br>4. `domain` must be made up of at least 2 `domain` labels separated by periods.<br>5. Each `domain` name must be at least 2 alphanumeric characters long.<br>6. Each `domain` name must start and end with alphanumeric characters.<br>7. Each `domain` name can only consist of alphanumeric characters, separated by hyphens, if any. | `[email protected]`, `[email protected]`, `[email protected]`, `[email protected]`
Module | m/ | Case-insensitive.<br>Valid module consisting of 2-4 letters, followed by exactly 4 numeric digits, with a suffix that is at most 1 character long. | `gess1025`, `hsi1000`, `cs2103t`
Faculty | f/ | Case-insensitive.<br>Restricted set of values (refer to [valid faculty values](#valid-faculty-values) below). | `soc`, `biz`, `School of Business`
Venue | v/ | Any characters allowed, cannot be empty. | `belobog avenue`, `COM4-02-33`, `LT21`, `Kent Ridge Vale, Tulip Street, #12-34`
Tag | t/ | Case-sensitive.<br>Only alphanumeric characters allowed. | `tutor`, `professor`, `BestProf`, `Number1TA`
Availability | a/ | Valid format of `day start-time end-time`.<br>1. `day` should be a valid day of week: `Monday`, `mon`, `Tuesday`, `tue`, `tues`, `Wednesday`, `wednes`, `wed`, `Thursday`, `thurs`, `thur`, `thu`, `Friday`, `fri`, `Saturday`, `satur`, `sat`, `Sunday`, `sun`.<br>2. `day` is case-insensitive.<br>3. `start-time` and `end-time` should be in the time format of `HH:mm` where `HH` is in 24 hours (00-23) and `mm` are valid minutes (00-59). | `mon 13:00 14:00`, `monday 13:00 14:00`, `tues 14:00 21:00`
Meeting Description | d/ | Case-sensitive.<br>Only alphanumeric characters allowed. Spaces are only allowed between alphanumeric characters. | `Meet for finals`, `Midterm revision`
Meeting Start Time | s/ | Valid date and time format.<br>1. Valid date formats: `yyyy-MM-dd`, `yyyy-M-d`, `dd-MM-yyyy`, `yyyy-MM-d`, `d-MM-yyyy`, `d-M-yyyy`, `dd-M-yyyy`, `d/MM/yyyy`, `d-M-yyyy`, `dd-M-yyyy`, `dd/MM/yyyy`, `yyyy/MM/dd`, `yyyy/MM/d`, `yyyy/M/dd`, `yyyy/M/d`<br>where `yyyy` is a 4-digit year (0000-9999), `M` is a single digit month (1-9), `MM` is a valid month (01-12), `d` is a single digit day (1-9), `dd` is a valid day (01-31)<br>2. Valid time formats: `HH:mm`, `H:mm`, `HHmm`<br>where `H` is a single digit hour (1-9), `HH` is a valid 24-hour (00-23), `mm` are valid minutes (00-59). | `2002-11-02 19:00`, `1-12-2022 9:00`, `2024/1/1 0000`

### Valid `Faculty` values

Faculty | Other names
--------|------
Faculty of Arts of Social Sciences | Arts and Social Sciences, FASS
Business School | Business, Biz School, Biz
School of Computing | Computing, SoC
School of Continuing and Lifelong Education | Continuing and Lifelong Education, SCALE
Faculty of Dentistry | Dentistry
School of Design and Environment | Design and Environment, SDE
Duke-NUS Medical School | Duke-NUS
Faculty of Engineering, Engineering | FoE
Integrative Sciences and Engineering | ISEP
Faculty of Law | Law
Yong Loo Lin School of Medicine | Medicine
Yong Siew Toh Conservatory of Music | Music, TST Conservatory of Music
Saw Swee Hock School of Public Health | Public Health
Lee Kuan Yew School of Public Policy | Public Policy, LKY School of Public Policy
Faculty of Science | Science, FoS
University Scholars Programme | USP
Yale-NUS College | Yale-NUS

--------------------------------------------------------------------------------------------------------------------

Expand Down
Binary file added docs/images/OverallLayout.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 10 additions & 24 deletions docs/team/whitesnowx.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: page
title: Wong's Project Portfolio Page
title: Calista Wong's Project Portfolio Page
---

### Project: StaffConnect
Expand All @@ -9,38 +9,24 @@ StaffConnect offers convenience and peace of mind to a struggling student with m

Given below are my contributions to the project.

* **New Feature**: Added the ability to undo/redo previous commands.
* What it does: allows the user to undo all previous commands one at a time. Preceding undo commands can be reversed by using the redo command.
* Justification: This feature improves the product significantly because a user can make mistakes in commands and the app should provide a convenient way to rectify them.
* **New Feature**: Added the ability to sort person in staffBook.
* What it does: allows user to view the persons in a sorted order by a specified attribute. Sort command allows for multiple attribute with specified weightage.
* Justification: This feature improves the product significantly because a user can prioritise and efficiently obtain information in a large dataset.
* Highlights: This enhancement affects existing commands and commands to be added in future. It required an in-depth analysis of design alternatives. The implementation too was challenging as it required changes to existing commands.
* Credits: *{mention here if you reused any code/ideas from elsewhere or if a third-party library is heavily used in the feature so that a reader can make a more accurate judgement of how much effort went into the feature}*

* **New Feature**: Added a history command that allows the user to navigate to previous commands using up/down keys.

* **Code contributed**: [RepoSense link]()
* **Code contributed**: [RepoSense link](https://nus-cs2103-ay2324s2.github.io/tp-dashboard/?search=whitesnowx&sort=groupTitle&sortWithin=title&timeframe=commit&mergegroup=&groupSelect=groupByRepos&breakdown=true&checkedFileTypes=docs~functional-code~test-code~other&since=2024-02-23&tabOpen=true&tabType=authorship&tabAuthor=whitesnowx&tabRepo=AY2324S2-CS2103-F08-3%2Ftp%5Bmaster%5D&authorshipIsMergeGroup=false&authorshipFileTypes=docs~functional-code~test-code~other&authorshipIsBinaryFileTypeChecked=false&authorshipIsIgnoredFilesChecked=false)

* **Project management**:
* Managed releases `v1.3` - `v1.5rc` (3 releases) on GitHub

* **Enhancements to existing features**:
* Updated the GUI color scheme (Pull requests [\#33](), [\#34]())
* Wrote additional tests for existing features to increase coverage from 88% to 92% (Pull requests [\#36](), [\#38]())
* Managed releases `v1.1` - `v1.5rc` (3 releases) on GitHub

* **Documentation**:
* User Guide:
* Added documentation for the features `delete` and `find` [\#72]()
* Did cosmetic tweaks to existing documentation of features `clear`, `exit`: [\#74]()
* Added documentation for the features `sort` [\#149](https://github.com/AY2324S2-CS2103-F08-3/tp/pull/149)
* Developer Guide:
* Added implementation details of the `delete` feature.
* Added implementation details the `sort` feature. [\#149](https://github.com/AY2324S2-CS2103-F08-3/tp/pull/149)

* **Community**:
* PRs reviewed (with non-trivial review comments): [\#12](), [\#32](), [\#19](), [\#42]()
* Contributed to forum discussions (examples: [1](), [2](), [3](), [4]())
* Reported bugs and suggestions for other teams in the class (examples: [1](), [2](), [3]())
* Some parts of the history feature I added was adopted by several other class mates ([1](), [2]())

* **Tools**:
* Integrated a third party library (Natty) to the project ([\#42]())
* Integrated a new Github plugin (CircleCI) to the team repo
* PRs reviewed (with non-trivial review comments): [\#130](https://github.com/AY2324S2-CS2103-F08-3/tp/pull/130),
* Reported bugs and suggestions for other teams in the class (examples: [1](https://github.com/AY2324S2-CS2103T-T11-3/tp/issues/119))

* _{you can add/remove categories in the list above}_
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class Availability {


public static final String MESSAGE_CONSTRAINTS = "[DAY_OF_THE_WEEK] [START_TIME] [END_TIME] E.g. mon 09:00 13:00\n"
+ "[DAY_OF_THE_WEEK] Should be a week of the day, the full word or the first syllable of the word\n"
+ "[DAY_OF_THE_WEEK] Should be a day of the week, the full word or the first syllable of the word\n"
+ "[START_TIME], [END_TIME] Using a 24H digital time format HH:mm\n";
public static final String VALIDATION_REGEX_DAY = "(?i)((mon|tue(s)?|wed(nes)?|thu(r)?(rs)?|fri|sat(ur)?|sun)"
+ "(day)?)";
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/staffconnect/model/person/Module.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ public class Module {


public static final String MESSAGE_CONSTRAINTS =
"Module code should contain 2-4 capital letters followed by 4 digits long and at most 1 capitalised suffix";
public static final String VALIDATION_REGEX = "[a-zA-Z]{2,4}\\d{4}[a-zA-Z]{0,1}";
"Module code should contain 2-4 letters followed by 4 digits long and at most 2 characters";
public static final String VALIDATION_REGEX = "[a-zA-Z]{2,4}\\d{4}[a-zA-Z]{0,2}";

public final String value;

Expand Down
15 changes: 8 additions & 7 deletions src/test/java/staffconnect/model/person/ModuleTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,19 @@ public void isValidModule() {
assertFalse(Module.isValidModule("1234")); // numbers only
assertFalse(Module.isValidModule("2103T")); // missing prefix
assertFalse(Module.isValidModule("C2103T")); // only 1 prefix
assertFalse(Module.isValidModule("CS2103TT")); // too many suffix
assertFalse(Module.isValidModule("CS2103TTT")); // too many suffix
assertFalse(Module.isValidModule("CSCSC2103T")); // too many prefix
assertFalse(Module.isValidModule("CS210310101010T")); // too many numbers
assertFalse(Module.isValidModule("CS21T")); // too little numbers

// valid module code
assertTrue(Module.isValidModule("CS2103")); // 2 prefix, 4 letters without 1 optional suffix
assertTrue(Module.isValidModule("CS2103T")); // 2 prefix, 4 letters with 1 optional suffix
assertTrue(Module.isValidModule("GEN2050")); // 3 prefix, 4 letters without 1 optional suffix
assertTrue(Module.isValidModule("GEN2050Y")); // 3 prefix, 4 letters with 1 optional suffix
assertTrue(Module.isValidModule("GESS1035")); // 4 prefix, 4 letters without 1 optional suffix
assertTrue(Module.isValidModule("GESS1035X")); // 4 prefix, 4 letters with 1 optional suffix
assertTrue(Module.isValidModule("CS2103")); // 2 prefix, 4 numbers without 1 optional suffix
assertTrue(Module.isValidModule("CS2103T")); // 2 prefix, 4 numbers with 1 optional suffix
assertTrue(Module.isValidModule("CS2103TT")); // 2 prefix, 4 numbers with 2 optional suffix
assertTrue(Module.isValidModule("GEN2050")); // 3 prefix, 4 numbers without 1 optional suffix
assertTrue(Module.isValidModule("GEN2050Y")); // 3 prefix, 4 numbers with 1 optional suffix
assertTrue(Module.isValidModule("GESS1035")); // 4 prefix, 4 numbers without 1 optional suffix
assertTrue(Module.isValidModule("GESS1035X")); // 4 prefix, 4 numbers with 1 optional suffix
assertTrue(Module.isValidModule("cs2103t")); // suffix not capitalised
assertTrue(Module.isValidModule("cs2103T")); // prefix not capitalised
assertTrue(Module.isValidModule("cS2103t")); // prefix partial not capitalised
Expand Down

0 comments on commit 2c1ae30

Please sign in to comment.