Skip to content

Commit

Permalink
refactor: not necessary styles (#6489)
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode authored Jan 19, 2024
1 parent d117416 commit 2720e44
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 21 deletions.
2 changes: 0 additions & 2 deletions projects/demo-cypress/cypress/support/helpers/visit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ export function tuiVisit(path: string, options: TuiVisitOptions = {}): void {
waitAllRequests('@icons');
}

cy.get(`${rootSelector}._is-cypress-mode`).as('app');

if (hideCursor) {
cy.get('@app').invoke('addClass', '_hide-cursor');
}
Expand Down
7 changes: 1 addition & 6 deletions projects/demo/src/modules/app/abstract.app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,14 @@ export abstract class AbstractDemoComponent implements OnInit {
@HostBinding('attr.data-tui-major-version')
protected readonly majorVersion = this.selectedVersion?.title;

// TODO: use inject(TUI_IS_E2E) in angular v14+
@HostBinding('class._is-cypress-mode')
protected readonly isE2EMode = this.isE2E;

@HostBinding('class._loaded')
protected readonly pageLoadedInit = '0';

// TODO: use inject(TUI_DOC_PAGE_LOADED) in angular v14+
@HostBinding('$.class._loaded')
protected readonly pageLoaded = this.pageLoaded$;

constructor(
protected readonly isE2E: boolean,
protected constructor(
protected readonly pageLoaded$: Observable<boolean>,
protected readonly selectedVersion: TuiVersionMeta | null,
) {}
Expand Down
5 changes: 2 additions & 3 deletions projects/demo/src/modules/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {NavigationEnd, Router} from '@angular/router';
import {changeDetection} from '@demo/emulate/change-detection';
import {LOCAL_STORAGE} from '@ng-web-apis/common';
import {TUI_DOC_PAGE_LOADED} from '@taiga-ui/addon-doc';
import {TUI_IS_E2E, TuiDestroyService, TuiResizeService} from '@taiga-ui/cdk';
import {TuiDestroyService, TuiResizeService} from '@taiga-ui/cdk';
import {distinctUntilChanged, filter, map, Observable, takeUntil} from 'rxjs';

import {AbstractDemoComponent, DEMO_PAGE_LOADED_PROVIDER} from './abstract.app';
Expand Down Expand Up @@ -35,7 +35,6 @@ export class AppComponent extends AbstractDemoComponent implements OnInit {
);

constructor(
@Inject(TUI_IS_E2E) isE2E: boolean,
@Inject(TUI_DOC_PAGE_LOADED) pageLoaded$: Observable<boolean>,
@Inject(TUI_SELECTED_VERSION_META) selectedVersion: TuiVersionMeta | null,
@Inject(Router) protected readonly router: Router,
Expand All @@ -45,7 +44,7 @@ export class AppComponent extends AbstractDemoComponent implements OnInit {
@Inject(APP_BASE_HREF) private readonly appBaseHref: string,
@Inject(YaMetrikaService) private readonly ym: YaMetrikaService,
) {
super(isE2E, pageLoaded$, selectedVersion);
super(pageLoaded$, selectedVersion);
}

override async ngOnInit(): Promise<void> {
Expand Down
1 change: 0 additions & 1 deletion projects/demo/src/modules/app/app.style.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
@import '@taiga-ui/core/styles/taiga-ui-fonts.less';
@import '@taiga-ui/addon-mobile/styles/taiga-ui-mobile.less';
@import '@taiga-ui/styles/taiga-ui-global.less';
@import './cypress';

app {
display: block;
Expand Down
9 changes: 0 additions & 9 deletions projects/demo/src/modules/app/cypress.less

This file was deleted.

0 comments on commit 2720e44

Please sign in to comment.