Skip to content

Commit

Permalink
edited general fines for tasks/connections project (#1377)
Browse files Browse the repository at this point in the history
* edited general fines for tasks/connections project

* text correction in tasks/connections angular's project

* extended toast message with description

* correction
  • Loading branch information
OlehDulebaEpam authored Dec 3, 2023
1 parent 2d11664 commit 404e49b
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 34 deletions.
38 changes: 34 additions & 4 deletions tasks/connections/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,25 @@ Detailed information about each part of the application is presented in the sect

Total score: **800 points**

# Examination
## Examination

Each milestone has relative score. Each milestone has number of points for successful result.

But in case if some common violation is present the project is losing **additional** points:

#### During Cross-Check

- any uncaught errors: **-100 points** for an error in console
- used `any` instead of dedicated interface/type: **-100 points**
- used some additional production npm package (except NgRx): **-100 points**

### Url navigation
#### Final conclusion

Restrictions on additional packages cannot be verified by students. This condition will be further
tested for students who score more than half of the points. If a student violates this condition,
the project scores will be nullified.

- used any production npm-package except NgRx: **-800 points**

## Url navigation

#### Guest

Expand Down Expand Up @@ -134,3 +142,25 @@ Page where user can send message to all participants.
_`/conversation/{:conversationID}` (person dialog)_
where, `:conversationID` is unique user identifier to speak with;
Page where user can write personal messages directly.

## Declarations

### Toast

It is a discrete and ephemeral notification presented to users on a graphical user interface.
conveys concise information, notifications, or feedback in a visually unobtrusive manner. These
messages are designed to appear momentarily and autonomously vanish without necessitating user
intervention, thereby minimizing disruption to the user's ongoing tasks.

The nomenclature "toast" in this context draws an analogy from the culinary practice where a toaster
pops up, signifying the completion of the toasting process. Analogously, a toast message emerges on
the user interface, delivering pertinent information and subsequently dissipating after a brief
period.

In various graphic packages, this element is denoted by distinct
names: [Snackbar](https://material.angular.io/components/snack-bar/overview) in Angular
Material, [Toast](https://ng-bootstrap.github.io/#/components/toast/overview) in NG
Bootstrap, [Toast](https://primeng.org/toast) in
PrimeNG, [Push](https://taiga-ui.dev/components/push) in Taiga UI, or you
can [make the component](https://medium.com/geekculture/simple-toast-notification-in-angular-f018b9aa3dc8)
yourself.
16 changes: 8 additions & 8 deletions tasks/connections/milestone_1.registration.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ Page consist of:

**reactive form** with:

- first name field; It could be any of letters or spaces;
- email field. With validation for the email type;
- password field. With validation: minimum 8 symbols that include at least 1 capital letter, at
least 1 digit and at least 1 special symbol.
- first name field; Validation: required, allowed only letters or spaces, maximum 40 characters;
- email field; Validation: required, email type;
- password field; Validation: required, minimum 8 symbols that include at least 1 capital letter, at
least 1 digit and at least 1 special symbol;

**submit button**
Triggers the process of registration. Any errors during the registration should be displayed to let
Expand Down Expand Up @@ -94,17 +94,17 @@ _Submit_ word is just the name of the button, you can use whatever label for the
### Profit

- page with dedicated url: **5 points**
- validation for _name_ field with error messages: **5 points**
- validation for _name_ and _email_ fields with error messages: **5 points**
- validation for _password_ field with error messages: **5 points**
- redirection to sign-in page after successful registration: **5 points**
- toast messages with appropriate text are displayed if http-request fails or succeed: **10 points**
- [toast messages](./README.md#toast) with appropriate text are displayed if http-request fails or
succeed: **10 points**
- _Submit_ button is disabled if form is invalid. Also, it should be disabled after http error with
type `PrimaryDuplicationException` until the user changes the field value: **10 points**
- _Submit_ button is disabled and `email` field has error message of taken account if user type the
same email address that he tried to send before and got
an error `PrimaryDuplicationException`: **10 points**
- _Submit_ button is disabled after clicking until any http error is returned (http success is not
considered because redirection into login page should be in that case): **10 points**
- _Submit_ button is disabled after clicking while http-request is in progress: **10 points**

### Fines

Expand Down
16 changes: 8 additions & 8 deletions tasks/connections/milestone_2.login.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ Page consist of:

**reactive form** with:

- email
- password
- email field; Validation: required, email type;
- password field; Validation: required;

**submit button**
Triggers the process of authorization. Any errors during the registration should be displayed to let
Expand Down Expand Up @@ -114,17 +114,17 @@ _Submit_ word is just the name of the button, you can use whatever label for the
- validation for _email_ field with error messages: **5 points**
- validation for _password_ field with error messages: **5 points**
- redirection to the main page after successful authentication: **10 points**
- toast messages with appropriate text are displayed if http-request fails or succeed: **10 points**
- [toast messages](./README.md#toast) with appropriate text are displayed if http-request fails or
succeed: **10 points**
- _Submit_ button is disabled if form is invalid. Also, it should be disabled after http error with
type `NotFoundException` until the user changes `email` or `password` field value: **10 points**
- _Submit_ button is disabled after clicking until any http error is returned (http success is not
considered because redirection into main page should be in that case): **10 points**
- _Submit_ button is disabled after clicking while http-request is in progress: **10 points**
- `token`, `uid` and `email` value is saved in `localStorage` after successful sign in and used
again in the following htt-requests even after page reloading (it allows user to omit login again
after page reloading): **10 points**
again in the following http-requests even after page reloading (it allows user to omit
sign in again after page reloading): **10 points**

### Fines

- redirection to main page after failed login: **-20 points**
- redirection to any page after failed login: **-20 points**
- user can click _Submit_ button more than once even if previous http-request
is not completed: **-20 points**
7 changes: 3 additions & 4 deletions tasks/connections/milestone_3.profile.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

**Score:** 40

Information on this page should be loaded **only once** and save in store when user visit this page
first
time.
Information on this page should be loaded **only once** and save in @ngrx/store when user visit this
page first time.

### Visualization

Expand Down Expand Up @@ -95,5 +94,5 @@ _status code_ **400**

### Fines

- data is not saved in the store: **-15 points**
- data is not saved in the @ngrx/store: **-15 points**
- http-request is sent every time if user opens profile: **-15 points**
9 changes: 5 additions & 4 deletions tasks/connections/milestone_4.profile_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

User can change and save his name. Application **should not** perform _get_ http-request `/profile`
again to retrieve saved data, if _put_ http-request succeed the data from the form is being
persisted in store and is used on Profile page instantly.
persisted in @ngrx/store and is used on Profile page instantly.

### Visualization

Expand Down Expand Up @@ -101,13 +101,14 @@ _status code_ **400**

- button _Edit_ makes `name` field editable: **10 points**
- button _Cancel_ returns initial state: **5 points**
- button _Save_ sends new http-request to save new data and update store: **20 points**
- button _Save_ sends new http-request to save new data and update @ngrx/store: **20 points**
- buttons _Cancel_ and _Save_ is visible ony for editable
form: **5 points**
- button _Edit_ is visible only for static page: **5 points**
- toast messages with appropriate text are displayed if http-request fails or succeed: **10 points**
- [toast messages](./README.md#toast) with appropriate text are displayed if http-request fails or
succeed: **10 points**

### Fines

- http-request to retrieve profile data is sent: **-20 points**
- data in the store is updated even if http-request fails: **-20 points**
- data in the @ngrx/store is updated even if http-request fails: **-20 points**
3 changes: 2 additions & 1 deletion tasks/connections/milestone_5.logout.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,5 @@ _status code_ **400**
with `DELETE` method: **10 points**
- user is redirected to Sign-In page after successful logout process: **10 points**
- all data in `cookies`, `localStorage` is deleted: **10 points**
- toast messages with appropriate text are displayed if http-request fails or succeed: **10 points**
- [toast messages](./README.md#toast) with appropriate text are displayed if http-request fails or
succeed: **10 points**
6 changes: 3 additions & 3 deletions tasks/connections/milestone_6.people_groups.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,7 @@ routing `/conversation/{:conversationID}`.
> conversation via special http-request (below) before user is redirected to the dialog page if
> there is no
> already created conversation with unique id. If any errors occur during conversation creation user
> have to see toast danger message and redirection is
> canceled.
> have to see [toast](./README.md#toast) danger message and redirection is canceled.
_rough example of people list_:
`-----------------------`
Expand Down Expand Up @@ -582,7 +581,8 @@ _status code_ **400**
- submit button in modal window should be disabled until form is valid: **5 points**
- clicking on submit button in modal window the appropriate http-request is sent to create new
group. Modal window is closed only if http-request succeeded: **15 points**
- toast messages with appropriate text are displayed if http-request fails or succeed: **10 points**
- [toast messages](./README.md#toast) with appropriate text are displayed if http-request fails or
succeed: **10 points**
- clicking on list item the user is redirected to group dialog page: **5 points**

#### People list (right)
Expand Down
2 changes: 1 addition & 1 deletion tasks/connections/milestone_7.group_dialog.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Simple form field with _text_ type for new message + _Send_ button to trigger pr

### Technical solution

All received message data should be saved in the NgRx store in some way in order to not load ald
All received message data should be saved in the @ngrx/store in some way in order to not load ald
messages again if user navigates between pages and returns back to the channel until browser is
reloaded.

Expand Down
2 changes: 1 addition & 1 deletion tasks/connections/milestone_8.conversation.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Simple form field with _text_ type for new message + _Send_ button to trigger pr

### Technical solution

All received message data should be saved in the NgRx store in some way in order to not load ald
All received message data should be saved in the @ngrx/store in some way in order to not load ald
messages again if user navigates between pages and returns back to the conversation until browser is
reloaded.

Expand Down

0 comments on commit 404e49b

Please sign in to comment.