forked from HLena/contacts-app-angular
-
Notifications
You must be signed in to change notification settings - Fork 0
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
T04 Code Review #1
Open
diegotc86
wants to merge
14
commits into
feedback
Choose a base branch
from
main
base: feedback
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Commits on May 17, 2024
-
chore: Install json-server for mock API development
- Installed json-server as a development dependency. - Updated package.json and package-lock.json with json-server.
Configuration menu - View commit details
-
Copy full SHA for 0f612dc - Browse repository at this point
Copy the full SHA 0f612dcView commit details -
chore: Add db.json to data folder
- Added db.json to the data folder with a list of 10 contacts - Each contact oncludes id, name, lastname, twitter_username, avatar_url, favorite status and a note
Configuration menu - View commit details
-
Copy full SHA for 830f5f1 - Browse repository at this point
Copy the full SHA 830f5f1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0c9cdb9 - Browse repository at this point
Copy the full SHA 0c9cdb9View commit details -
- '': main route - contact/:id : subroute of main route - 404: error route
Configuration menu - View commit details
-
Copy full SHA for 82a5463 - Browse repository at this point
Copy the full SHA 82a5463View commit details -
- error404Component: show the error page - homeComponente: show tha main view -contactComponent: show details of a specific contact -buttonComponente: basic component
Configuration menu - View commit details
-
Copy full SHA for 14975e5 - Browse repository at this point
Copy the full SHA 14975e5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 94e36b2 - Browse repository at this point
Copy the full SHA 94e36b2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 54c076b - Browse repository at this point
Copy the full SHA 54c076bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 76ee403 - Browse repository at this point
Copy the full SHA 76ee403View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7dba897 - Browse repository at this point
Copy the full SHA 7dba897View commit details -
Configuration menu - View commit details
-
Copy full SHA for c03256f - Browse repository at this point
Copy the full SHA c03256fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 801fadb - Browse repository at this point
Copy the full SHA 801fadbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 92ea431 - Browse repository at this point
Copy the full SHA 92ea431View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0f552db - Browse repository at this point
Copy the full SHA 0f552dbView commit details
Commits on May 20, 2024
-
* style: Set global styles * chore: Update property name from 'contact' to 'contacts' * feat: Implement method to get all contacts * feat: Consume contactService and show a list of contacts * Added getContactById fn in ContactService * Added html structure in Contact component * Added styles for Contact component * Updated styles for Contact component * Added favorite function * Feat/search contact (HLena#2) * feat: Implement searchContactByName method * refactor: Moved search functionality to a new 'searchContact' component and integrated it into 'home' component * feat: Add search component to handle contact search functionality * chore: Change the icon before the heading 'h1' element * Add angular icon * feat: Implement search functionality with RxJS Observables and operators - Add BehaviorSubject to manage search term input. -Use debounceTime and distincyUntilChanged operators to optimize search input handling. - Implement switchMap to handle search requests and update the filtered contacts list * refactor: Replace FormControl with input event binding for search functionality * styles: update styles * Contact component with delete function (HLena#3) * Added updateContact fn in ContactService for update favorites with backend * Updated Json data * Added delete contact feature * feat: Implement update and delete functionalities for contacts (HLena#4) * Added updateContact fn in ContactService for update favorites with backend * Updated Json data * Added delete contact feature --------- Co-authored-by: Heberth López <[email protected]> * refactor: Update project structure This commit updates the project structure to improve organization and maintainability. **Changes:** - Moved `data-access` folder to a `home` directory - Relocated `contact` and `search-contact` components to a `home/ui`` directory - Updated import paths in affected files * component: create edit compoenent * feat: edit functionality working * Added default avatar for contacts without imageUrl * Changes in Contact component * feat: create user done! * Updated getContactById fn for error handling * task: basic validations added * Updated HomeComponent with welcome message * Added Error404 page with styles * Update ContactPage when a contact is not found * chore: add data folder to gitignore file * chore: remove share contact service * chore: remove unnecessary imports * Updated Home Page * chore: disabled button when required * Refactor ContactService, SearchContactComponent, and ContactComponent (HLena#6) * feat: Add HttpClientModule import to enable HTTP requests in HomeComponent * feat: Persist selected contact in localStorage across page reloads * fix: Optimize contact data management with contact$ observable Refactor the contact management to utilize a contact$ observable in the ContactService. This change allows for more efficient and responsive updates when changes occur in the backend database (db.js) * fix: Centralize ContactService provider in AppComponent for shared state management - Removed individual ContactService providers from each component to address an issue where updates to contacts$ observable were not being detected across components. - Set ContactService as a provider in AppComponent to ensure a single, application-wide instance, allowing all components to share and reflect a consistent state. * feat: Add tap and map operators to update contacts$ observable with new data - Implement tap and map operators in ContactService to transform and update the contacts$ observable. - This change ensures that any updates to the contact data are reflected in the observable, improving data consistency across the application. * feat: Add tap and filter operators in deleteContact method to update contacts$ observable with new data - Implement tap and filter operators in deleteContact method to transform and update the contacts$ observable. - This change ensures that any updates to the contact data are reflected in the observable, improving data consistency across the application. * fear: Manage selected contact Id using BehaviorSubject instead of localStorage * refactor: Simplify ContactComponent by removing redundant error handling - Removed unnecessary catchError in ngOnInit. - Leveraged error handling from service methods. - Consolidated subscriptions for easier management and cleanup. * refactor: Add error handling in ContactService - Implemented catchError in all HTTP request methods. - Added handleError method to log errors and provide default values. * feat: Refactor SearchContactComponent to manage state with BehaviorSubject - Updated to use BehaviorSubject for managing selected contact ID. - Added setupSearchSubscription, setupContactsSubscription, and setupSelectedContactSubscription methods for better readability. - Subscribed to selectedContactId$ observable. - Removed localStorage usage for storing the selected contact ID. - Ensured proper cleanup of subscriptions in ngOnDestroy. * refactor: removed disabled on new button * chore: increase number of random characters in id generator * Update contact (HLena#9) * feat: Add HttpClientModule import to enable HTTP requests in HomeComponent * feat: Persist selected contact in localStorage across page reloads * fix: Optimize contact data management with contact$ observable Refactor the contact management to utilize a contact$ observable in the ContactService. This change allows for more efficient and responsive updates when changes occur in the backend database (db.js) * fix: Centralize ContactService provider in AppComponent for shared state management - Removed individual ContactService providers from each component to address an issue where updates to contacts$ observable were not being detected across components. - Set ContactService as a provider in AppComponent to ensure a single, application-wide instance, allowing all components to share and reflect a consistent state. * feat: Add tap and map operators to update contacts$ observable with new data - Implement tap and map operators in ContactService to transform and update the contacts$ observable. - This change ensures that any updates to the contact data are reflected in the observable, improving data consistency across the application. * feat: Add tap and filter operators in deleteContact method to update contacts$ observable with new data - Implement tap and filter operators in deleteContact method to transform and update the contacts$ observable. - This change ensures that any updates to the contact data are reflected in the observable, improving data consistency across the application. * fear: Manage selected contact Id using BehaviorSubject instead of localStorage * refactor: Simplify ContactComponent by removing redundant error handling - Removed unnecessary catchError in ngOnInit. - Leveraged error handling from service methods. - Consolidated subscriptions for easier management and cleanup. * refactor: Add error handling in ContactService - Implemented catchError in all HTTP request methods. - Added handleError method to log errors and provide default values. * feat: Refactor SearchContactComponent to manage state with BehaviorSubject - Updated to use BehaviorSubject for managing selected contact ID. - Added setupSearchSubscription, setupContactsSubscription, and setupSelectedContactSubscription methods for better readability. - Subscribed to selectedContactId$ observable. - Removed localStorage usage for storing the selected contact ID. - Ensured proper cleanup of subscriptions in ngOnDestroy. * fix: Updates the request url to get contacts sorted alphabetically * feat: Update contacts$ observable after create, edit or delete a contact * fix: removes contactService from providers * feat: implements scrollToContact to show always the selected contact in the list - Added scrollToContact method in SearchContactComponent to scroll to the selected contact. - Applied scroll-margin-top to contact items to ensure they are not too close to the top edge when scrolled into view. - Ensured new contact is visible in the contact list immediately. * refactor: submit button text depens on action to execute * Username Validations (HLena#11) * refactor: deletes consolo.log * feat: Add username validation using UsernameValidatorDirective in contact edit form - Implemented validateUsername function to validate usernames. - Created UsernameValidatorDirective to use custom username validation. * chore: Adds '@' before username in contact component --------- Co-authored-by: Heberth López <[email protected]> Co-authored-by: Heberth López <[email protected]> Co-authored-by: CrhistianT <[email protected]> Co-authored-by: Crhistian Turpo <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 55c55f7 - Browse repository at this point
Copy the full SHA 55c55f7View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.