Skip to content

feat: migrated on new angular control flow (#DS-2872) #284

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 4 commits into from
Sep 20, 2024
Merged

Conversation

artembelik
Copy link
Contributor

No description provided.

Copy link

github-actions bot commented Sep 12, 2024

Visit the preview URL for this PR (updated for commit 318e4b8):

https://koobiq-next--prs-284-tbmhpcmy.web.app

(expires Tue, 24 Sep 2024 13:50:28 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: c9e37e518febda70d0317d07e8ceb35ac43c534c

@artembelik artembelik marked this pull request as ready for review September 16, 2024 12:15
Copy link
Contributor

@NikGurev NikGurev left a comment

Choose a reason for hiding this comment

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

Критичных проблем не увидел, только пару небольших моментов.

Good job!

Copy link
Contributor

@lskramarov lskramarov left a comment

Choose a reason for hiding this comment

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

Вообще совсем не понятно, что мы получаем от этого нового синтаксиса..

  • ни одного common модуля не удалено (как пишут в доке https://angular.dev/reference/migrations/control-flow)
  • сложные и большие шаблоны стали еще больше
    chrome_RpLKBiKyqH
  • if и for добавляет лишнюю обертку над компонентом
    chrome_Rk9BOLiSVn
    со структурными директивами подобное вообще в одну строку смотрится гораздо лучше и читабельнее.

Единственный + который я вижу в этом синтаксисе, это замена ng-container + *ngIf на больших "кусках" шаблона.

Предлагаю завтра на синке обсудить, возможно есть неочевидные плюсы..

/>
</ng-container>
@if (!isComponent(kbqContent)) {
@switch (true) {
Copy link
Contributor

Choose a reason for hiding this comment

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

какой то интересный свитч получился

Copy link
Contributor Author

Choose a reason for hiding this comment

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

изначально было не хуже
image

@artembelik
Copy link
Contributor Author

  • ни одного common модуля не удалено

хорошее замечание, поправлю

@artembelik
Copy link
Contributor Author

  • сложные и большие шаблоны стали еще больше

предлагаю отключить перенос тега на новую строку, только если не вмещается в 120 символов, как мы сделали в примитивах

@artembelik
Copy link
Contributor Author

Единственный + который я вижу в этом синтаксисе, это замена ng-container + *ngIf на больших "кусках" шаблона.

не нужно за собой тащить CommonModule, и как по мне темплейт становится читабельней, это дело привычки

@artembelik artembelik merged commit d8e3b90 into main Sep 20, 2024
3 checks passed
@artembelik artembelik deleted the feat/DS-2872 branch September 20, 2024 07:22
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.

5 participants