Skip to content

feat: update version to 20.2.0 and enhance snack bar styles with addi… #127

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

Merged
merged 2 commits into from
Jun 12, 2025

Conversation

pavankjadda
Copy link
Contributor

…tional options

@pavankjadda pavankjadda requested a review from Copilot June 12, 2025 03:30
@pavankjadda pavankjadda self-assigned this Jun 12, 2025
Copy link

netlify bot commented Jun 12, 2025

Deploy Preview for ng-kit ready!

Name Link
🔨 Latest commit bd58570
🔍 Latest deploy log https://app.netlify.com/projects/ng-kit/deploys/684a49eef8bb6500082f8206
😎 Deploy Preview https://deploy-preview-127--ng-kit.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the package version to 20.2.0 and enhances the snack bar styling options by expanding supported panelClass types and refining visual aspects. Key changes include:

  • Expanded MatSnackBarOptions panelClass to accept string or array values along with updated doc comments.
  • Updated snack-bar component templates to include inline style changes for mat-icon font sizes.
  • Enhanced CSS/SCSS assets with additional snack bar theme configurations and the inclusion of new asset entries in ng-package.json.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
projects/ng-kit/src/lib/services/mat-snack-bar.service.ts Updated documentation and type for panelClass in MatSnackBarOptions.
projects/ng-kit/src/lib/components/snack-bar/success-snack-bar/success-snack-bar.component.ts Adjusted inline styling for the success icon in the template.
projects/ng-kit/src/lib/components/snack-bar/error-snack-bar/error-snack-bar.component.ts Adjusted inline styling for the error icon in the template.
projects/ng-kit/src/assets/app-mat-snack-bar.css Added additional snack bar themes with !important flags.
projects/ng-kit/package.json Updated package version to 20.2.0.
projects/ng-kit/ng-package.json Added asset configuration for snack bar styles.
projects/ng-kit-demo/src/assets/app-mat-snack-bar.scss Synchronized SCSS snack bar styles updates with CSS changes.
package.json Updated package version to 20.2.0.


@Component({
selector: 'app-success-snack-bar',
imports: [MatButtonModule, MatIconModule],
template: `
<div class="custom-flex-center success-snackbar">
<mat-icon>check_circle</mat-icon>
<mat-icon style="font-size:1.3rem">check_circle</mat-icon>
Copy link
Preview

Copilot AI Jun 12, 2025

Choose a reason for hiding this comment

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

Consider moving the inline style (font-size) for the mat-icon to a CSS class in the component's stylesheet to improve consistency and maintainability.

Copilot uses AI. Check for mistakes.


@Component({
selector: 'app-error-snack-bar',
imports: [MatIconModule, MatButtonModule],
template: `
<div class="custom-flex-center error-snackbar">
<mat-icon>error</mat-icon>
<mat-icon style="font-size:1.3rem">error</mat-icon>
Copy link
Preview

Copilot AI Jun 12, 2025

Choose a reason for hiding this comment

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

Consider moving the inline style (font-size) for the mat-icon to a CSS class in the component's stylesheet to ensure consistency across components.

Copilot uses AI. Check for mistakes.

Comment on lines +5 to +15
--mdc-snackbar-container-color: var(--success-color) !important;
--mat-mdc-snack-bar-button-color: var(--white-color) !important;
}

.success-snackbar .mdc-snackbar__surface {
background-color: var(--success-color) !important;
color: white !important;
}

.success-snackbar .mat-mdc-snack-bar-action {
color: var(--white-color) !important;
Copy link
Preview

Copilot AI Jun 12, 2025

Choose a reason for hiding this comment

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

[nitpick] Review the necessity of using !important flags in your CSS rules; if specific selectors can be applied, removing !important may enhance future maintainability.

Suggested change
--mdc-snackbar-container-color: var(--success-color) !important;
--mat-mdc-snack-bar-button-color: var(--white-color) !important;
}
.success-snackbar .mdc-snackbar__surface {
background-color: var(--success-color) !important;
color: white !important;
}
.success-snackbar .mat-mdc-snack-bar-action {
color: var(--white-color) !important;
.app-container .success-snackbar {
--mdc-snackbar-container-color: var(--success-color);
--mat-mdc-snack-bar-button-color: var(--white-color);
}
}
.success-snackbar .mdc-snackbar__surface {
.app-container .success-snackbar .mdc-snackbar__surface {
background-color: var(--success-color);
color: white;
}
}
.success-snackbar .mat-mdc-snack-bar-action {
.app-container .success-snackbar .mat-mdc-snack-bar-action {
color: var(--white-color);
}

Copilot uses AI. Check for mistakes.

# Conflicts:
#	package.json
#	projects/ng-kit/package.json
@pavankjadda pavankjadda merged commit 506e7e0 into main Jun 12, 2025
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant