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

Красивая навигация #57

Closed
wants to merge 1 commit into from
Closed

Conversation

@vklachkov vklachkov changed the title feat(frontend/admin): Виртуальный список Красивая навигация Oct 7, 2024
@if (isParticipantsLoading) {
<!-- TODO(vklachkov): Wrap cards-container witgh nz-spin and remove if's and style hacks -->
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
<!-- TODO(vklachkov): Wrap cards-container witgh nz-spin and remove if's and style hacks -->
<!-- TODO(vklachkov): Wrap cards-container width nz-spin and remove if's and style hacks -->

max-width: var(--container-width);
left: 50%;
transform: translateX(-50%);
margin: 2em 0em;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Через padding если сделать не воркс?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Не работает. И по хорошему надо и margin убрать, а вместо него заиспользовать paddingstart от самой библиотеки

transform: translateX(-50%);
margin: 2em 0em;

app-participant-card {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Добавь карточке класс, а не делай селектор по тегу. Можно как раньше назвать "participant-card"

Copy link
Owner Author

Choose a reason for hiding this comment

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

А зачем тут класс? Компонент больше нигде не используется

@@ -79,6 +84,9 @@ export class OrganizerPage extends BaseComponent implements OnInit, OnDestroy {
protected readonly ParticipantStatus = ParticipantStatus;
protected readonly Sort = Sort;
protected readonly Order = Order;

private environmentInjector = inject(EnvironmentInjector);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
private environmentInjector = inject(EnvironmentInjector);
private readonly environmentInjector = inject(EnvironmentInjector);

@@ -89,6 +97,9 @@ export class OrganizerPage extends BaseComponent implements OnInit, OnDestroy {
protected participants: Participant[] = [];
protected isParticipantsLoading: boolean = false;

protected scrollElement = viewChild<ElementRef<HTMLDivElement>>('scrollElement')
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
protected scrollElement = viewChild<ElementRef<HTMLDivElement>>('scrollElement')
protected readonly scrollElement = viewChild<ElementRef<HTMLDivElement>>('scrollElement')

Вообще не помню, мб можно приватным полем сделать?
Ну и тип для этого всего

@@ -89,6 +97,9 @@ export class OrganizerPage extends BaseComponent implements OnInit, OnDestroy {
protected participants: Participant[] = [];
protected isParticipantsLoading: boolean = false;

protected scrollElement = viewChild<ElementRef<HTMLDivElement>>('scrollElement')
protected virtualizer: AngularVirtualizer<HTMLDivElement, Element>| null = null;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
protected virtualizer: AngularVirtualizer<HTMLDivElement, Element>| null = null;
protected virtualizer: AngularVirtualizer<HTMLDivElement, Element> | null = null;

Comment on lines +167 to -147
this.showErrorNotification('Ошибка при получении данных об участниках', err);

this.isParticipantsLoading = false;
this.cdr.markForCheck();
this.showErrorNotification('Ошибка при получении данных об участниках', err);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Эти нотификашки всегда в конце шли, везде так

@vklachkov
Copy link
Owner Author

Перенесено на 2025.

@vklachkov vklachkov closed this Nov 7, 2024
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