Skip to content

Commit c2fc53d

Browse files
MayaKirovampavlinov
authored andcommitted
Resize Observer Implementation for handling container/content size changes. (#5603)
* refactor(igx-grid): Resize observers and batch cdr calls * refactor(igx-grid): Width calcs fixes and test fixes * refactor(igx-grid): Hiding,pinning and resizing tests * refactor(treeGrid): Update failing treeGrid tests * refactor(treeGrid): Update failing treeGrid test * refactor(igx-grid): Fix summaries recalc. Modified tests * refactor(treeGrid): Update treeGrid failing test * refactor(igx-grid): Column summary input. Clean-up tests. * refactor(grid): update failing grid tests * chore(*): Applying notifyChanges logic in HierarchicalGrid to handle changes in size. Removing updateParentSizes func since this is already handled by the resize observer logic. Removing all requestAnimationFrame calls. * chore(*): Add mark for check when density is changed to reflect changes in children. * refactor(igx-grid): Revert some changes. Adjust some tests * chore(*): Fixing some scenarios where child grid does not detect change when data/columns change. Fixing some tests. * refactor(igx-grid): More test adjustments * chore(*): Fixing some tests with more change detection. * chore(*): Making sure that after resize observer is triggered all parent grids recalculate their sizes and reflow in case scrollbars should appear. * chore(*): Fixing lint. * chore(*): Updating hgrid tests with more change detection. * chore(*): When szies are updated , chunk size/scroll position may change as well. Making sure all are updated as needed. * refactor(igx-grid): Search refactor. Test fixes * chore(*): Adding auto-size sample width grid. * chore(*): Removing _autoSize flag. Exposing func that determines if grid should be auto-sized depending on container size availability. Overwriting for hierarchical grid scenarios where child grids should always be auto-sized. * refactor(igx-grid): Set a default column width on first column init * refactor(igx-grid): Initial column width * chore(*): Moving display container observer inside the igxForOf so that it can be used for all content size change calculations. * chore(*): Moving observer in igGridForOf so as not to affect other controls. * chore(*): Fixing timing issues in tests by waiting for the resize observer to trigger when neccesary. * Revert "chore(*): Moving observer in igGridForOf so as not to affect other controls." This reverts commit 07467d2. * chore(*): Fixing some of the timing issues with tests. * chore(*): Updating tests since column size are recalculated when hide/show extra feature columns so setting width so that scrollbar can be generated. * chore(*): Fixing test timing. * chore(*): Fix for scenarios where column is pinned before ViewInit. * chore(*): Fixing test. * chore(*): Fixing test. * chore(*): Fixing tests. * chore(*): Fixing merge issue, * chore(*): Fixing lint. * chore(*): Adding simpler sample scenario with flex styles and multiple grids with % width/height. * chore(*): In case grid parent container is flex and it extends based on rendered content and grid height is 100% then grid should auto-size to prevent container from changing size contstanly. Additionally removing additional 1px width applied to containers since they also extend parent and cause resize observer to constantly trigger changes. * chore(*): update summaries dev sample * chore(*): Setting karma to run in chrome headless to conserve some memory. * chore(*): Removing unnecessary requestAnimationFrame in onDensityChanged which messes with the igxForOf resize observer. * chore(*): Removing calcHeight setting that does not make sense. Using notifyChanges instead to recalculate grid sizes. * chore(*): Make sure groupingExpressions changes are not compared before grid is initialized. * chore(*): Use same logic as in column in the column pinning component (toolbar) when determining if a column is pinnable. * chore(*): Removing unnecessary search refresh that triggers endEdit. * chore(*): Fixing samples. * chore(*): Recalc sizes also onScroll. * chore(*): In case master cache directive is changed during an action that requires change detection, make sure that the master directive is updated before calculating teh related sizeCache. * chore(*): Check if giving node more heap mem helps with tests that timeout. * chore(grid): remoing some 'todos's * chore(*): restoring wrongly deleted sample * chore(*): Adding resize-observer to package dependencies. * chore(*): Return karma and travis config to original state. * chore(*): xiting flickering test * chore(*): xiting the other failing test * test(*): splitting test execution because of mls #5529 * chore(*): fixing coverage * test(*): splitting test runs for azure #4908 * chore(*): adding install -g permissions for azure * chore(*): resolving issues with karma confs
1 parent 1d44603 commit c2fc53d

File tree

105 files changed

+2955
-1482
lines changed

Some content is hidden

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

105 files changed

+2955
-1482
lines changed

.travis.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,16 @@ before_script:
1717
# more heap mem per https://github.com/angular/angular-cli/issues/12645, https://github.com/npm/npm/issues/12238#issuecomment-367147962
1818
- export NODE_OPTIONS="--max_old_space_size=4096"
1919
- npm install -g gulp
20+
- npm install -g istanbul-combine
2021
script:
2122
- npm run lint:lib
2223
- ng build igniteui-angular --prod
2324
- npm run build:style
24-
- if [ -z "${TRAVIS_TAG}" ]; then npm run test:lib; fi
25+
- if [ -z "${TRAVIS_TAG}" ]; then npm run test:lib:others; fi
26+
- if [ -z "${TRAVIS_TAG}" ]; then npm run test:lib:grid; fi
27+
- if [ -z "${TRAVIS_TAG}" ]; then npm run test:lib:tgrid; fi
28+
- if [ -z "${TRAVIS_TAG}" ]; then npm run test:lib:hgrid; fi
29+
- if [ -z "${TRAVIS_TAG}" ]; then istanbul-combine -d coverage -p none -r lcov -r html coverage/hierarchical-grid/coverage-final.json coverage/tree-grid/coverage-final.json coverage/non-grid/coverage-final.json coverage/grid/coverage-final.json; fi
2530
- if [ -z "${TRAVIS_TAG}" ]; then npm run test:schematics; fi
2631
- if [ -z "${TRAVIS_TAG}" ] && [ "${TRAVIS_REPO_SLUG}" == "IgniteUI/igniteui-angular" ]; then cat ./coverage/lcov.info | coveralls; fi
2732

azure-pipelines.yml

+27-2
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,42 @@ steps:
77
env:
88
AZURE_PIPELINES: "true"
99

10+
- script: sudo npm install -g istanbul-combine
11+
displayName: 'Install coverage combiner'
12+
env:
13+
AZURE_PIPELINES: "true"
14+
1015
- script: npm run lint:lib
1116
displayName: 'Run lint'
1217

1318
- script: npm run build:lib
1419
displayName: 'Build source code and styles'
1520

16-
- script: npm run test:lib:azure
17-
displayName: 'Run tests'
21+
- script: npm run test:lib:azure:others
22+
displayName: 'Run non-grid tests'
23+
env:
24+
NODE_OPTIONS: "--max_old_space_size=4096"
25+
26+
- script: npm run test:lib:azure:grid
27+
displayName: 'Run grid tests'
1828
env:
1929
NODE_OPTIONS: "--max_old_space_size=4096"
2030

31+
- script: npm run test:lib:azure:tgrid
32+
displayName: 'Run tree grid tests'
33+
env:
34+
NODE_OPTIONS: "--max_old_space_size=4096"
35+
36+
- script: npm run test:lib:azure:hgrid
37+
displayName: 'Run hierarchical grid tests'
38+
env:
39+
NODE_OPTIONS: "--max_old_space_size=4096"
40+
41+
- script: istanbul-combine -d coverage -p none -r lcov -r cobertura coverage/hierarchical-grid/coverage-final.json coverage/tree-grid/coverage-final.json coverage/non-grid/coverage-final.json coverage/grid/coverage-final.json
42+
displayName: 'Combine coverage results'
43+
env:
44+
AZURE_PIPELINES: "true"
45+
2146
- script: cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
2247
condition: and(succeeded(), eq(variables['system.teamProject'], 'igniteui-angular'))
2348
displayName: 'Code coverage @ Coveralls'

0 commit comments

Comments
 (0)