From 404e49b7222230068b4707722219eb5ea98d89cb Mon Sep 17 00:00:00 2001 From: Oleh <65224395+OlehDulebaEpam@users.noreply.github.com> Date: Sun, 3 Dec 2023 03:11:10 +0200 Subject: [PATCH] edited general fines for tasks/connections project (#1377) * edited general fines for tasks/connections project * text correction in tasks/connections angular's project * extended toast message with description * correction --- tasks/connections/README.md | 38 +++++++++++++++++-- tasks/connections/milestone_1.registration.md | 16 ++++---- tasks/connections/milestone_2.login.md | 16 ++++---- tasks/connections/milestone_3.profile.md | 7 ++-- .../connections/milestone_4.profile_update.md | 9 +++-- tasks/connections/milestone_5.logout.md | 3 +- .../connections/milestone_6.people_groups.md | 6 +-- tasks/connections/milestone_7.group_dialog.md | 2 +- tasks/connections/milestone_8.conversation.md | 2 +- 9 files changed, 65 insertions(+), 34 deletions(-) diff --git a/tasks/connections/README.md b/tasks/connections/README.md index 81f788768..a15f18cab 100644 --- a/tasks/connections/README.md +++ b/tasks/connections/README.md @@ -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 @@ -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. diff --git a/tasks/connections/milestone_1.registration.md b/tasks/connections/milestone_1.registration.md index afa581b30..dcbcb7cd0 100644 --- a/tasks/connections/milestone_1.registration.md +++ b/tasks/connections/milestone_1.registration.md @@ -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 @@ -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 diff --git a/tasks/connections/milestone_2.login.md b/tasks/connections/milestone_2.login.md index 35d5a9b7e..f67c966e1 100644 --- a/tasks/connections/milestone_2.login.md +++ b/tasks/connections/milestone_2.login.md @@ -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 @@ -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** diff --git a/tasks/connections/milestone_3.profile.md b/tasks/connections/milestone_3.profile.md index 44b7ad6db..de759399f 100644 --- a/tasks/connections/milestone_3.profile.md +++ b/tasks/connections/milestone_3.profile.md @@ -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 @@ -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** diff --git a/tasks/connections/milestone_4.profile_update.md b/tasks/connections/milestone_4.profile_update.md index 71c2ddad7..4a91bcbce 100644 --- a/tasks/connections/milestone_4.profile_update.md +++ b/tasks/connections/milestone_4.profile_update.md @@ -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 @@ -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** diff --git a/tasks/connections/milestone_5.logout.md b/tasks/connections/milestone_5.logout.md index 7c7c8700a..bb3759833 100644 --- a/tasks/connections/milestone_5.logout.md +++ b/tasks/connections/milestone_5.logout.md @@ -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** diff --git a/tasks/connections/milestone_6.people_groups.md b/tasks/connections/milestone_6.people_groups.md index 28e93636e..e827b3599 100644 --- a/tasks/connections/milestone_6.people_groups.md +++ b/tasks/connections/milestone_6.people_groups.md @@ -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_: `-----------------------` @@ -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) diff --git a/tasks/connections/milestone_7.group_dialog.md b/tasks/connections/milestone_7.group_dialog.md index 06ac0c2b9..dbcd70aff 100644 --- a/tasks/connections/milestone_7.group_dialog.md +++ b/tasks/connections/milestone_7.group_dialog.md @@ -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. diff --git a/tasks/connections/milestone_8.conversation.md b/tasks/connections/milestone_8.conversation.md index 759a2cece..7880db94e 100644 --- a/tasks/connections/milestone_8.conversation.md +++ b/tasks/connections/milestone_8.conversation.md @@ -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.