Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 786f87c

Browse files
feat(template): introduce experimental virtual-scrolling sub-package (#1539)
* feat(template): introduce experimental virtual-scrolling package * docs: add docs for virtual-scrolling package * feat(demos): add virtual scrolling demo application * chore: cleanup docs * fix(template): rxVirtualFor: fix static and cleanup api * refactor(template): virtual-scrolling: simplify code base * fix(template): rxVirtualFor: react to mutable input changes * refactor(template): cleanup virtual-scrolling interfaces * fix(template): dynamicSize properly calculates scrolledIndex & range * refactor(demos): improve virtual scrolling demo * refactor(template): remove iterable differ from dynamicSize * perf(template): replace iterable differ for autosize * refactor(template): make sync scrollbar styles configurable * refactor(template): remove viewRange from VirtualScrollViewport * refactor(template): autosize listens to resize events earlier * refactor(demos): adjust demo app * refactor(template): improve autosize diffing * refactor(template): improve autosize viewport caching * test(template): implement component-tests for experimental virtual-scrolling (#1542) * test(template): setup cypress component tests * test(template): implement first test for virtual-scrolling * test(template): implement tests for DynamicSizeVirtualScrollStrategy * test(template): implement tests for AutosizeVirtualScrollStrategy * test(template): stabilize virtual scrolling component tests for CI * chore: integrate component-test into ci * test(template): fix jest & cypress type conflict * chore: fix broken html-webpack-plugin dependency * chore: stick to node lts version in ci * chore: stick to latest working node version in ci * chore: properly execute component-test in ci * docs(template): polish virtual-scrolling docs Co-authored-by: Kirill <[email protected]> * refactor(template): rename Autosize ScrollStrategy to be consistent * docs(template): improve virtual-scrolling docs * test(template): fix autosize runway height test --------- Co-authored-by: Kirill <[email protected]>
1 parent 43ee8f7 commit 786f87c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+6158
-43
lines changed

.github/actions/setup/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ inputs:
44
node-version:
55
description: Node.js version
66
required: false
7-
default: '18'
7+
default: '18.15.0' # latest working version for our CI
88
runs:
99
using: composite
1010
steps:

.github/workflows/build-and-test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ jobs:
114114
- name: Run Affected e2e
115115
run: yarn nx affected:e2e --max-parallel=1
116116

117+
# component test: no clue about parallelism here
118+
- name: Run Affected component tests
119+
run: yarn nx affected -t component-test --parallel=false
120+
117121
- name: Stop Nx Cloud DTE agents
118122
if: ${{ always() }}
119123
run: yarn nx-cloud stop-all-agents
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export const RX_VIRTUAL_FOR_MENU_ITEMS = [
2+
{
3+
label: 'Feature Showcase',
4+
link: 'showcase',
5+
},
6+
];
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { NgModule } from '@angular/core';
2+
import { RouterModule } from '@angular/router';
3+
4+
export const ROUTES = [
5+
{
6+
path: '',
7+
redirectTo: 'showcase',
8+
},
9+
{
10+
path: 'showcase',
11+
loadChildren: () =>
12+
import('./virtual-rendering/virtual-for-experiments.module').then(
13+
(m) => m.RxVirtualForModule
14+
),
15+
},
16+
];
17+
18+
@NgModule({
19+
imports: [RouterModule.forChild(ROUTES)],
20+
declarations: [],
21+
})
22+
export class RxVirtualForDemoModule {}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import { ScrollingModule as AutosizedScrollingModule } from '@angular/cdk-experimental/scrolling';
2+
import { ScrollingModule } from '@angular/cdk/scrolling';
3+
import { CommonModule } from '@angular/common';
4+
import { NgModule } from '@angular/core';
5+
import { MatButtonModule } from '@angular/material/button';
6+
import { MatButtonToggleModule } from '@angular/material/button-toggle';
7+
import { MatInputModule } from '@angular/material/input';
8+
import { RouterModule } from '@angular/router';
9+
import {
10+
AutoSizeVirtualScrollStrategy,
11+
DynamicSizeVirtualScrollStrategy,
12+
FixedSizeVirtualScrollStrategy,
13+
RxVirtualScrollViewportComponent,
14+
RxVirtualFor,
15+
} from '@rx-angular/template/experimental/virtual-scrolling';
16+
import { RxFor } from '@rx-angular/template/for';
17+
import { RxIf } from '@rx-angular/template/if';
18+
import { LetDirective } from '@rx-angular/template/let';
19+
import { StrategySelectModule } from '../../../../shared/debug-helper/strategy-select/index';
20+
import { ValueProvidersModule } from '../../../../shared/debug-helper/value-provider/index';
21+
import { VirtualForTestComponent } from './virtual-for-test.component';
22+
23+
@NgModule({
24+
imports: [
25+
RouterModule.forChild([
26+
{
27+
path: '',
28+
component: VirtualForTestComponent,
29+
},
30+
]),
31+
ValueProvidersModule,
32+
LetDirective,
33+
AutosizedScrollingModule,
34+
ScrollingModule,
35+
AutoSizeVirtualScrollStrategy,
36+
MatButtonModule,
37+
MatInputModule,
38+
FixedSizeVirtualScrollStrategy,
39+
DynamicSizeVirtualScrollStrategy,
40+
RxVirtualFor,
41+
StrategySelectModule,
42+
MatButtonToggleModule,
43+
CommonModule,
44+
RxIf,
45+
RxVirtualScrollViewportComponent,
46+
RxFor,
47+
],
48+
declarations: [VirtualForTestComponent],
49+
providers: [],
50+
})
51+
export class RxVirtualForModule {}

0 commit comments

Comments
 (0)