-
Notifications
You must be signed in to change notification settings - Fork 3.7k
feat(deps): Upgrade angular to v20, others dependencies to latest, improve docs #902
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
base: master
Are you sure you want to change the base?
Conversation
Removes the incorrect `material-components-web` stylesheet and script from `index.html`. These were causing conflicts with the `@angular/material` styles that are included in the build. Also moves the `mat-typography` class from the `body` to the `app-root` element to follow best practices and avoid potential styling issues.
- Updates the README.md file to be more accurate and to point to the documentation in the docs/ directory. - Updates the documentation in the docs/ directory to be more complete and to correct stale information.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary of Changes
Hello @rafikhan, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request performs a significant upgrade of the application's core framework and its associated dependencies. The primary goal is to migrate the Angular application from version 16 to version 20, along with updating Angular Material, CDK, and AngularFire to their latest compatible versions. Beyond dependency bumps, the PR includes necessary configuration adjustments, refactors core Angular modules and components for compatibility, and cleans up the main HTML file. A major part of this change also involves adding extensive new documentation to provide clearer guidance on the project's architecture, setup, and various components.
Highlights
- Major Angular and Dependency Upgrades: The application's core framework, Angular, has been upgraded from version 16 to version 20. This includes corresponding updates to Angular Material/CDK and
@angular/fire
to ensure full compatibility and leverage the latest features and performance enhancements. - Configuration Adjustments: Key configuration files like
angular.json
have been updated. This includes renamingbrowserTarget
tobuildTarget
for modern Angular CLI compatibility and introducing aschematics
section to standardize code generation practices. - Core Module and Component Updates: The
app.module.ts
file has been refactored to correctly handle imports and providers for the new Angular and Firebase versions. Additionally, all Angular components (app.component
,filter-dialog
,homepage
,restaurant-card
,restuarant-page
,review-list
,sign-in-modal
,submit-review-modal
) have been explicitly marked withstandalone: false
. - HTML Structure Refinements: The
index.html
file has been cleaned up by removing conflictingmaterial-components-web
imports and relocating themat-typography
class to theapp-root
element for better integration with Angular Material. - Extensive Documentation Improvements: A comprehensive set of new documentation files has been added to the
docs
directory, covering architecture, backend, data model, frontend, and setup instructions. ExistingREADME.md
files have also been updated to reflect these changes and provide more accurate information. - Backend Dependency Updates: Backend dependencies in
firestore/functions/package.json
have been updated, includingfirebase-admin
,firebase-functions
, andtypescript
, ensuring the serverless functions are running on the latest stable versions.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
Feature | Command | Description |
---|---|---|
Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/
folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request successfully upgrades Angular from v16 to v20 and brings other dependencies up to date. The extensive documentation additions are a great improvement, making the project much easier to understand and set up. I've found a few minor issues in the documentation and one potential improvement in the Angular module configuration that I've detailed in the comments.
f1c8716
to
6bcb27e
Compare
@@ -22,6 +22,7 @@ import { Router } from "@angular/router"; | |||
selector: 'app-root', | |||
templateUrl: './app.component.html', | |||
styleUrls: ['./app.component.css'], | |||
standalone: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this and other standalone: true
should be removed in a separate PR so that they are standalone components
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted!
After upgrading to Angular 20 and @angular/fire 20, all tests were failing due to an incorrect TestBed configuration. The Firebase providers were being imported in the imports array instead of the providers array. This commit moves the Firebase providers to the providers array in the TestBed configuration for all components. It also adds any missing module dependencies to the imports array. With these changes, all tests now pass.
57e5732
to
e887746
Compare
This pull request upgrades the application from Angular v16 to v20 and all other dependencies to ensure compatibility. This major upgrade incorporates new features, performance improvements, and bug fixes.
Changes:
Dependency Upgrades:
@angular/fire
has been upgraded from v7 to v20.Configuration Changes
angular.json
browserTarget
has been renamed tobuildTarget
for compatibility with the newer Angular CLI.schematics
section has been added to enforce consistency in generated code.Code Changes
app.module.ts
:imports
andproviders
arrays were updated for compatibility with the new versions of Angular and@angular/fire
. This involved movingBrowserAnimationsModule
and the Firebase providers to theimports
array, and addingRouterModule
,FormsModule
, andReactiveFormsModule
.index.html
@angular/material
.mat-typography
class was moved to theapp-root
element to follow best practices.standalone: false
to avoid ambiguity and prepare for future Angular updates.Motviation
Other Context