Skip to content
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

refactor: use angular signals, standalone component #179

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

lekhmanrus
Copy link

Please check if the PR fulfills these requirements

  • The commit messages follow these guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (check one with "x")

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other. Please describe:

If it is a Bugfix, please describe the root cause and what could have been done to prevent it…

What is the current behavior? (You can link to an open issue here, add screenshots…)
Regular @Inputs used as well as OnChanges hook.

What is the new behavior?
Angular Signals with build-in validation; refactored to standalone components.

Does this PR introduce a breaking change? (check one with "x")

  • Yes
  • No

If this PR contains a breaking change, please describe the impact and migration
path for existing applications: …

Other information (if applicable):
close #158

I would suggest using versions consistent with major Angular versions. Let's say ngx-skeleton-loader v18 for Angular v18, etc.

Please @mention @people to review this PR…
@willmendesneto

Copy link
Owner

@willmendesneto willmendesneto left a comment

Choose a reason for hiding this comment

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

🚀 Thanks for your contribution. 🚀

In regards of your question of Angular deps, this package (along all angular modules in general) should cover the actively supported versions. More details in these links:

In summary, nicely done! I'm adding some comments since some checks were removed when they shouldn't and the pull request is dealing with 2 different issues at the same time, which increases the level of validation.

Feel free to ping if you need more info

providers: [{ provide: PLATFORM_ID, useValue: 'browser' }],
}).createComponent(ContainerComponent);
fixture.detectChanges();
}));

it('should console 3 errors if `animation`, `appearance` and `count` receives invalid options in development mode', () => {
Copy link
Owner

Choose a reason for hiding this comment

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

These tests are still relevant for consumers. Could you add them back, and the code to support those tests as well, please?

}
}
this.items.length = this.count;

const allowedAnimations = ['progress', 'progress-dark', 'pulse', 'false'];
Copy link
Owner

Choose a reason for hiding this comment

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

The code needs all these validations still. Could you add them back, please?

>
@if (appearance === 'custom-content') {
@if (appearanceValue === 'custom-content') {
Copy link
Owner

Choose a reason for hiding this comment

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

👏 👏 👏

import { NgxSkeletonLoaderModule } from '../../projects/ngx-skeleton-loader/src/lib/ngx-skeleton-loader.module';
import {
NgxSkeletonLoaderModule
} from 'ngx-skeleton-loader';
Copy link
Owner

Choose a reason for hiding this comment

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

Thanks, mate!

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.

Make ngx-skeleton-loader standalone compliant
2 participants