Skip to content

feat: hello-furniture starter app#2

Open
Mukamik wants to merge 1 commit into
mainfrom
hello-world
Open

feat: hello-furniture starter app#2
Mukamik wants to merge 1 commit into
mainfrom
hello-world

Conversation

@Mukamik
Copy link
Copy Markdown
Owner

@Mukamik Mukamik commented May 27, 2025

No description provided.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @Mukamik, 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!

Summary of Changes

Hello team, gemini-code-assist here to provide a summary of this pull request. This PR, authored by Mukamik, introduces the initial setup for a new Angular application named 'tour-of-furniture'. Based on the title and the files included, the primary goal is to create a standard Angular starter project structure, likely as a foundation for a new feature or tutorial.

Highlights

  • New Angular Project Initialization: This PR adds all the necessary files and configurations to set up a basic Angular application using the Angular CLI, including project structure, build configurations, and initial component files.
  • Development Environment Configuration: Configuration files for common development tools like EditorConfig and VS Code launch/task settings are included to ensure consistent formatting and ease of development setup.
  • Dependency and Script Setup: The package.json file is added, defining the core Angular dependencies, development dependencies (like the CLI, testing frameworks), and standard npm scripts for serving, building, and testing the application.

Changelog

Click here to see the changelog
  • tour-of-furniture/.editorconfig
    • Adds standard EditorConfig rules for consistent code style (indentation, charset, trailing whitespace, TS quotes, MD line length).
  • tour-of-furniture/.gitignore
    • Adds standard Git ignore rules for common build artifacts, dependencies, and IDE files.
  • tour-of-furniture/.vscode/extensions.json
    • Recommends the Angular Language Service extension for VS Code.
  • tour-of-furniture/.vscode/launch.json
    • Configures VS Code launch settings for 'ng serve' and 'ng test'.
  • tour-of-furniture/.vscode/tasks.json
    • Configures VS Code tasks for 'npm start' and 'npm test'.
  • tour-of-furniture/README.md
    • Adds the default Angular CLI README with instructions for development, building, and testing.
  • tour-of-furniture/angular.json
    • Configures the Angular project settings, including build options, serve configurations, i18n extraction, and test setup using Karma. Sets default style language to SCSS.
  • tour-of-furniture/package.json
    • Adds project dependencies and dev dependencies for Angular and related tools.
    • Defines standard npm scripts for common development tasks.
  • tour-of-furniture/src/app/app.component.html
    • Adds the default Angular welcome template HTML, including an Angular logo, welcome message, links to resources, and social media icons.
    • Includes the <router-outlet /> for routing.
  • tour-of-furniture/src/app/app.component.spec.ts
    • Adds basic unit tests for the root AppComponent using Jasmine and Karma.
  • tour-of-furniture/src/app/app.component.ts
    • Defines the root AppComponent as a standalone component.
    • Sets the selector, template URL, style URL, and includes RouterOutlet in imports.
    • Initializes the title property.
  • tour-of-furniture/src/app/app.config.ts
    • Configures the application using bootstrapApplication.
    • Provides zone change detection and router setup.
  • tour-of-furniture/src/app/app.routes.ts
    • Defines the application's routing configuration (initially empty).
  • tour-of-furniture/src/index.html
    • Adds the main HTML file structure for the application, including meta tags, title, base href, favicon link, and the root component tag.
  • tour-of-furniture/src/main.ts
    • Adds the application entry point, bootstrapping the AppComponent.
  • tour-of-furniture/src/styles.scss
    • Adds an empty global SCSS file with a comment.
  • tour-of-furniture/tsconfig.app.json
    • Adds TypeScript configuration specific to the application build.
  • tour-of-furniture/tsconfig.json
    • Adds base TypeScript configuration for the project, including strict mode options and compiler targets.
  • tour-of-furniture/tsconfig.spec.json
    • Adds TypeScript configuration specific to the test build, including Jasmine types.
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 is currently in preview and 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 to provide feedback.

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.


New project starts now,
Angular structure takes its form,
Code awaits its shape.

Footnotes

  1. 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.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This PR successfully initializes the 'hello-furniture' Angular application, setting up the basic project structure, configurations, and a default landing page. The use of recent Angular versions and features like standalone components (intended) and SCSS is a good foundation.

Style Guide Adherence:
The code generally adheres to the provided team style guide:

  • String Literal Quoting (Rule #5, Lines 76-88 in the style guide): Single quotes are correctly used for strings in TypeScript files (e.g., app.component.ts, app.component.spec.ts). This is also reinforced by the .editorconfig which specifies quote_type = single for *.ts files.
  • Other team style guide rules (Variable Declarations, Arrow Function Syntax, Function Definition Preference, Type vs. Interface Usage) had limited direct applicability in the new boilerplate code, but no violations were observed.

I've identified a few important issues concerning AppComponent's configuration and styling that should be addressed to ensure correctness and maintainability. These are detailed in the specific review comments.

Summary of Findings

  • AppComponent not standalone: AppComponent is bootstrapped with bootstrapApplication but is missing standalone: true in its @Component decorator. This is critical for the application's standalone architecture.
  • Incorrect style placement for AppComponent: Styles for AppComponent are in an inline <style> tag in app.component.html instead of the linked app.component.scss file. This is critical for maintainability and Angular best practices.
  • Undefined CSS variable --inter-font: The CSS variable --inter-font is used in app.component.html for .pill styles but is not defined, potentially leading to incorrect font rendering. This is a medium severity issue.

Merge Readiness

This pull request lays the groundwork for the 'hello-furniture' application. However, there are critical issues identified concerning the AppComponent's standalone configuration and style encapsulation, as well as a medium severity issue with an undefined CSS variable. These issues should be addressed before merging to ensure the application functions correctly, is maintainable, and adheres to Angular best practices.

As a reviewer, I am not authorized to approve pull requests. Once the suggested changes are made, the PR should be re-reviewed for final approval.

Comment on lines +4 to +9
@Component({
selector: 'app-root',
imports: [RouterOutlet],
templateUrl: './app.component.html',
styleUrl: './app.component.scss'
})
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The AppComponent is bootstrapped using bootstrapApplication in main.ts. This requires AppComponent to be a standalone component. However, the standalone: true property is missing from the @Component decorator.

Could you please add standalone: true to the decorator to correctly mark this component as standalone? This is crucial for the application to work as intended with the standalone architecture.

@Component({
  selector: 'app-root',
  standalone: true,
  imports: [RouterOutlet],
  templateUrl: './app.component.html',
  styleUrl: './app.component.scss'
})

Comment on lines +10 to +178
<style>
:host {
--bright-blue: oklch(51.01% 0.274 263.83);
--electric-violet: oklch(53.18% 0.28 296.97);
--french-violet: oklch(47.66% 0.246 305.88);
--vivid-pink: oklch(69.02% 0.277 332.77);
--hot-red: oklch(61.42% 0.238 15.34);
--orange-red: oklch(63.32% 0.24 31.68);

--gray-900: oklch(19.37% 0.006 300.98);
--gray-700: oklch(36.98% 0.014 302.71);
--gray-400: oklch(70.9% 0.015 304.04);

--red-to-pink-to-purple-vertical-gradient: linear-gradient(
180deg,
var(--orange-red) 0%,
var(--vivid-pink) 50%,
var(--electric-violet) 100%
);

--red-to-pink-to-purple-horizontal-gradient: linear-gradient(
90deg,
var(--orange-red) 0%,
var(--vivid-pink) 50%,
var(--electric-violet) 100%
);

--pill-accent: var(--bright-blue);

font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
"Segoe UI Symbol";
box-sizing: border-box;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

h1 {
font-size: 3.125rem;
color: var(--gray-900);
font-weight: 500;
line-height: 100%;
letter-spacing: -0.125rem;
margin: 0;
font-family: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
"Segoe UI Symbol";
}

p {
margin: 0;
color: var(--gray-700);
}

main {
width: 100%;
min-height: 100%;
display: flex;
justify-content: center;
align-items: center;
padding: 1rem;
box-sizing: inherit;
position: relative;
}

.angular-logo {
max-width: 9.2rem;
}

.content {
display: flex;
justify-content: space-around;
width: 100%;
max-width: 700px;
margin-bottom: 3rem;
}

.content h1 {
margin-top: 1.75rem;
}

.content p {
margin-top: 1.5rem;
}

.divider {
width: 1px;
background: var(--red-to-pink-to-purple-vertical-gradient);
margin-inline: 0.5rem;
}

.pill-group {
display: flex;
flex-direction: column;
align-items: start;
flex-wrap: wrap;
gap: 1.25rem;
}

.pill {
display: flex;
align-items: center;
--pill-accent: var(--bright-blue);
background: color-mix(in srgb, var(--pill-accent) 5%, transparent);
color: var(--pill-accent);
padding-inline: 0.75rem;
padding-block: 0.375rem;
border-radius: 2.75rem;
border: 0;
transition: background 0.3s ease;
font-family: var(--inter-font);
font-size: 0.875rem;
font-style: normal;
font-weight: 500;
line-height: 1.4rem;
letter-spacing: -0.00875rem;
text-decoration: none;
}

.pill:hover {
background: color-mix(in srgb, var(--pill-accent) 15%, transparent);
}

.pill-group .pill:nth-child(6n + 1) {
--pill-accent: var(--bright-blue);
}
.pill-group .pill:nth-child(6n + 2) {
--pill-accent: var(--french-violet);
}
.pill-group .pill:nth-child(6n + 3),
.pill-group .pill:nth-child(6n + 4),
.pill-group .pill:nth-child(6n + 5) {
--pill-accent: var(--hot-red);
}

.pill-group svg {
margin-inline-start: 0.25rem;
}

.social-links {
display: flex;
align-items: center;
gap: 0.73rem;
margin-top: 1.5rem;
}

.social-links path {
transition: fill 0.3s ease;
fill: var(--gray-400);
}

.social-links a:hover svg path {
fill: var(--gray-900);
}

@media screen and (max-width: 650px) {
.content {
flex-direction: column;
width: max-content;
}

.divider {
height: 1px;
width: 100%;
background: var(--red-to-pink-to-purple-horizontal-gradient);
margin-block: 1.5rem;
}
}
</style>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The AppComponent is configured with styleUrl: './app.component.scss' in its TypeScript file, indicating that its styles should reside in app.component.scss. However, a large <style> block (lines 10-178) is currently embedded directly within this HTML template. The app.component.scss file itself is empty.

According to Angular best practices (specifically, aligning with the principle of Style 05-20: Component Structure from the Angular Style Guide, which advises separating HTML, CSS, and TypeScript logic into their own files unless the component is very small), these styles should be moved to the app.component.scss file. This component's style block is quite substantial (~170 lines), making separation beneficial for:

  • Maintainability: Keeping template, styles, and logic separate.
  • SCSS Capabilities: Allowing the use of SCSS features like variables, mixins, and nesting in the dedicated .scss file.

Could you move the CSS rules from this <style> block into app.component.scss and then remove the entire <style>...</style> block (lines 10-178) from this HTML file?

border-radius: 2.75rem;
border: 0;
transition: background 0.3s ease;
font-family: var(--inter-font);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The CSS variable --inter-font is used here for the .pill class's font-family. However, this variable does not appear to be defined within this component's <style> block (lines 11-177) or in the global styles.scss (which is currently empty).

This will likely result in the font-family property falling back to a default or inherited value, which might not be the intended appearance.

To resolve this, you could consider:

  1. Defining --inter-font within the :host CSS variables (e.g., --inter-font: "Inter", sans-serif;).
  2. Replacing var(--inter-font) with a specific font stack directly, such as the main font stack defined for :host on line 39 ("Inter", -apple-system, ...).
  3. Using font-family: inherit; if the intention is to use the font family of the parent element.

Which approach would be most suitable here?

Suggested change
font-family: var(--inter-font);
font-family: inherit; /* Or define --inter-font, or use a specific font stack like \"Inter\", sans-serif */

@Mukamik
Copy link
Copy Markdown
Owner Author

Mukamik commented May 30, 2025

/gemini review

@Mukamik
Copy link
Copy Markdown
Owner Author

Mukamik commented May 30, 2025

/gemini help

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a 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 introduces the basic structure for the tour-of-furniture Angular starter application, generated using the Angular CLI. The setup includes standard configuration files, a basic app component, and initial routing setup. The changes are straightforward and represent a good starting point for the project.

Summary of Findings

  • Inline Styles in HTML Template: The component's styles are embedded directly in the HTML template using <style> tags. It is recommended to move these styles to the dedicated SCSS file for better maintainability and separation of concerns. (Medium severity, commented)
  • Basic Test Coverage: The generated test file provides minimal coverage. While acceptable for a starter, more comprehensive tests should be added as the component evolves. (Low severity, not commented due to review settings)
  • Standard README: The README is the standard one generated by the CLI. It could be enhanced with project-specific details later. (Low severity, not commented due to review settings)

Merge Readiness

The pull request provides a solid foundation for the Angular application. The primary area for improvement is the use of inline styles in the HTML template, which impacts maintainability. I recommend addressing this medium severity issue by moving the styles to the component's SCSS file before merging. As a reviewer, I am unable to directly approve the pull request; please ensure other designated reviewers provide their approval.

Comment on lines +10 to +178
<style>
:host {
--bright-blue: oklch(51.01% 0.274 263.83);
--electric-violet: oklch(53.18% 0.28 296.97);
--french-violet: oklch(47.66% 0.246 305.88);
--vivid-pink: oklch(69.02% 0.277 332.77);
--hot-red: oklch(61.42% 0.238 15.34);
--orange-red: oklch(63.32% 0.24 31.68);

--gray-900: oklch(19.37% 0.006 300.98);
--gray-700: oklch(36.98% 0.014 302.71);
--gray-400: oklch(70.9% 0.015 304.04);

--red-to-pink-to-purple-vertical-gradient: linear-gradient(
180deg,
var(--orange-red) 0%,
var(--vivid-pink) 50%,
var(--electric-violet) 100%
);

--red-to-pink-to-purple-horizontal-gradient: linear-gradient(
90deg,
var(--orange-red) 0%,
var(--vivid-pink) 50%,
var(--electric-violet) 100%
);

--pill-accent: var(--bright-blue);

font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
"Segoe UI Symbol";
box-sizing: border-box;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

h1 {
font-size: 3.125rem;
color: var(--gray-900);
font-weight: 500;
line-height: 100%;
letter-spacing: -0.125rem;
margin: 0;
font-family: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
"Segoe UI Symbol";
}

p {
margin: 0;
color: var(--gray-700);
}

main {
width: 100%;
min-height: 100%;
display: flex;
justify-content: center;
align-items: center;
padding: 1rem;
box-sizing: inherit;
position: relative;
}

.angular-logo {
max-width: 9.2rem;
}

.content {
display: flex;
justify-content: space-around;
width: 100%;
max-width: 700px;
margin-bottom: 3rem;
}

.content h1 {
margin-top: 1.75rem;
}

.content p {
margin-top: 1.5rem;
}

.divider {
width: 1px;
background: var(--red-to-pink-to-purple-vertical-gradient);
margin-inline: 0.5rem;
}

.pill-group {
display: flex;
flex-direction: column;
align-items: start;
flex-wrap: wrap;
gap: 1.25rem;
}

.pill {
display: flex;
align-items: center;
--pill-accent: var(--bright-blue);
background: color-mix(in srgb, var(--pill-accent) 5%, transparent);
color: var(--pill-accent);
padding-inline: 0.75rem;
padding-block: 0.375rem;
border-radius: 2.75rem;
border: 0;
transition: background 0.3s ease;
font-family: var(--inter-font);
font-size: 0.875rem;
font-style: normal;
font-weight: 500;
line-height: 1.4rem;
letter-spacing: -0.00875rem;
text-decoration: none;
}

.pill:hover {
background: color-mix(in srgb, var(--pill-accent) 15%, transparent);
}

.pill-group .pill:nth-child(6n + 1) {
--pill-accent: var(--bright-blue);
}
.pill-group .pill:nth-child(6n + 2) {
--pill-accent: var(--french-violet);
}
.pill-group .pill:nth-child(6n + 3),
.pill-group .pill:nth-child(6n + 4),
.pill-group .pill:nth-child(6n + 5) {
--pill-accent: var(--hot-red);
}

.pill-group svg {
margin-inline-start: 0.25rem;
}

.social-links {
display: flex;
align-items: center;
gap: 0.73rem;
margin-top: 1.5rem;
}

.social-links path {
transition: fill 0.3s ease;
fill: var(--gray-400);
}

.social-links a:hover svg path {
fill: var(--gray-900);
}

@media screen and (max-width: 650px) {
.content {
flex-direction: column;
width: max-content;
}

.divider {
height: 1px;
width: 100%;
background: var(--red-to-pink-to-purple-horizontal-gradient);
margin-block: 1.5rem;
}
}
</style>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Embedding a large block of CSS directly within <style> tags in the component's HTML template is generally discouraged in Angular applications. It mixes presentation logic with the template structure, which can make the component harder to read and maintain. It's a best practice to keep component-specific styles in the dedicated .scss file (app.component.scss) referenced by the styleUrl property in the component decorator. This promotes better separation of concerns and allows for easier management of styles, including leveraging SCSS features.

@gemini-code-assist
Copy link
Copy Markdown

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 is currently in preview and 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 to provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant