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

feat: lecture-5 HW #122

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Blake-In-Town
Copy link

No description provided.

Copy link
Owner

@Letto228 Letto228 left a comment

Choose a reason for hiding this comment

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

Привет!
Оставил пару комментариев, часть из них - вопросы, буду ждать твоего фидбека по ним. В остальном - МР пушка 🔥! Читается на одном дыхании, даже если уберешь комментарии (они мне тут кажутся излишними)

@@ -21,5 +21,6 @@ import {PopupHostModule} from './components/popup-host/popup-host.module';
PopupHostModule,
],
bootstrap: [AppComponent],
exports: [],
Copy link
Owner

Choose a reason for hiding this comment

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

Неплохо было бы подчистить)

Copy link
Author

Choose a reason for hiding this comment

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

Принял

@@ -26,4 +26,9 @@ export class ProductsListComponent implements OnInit {
// eslint-disable-next-line no-console
console.log(event);
}

onLoad(event: unknown) {
Copy link
Owner

Choose a reason for hiding this comment

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

Почему в типизации поставил unknown? Разве не известно, что будет приходить?

Copy link
Author

Choose a reason for hiding this comment

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

Это была заглушка про которую я потом забыл, исправлю

@@ -0,0 +1,4 @@
export enum LoadDirection {
UP,
Copy link
Owner

Choose a reason for hiding this comment

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

Лучше значениям enum давать говорящие имена, а не использовать дефолтные (0, 1, 2, ...)
Почему говорящие имена лучше? - если захотим добавить логирование или собирать метрики, то сделать это будет проще, т.к. будет отправляться не 0, 1 и т.д., а, например, before, after и т.д.

Copy link
Author

Choose a reason for hiding this comment

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

Спасибо за совет, думаю так действительно лучше

selector: '[appScrollWithLoading]',
})
export class ScrollWithLoadingDirective {
@Output() loadData = new EventEmitter<LoadDirection>();
Copy link
Owner

Choose a reason for hiding this comment

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

Я бы readonly добавил еще)

Copy link
Author

Choose a reason for hiding this comment

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

Принял

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.

2 participants