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

Add support for collapsing/expanding columns using a keyboard shortcut #10404

Merged
merged 96 commits into from Jun 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
8489108
Unlock selection highlight to be able to navigate within headers
budnix Mar 1, 2023
53c4ba8
Update header selection styling and add changelog entry file
budnix Mar 1, 2023
3ee22f5
[wip] Unify the selection/highlight types
budnix Mar 6, 2023
fb208e6
Create Scanner module for WoT selections
budnix Mar 13, 2023
d2232bb
Fix all selection edge cases reported by the tests
budnix Mar 15, 2023
9454283
Decouple Border module from Selection API
budnix Mar 16, 2023
a60b219
Fix linter complains
budnix Mar 16, 2023
a280312
Add missing code docs
budnix Mar 17, 2023
815c956
Update Walkontable E2E tests
budnix Mar 20, 2023
353c468
Allow using asciiTable by the Walkontable tests
budnix Mar 20, 2023
ab2ea43
Fix overlays sizing when the Selection API does not exist
budnix Mar 20, 2023
16c58c3
Clean up the code, complete code docs
budnix Mar 21, 2023
036f9c5
Remove isCell method call
budnix Mar 21, 2023
fa6a2be
Fix linter complains
budnix Mar 21, 2023
2fa4c00
Clean up the code and revert removed CellRange methods
budnix Mar 21, 2023
1710a60
Add unit tests for Selection class improve others one
budnix Mar 21, 2023
43dffd0
Extract table's E2E tests to separate files
budnix Mar 21, 2023
526b98a
Add E2E tests for new Wot Table class methods
budnix Mar 21, 2023
51990ca
Add tests for new Core methods
budnix Mar 21, 2023
441ea16
Merge branch 'feature/accessibility' into feature/dev-issue-1062
budnix Mar 21, 2023
829f7c0
Optimize elements scanning
budnix Mar 22, 2023
15913aa
Remove selection limits
budnix Mar 22, 2023
4176f8c
Unlock ability to navigate in headers
budnix Mar 27, 2023
db64b12
Fix focus selection in headers in some cases and add unit tests for
budnix Mar 28, 2023
4aee810
Cover `transformStart` Transformation class with new unit tests
budnix Mar 29, 2023
fd2ad7f
Implement the PoC of the `navigableHeaders` option
budnix Mar 30, 2023
6d2bc95
Fix transformEnd method and add unit tests
budnix Mar 30, 2023
387bcc1
Fix shortcuts context switching
budnix Mar 31, 2023
5d47b96
Fix selection issues pointed by failing E2E tests
budnix Apr 4, 2023
dc18360
Merge branch 'feature/accessibility' into feature/dev-issue-1062-part2
budnix Apr 5, 2023
826a895
Add support for row/col Transform modifiers
budnix Apr 5, 2023
aae99f0
Merge branch 'feature/dev-issue-1062-part2' of github.com:handsontabl…
budnix Apr 5, 2023
0bbcdea
Activate/Restore the correct shortcut context depends on the selection
budnix Apr 11, 2023
aafa69a
Fix isEntireSelected/isSelectedByHeader kind methods
budnix Apr 12, 2023
79902d4
Add support for selectionMode='single' option
budnix Apr 13, 2023
d7a664e
Disable headers selection when header is selected
budnix Apr 13, 2023
8ae3888
Fix selection expanding when header is only selected
budnix Apr 13, 2023
253523b
Withdraw from the idea of adding 'headers' shortcut context
budnix Apr 13, 2023
6df59b3
Add support for selecting rows/columns/cells when nav in headers is on
budnix Apr 14, 2023
c87f394
Add E2E tests for the selectColumns method
budnix Apr 14, 2023
744a233
Cover the `selectRows` method with tests
budnix Apr 17, 2023
6c387e5
Cover the `selectCells` method with tests
budnix Apr 17, 2023
b28cb52
Fix `toEqualCellRange` jasmine matcher
budnix Apr 18, 2023
4234648
Fix `toEqualCellRange` matcher logic
budnix Apr 18, 2023
3705bb2
Remove duplicate tests
budnix Apr 18, 2023
10223ff
Cover with tests more Selection module methods
budnix Apr 18, 2023
03aa2a4
Cover the `containsHeaders` method with tests and fix others
budnix Apr 20, 2023
22dd0b5
Add tests for arrow keys navigation
budnix Apr 20, 2023
c664269
Add tests for arrow keys navigation in RTL
budnix Apr 20, 2023
595da07
Add tests for arrow keys + cmd/ctrl mods
budnix Apr 21, 2023
c652ba9
Fix linter complains
budnix Apr 21, 2023
9522768
Add tests for the CopyPaste plugin
budnix Apr 21, 2023
0e35d42
Add tests for the MergeCells plugin
budnix Apr 21, 2023
b46668d
Simplify HiddenRows and HiddenColumns tests
budnix Apr 21, 2023
7f1c916
Simplify NeastedHeaders tests and general tests for Selection module
budnix Apr 21, 2023
ee20de7
Update TS definition files
budnix Apr 21, 2023
6558ac3
Add support for viewport scrolling when header is highlighted
budnix Apr 24, 2023
f6c35dd
Add support for focus navigation in nested headers
budnix Apr 24, 2023
ab169eb
Disable editor when the header is highlighted
budnix Apr 25, 2023
d20a1e6
Change how the whole rows/columns are selected
budnix May 10, 2023
231f12c
Implement navigation in headers for nested headers
budnix May 12, 2023
4ac11ce
Polish the code, remove the workarounds and precise navigation in nested
budnix May 15, 2023
bee3fc4
Update tests for nested headers using `toBeMatchToSelectionPattern`
budnix May 15, 2023
7e6f9f2
Fix highlight/focus shift bug for hidden indexes
budnix May 16, 2023
dfa0929
Fix renderable coordinates for highlight/focus shift bug
budnix May 16, 2023
dd04135
Fix highlight/focus position after changing values in index mapper
budnix May 16, 2023
4908a99
Add tests that covers navigation in nested headers
budnix May 22, 2023
d49b6ae
Add tests that covers navigation in collapsible columns
budnix May 22, 2023
26b7afb
Add tests for selection with mouse interactions
budnix May 23, 2023
076a10b
Cover the new TableView methods with tests
budnix May 24, 2023
c93daee
Revert support for selection extending shortcuts in headers
budnix May 24, 2023
e06953a
Add support for navigation moving when rows/cols are hidden
budnix May 29, 2023
d1d3b5b
Merge branch 'feature/accessibility' into feature/dev-issue-1062-part2
budnix May 29, 2023
d911940
Add support for selection expanding when headers are selected
budnix May 30, 2023
f49569b
Fix headers and corner highlighting when there are no rows
budnix May 31, 2023
74870b2
Add tests for navigation up and down in headers with corner
budnix May 31, 2023
93e34dc
Extend selectAll methods for ability to change the focus position
budnix May 31, 2023
8d2c31b
Add support for keyboard shortcuts that allows selecting all rows/column
budnix May 31, 2023
40fedbc
Cover with tests the selectColumns/Rows and selectAll methods
budnix Jun 1, 2023
e62200d
Add changelog entry
budnix Jun 2, 2023
4667acd
Add support for column selection for nested headers
budnix Jun 2, 2023
d1e8647
Fix a bug that disallows expanding selection for selected columns
budnix Jun 5, 2023
e083ac5
Add tests for new keyboard shortcuts
budnix Jun 6, 2023
4af7cf5
Add missing TS definitions for new hooks
budnix Jun 6, 2023
18b4623
Cover new hooks with E2E tests
budnix Jun 6, 2023
4f4dbd0
Cover with tests fix for shortcut manager stopPropagation option
budnix Jun 7, 2023
aa25cac
Precise the code documentation
budnix Jun 7, 2023
b605eca
Fix Delete keyboard shortcut when header is selected
budnix Jun 7, 2023
af9cd79
Fix wrong header selection when selectAll method was used
budnix Jun 7, 2023
4c99381
Apply suggestions from code review
budnix Jun 12, 2023
b298df1
Merge branch 'feature/dev-issue-1062-part2' into feature/dev-issue-1083
budnix Jun 12, 2023
6f6a47a
Improve the PageUp/Down keyboard shortcuts functionality
budnix Jun 12, 2023
f163bc6
Merge branch 'develop' into feature/dev-issue-1062-part2
budnix Jun 12, 2023
61b0875
Merge branch 'feature/dev-issue-1062-part2' into feature/dev-issue-1083
budnix Jun 12, 2023
b190267
Add support for collapsing/expanding columns using a kbd. shortcut
budnix Jun 12, 2023
086cb13
Add changelog entry file
budnix Jun 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions .changelogs/10389.json
@@ -0,0 +1,8 @@
{
"issuesOrigin": "private",
"title": "Added support for keyboard shortcuts that allows selecting all rows and columns and add 4 new hooks",
"type": "added",
"issueOrPR": 10389,
"breaking": false,
"framework": "none"
}
8 changes: 8 additions & 0 deletions .changelogs/10396.json
@@ -0,0 +1,8 @@
{
"issuesOrigin": "private",
"title": "Rewritten the Angular wrapper to be based on Angular@12 and to support Angular versions 12 and above.",
"type": "added",
"issueOrPR": 10396,
"breaking": true,
"framework": "angular"
}
8 changes: 8 additions & 0 deletions .changelogs/10404.json
@@ -0,0 +1,8 @@
{
"issuesOrigin": "private",
"title": "Added support for collapsing/expanding columns using a keyboard shortcut.",
"type": "added",
"issueOrPR": 10404,
"breaking": false,
"framework": "none"
}
2 changes: 0 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Expand Up @@ -15,8 +15,6 @@ body:
attributes:
label: Video/Screenshots
description: Please provide a screenshot or a short video presenting the issue.
validations:
required: true
- type: input
id: demo
attributes:
Expand Down
77 changes: 16 additions & 61 deletions .github/workflows/code-examples.yml
Expand Up @@ -43,18 +43,10 @@ on:

env:
NODE_VERSION: 16
NODE_MODULES_PATHS: |
./node_modules
./handsontable/node_modules/
./wrappers/angular/node_modules/
./wrappers/react/node_modules/
./wrappers/vue/node_modules/
./wrappers/vue3/node_modules/
./visual-tests/node_modules/

jobs:
prepare-matrix:
name: Prepare the version Matrix and cache dependencies.
name: Prepare the version Matrix.
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
outputs:
Expand All @@ -69,12 +61,6 @@ jobs:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- run: npm ci --no-audit
- uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # https://github.com/actions/cache/releases/tag/v3.0.11
with:
path: ${{ env.NODE_MODULES_PATHS }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- id: get-dispatch-value
run: echo "matrix=${{ format('[\"{0}\"]', github.event.inputs.hotVersion) }}" >> $GITHUB_OUTPUT
if: github.event_name == 'workflow_dispatch'
Expand Down Expand Up @@ -121,12 +107,8 @@ jobs:
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # https://github.com/actions/setup-node/releases/tag/v3.5.1
with:
node-version: ${{ env.NODE_VERSION }}
- uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # https://github.com/actions/cache/releases/tag/v3.0.11
with:
path: ${{ env.NODE_MODULES_PATHS }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
cache: 'npm'
- run: npm ci --no-audit
- name: Build
run: |
cd handsontable
Expand All @@ -151,12 +133,8 @@ jobs:
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # https://github.com/actions/setup-node/releases/tag/v3.5.1
with:
node-version: ${{ env.NODE_VERSION }}
- uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # https://github.com/actions/cache/releases/tag/v3.0.11
with:
path: ${{ env.NODE_MODULES_PATHS }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
cache: 'npm'
- run: npm ci --no-audit
- name: Build
run: |
cd handsontable
Expand All @@ -182,12 +160,8 @@ jobs:
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # https://github.com/actions/setup-node/releases/tag/v3.5.1
with:
node-version: ${{ env.NODE_VERSION }}
- uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # https://github.com/actions/cache/releases/tag/v3.0.11
with:
path: ${{ env.NODE_MODULES_PATHS }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
cache: 'npm'
- run: npm ci --no-audit
- name: Download the Handsontable build artifact
uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # https://github.com/actions/download-artifact/releases/tag/v3.0.1
with:
Expand Down Expand Up @@ -218,12 +192,8 @@ jobs:
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # https://github.com/actions/setup-node/releases/tag/v3.5.1
with:
node-version: ${{ env.NODE_VERSION }}
- uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # https://github.com/actions/cache/releases/tag/v3.0.11
with:
path: ${{ env.NODE_MODULES_PATHS }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
cache: 'npm'
- run: npm ci --no-audit
- name: Download the Handsontable build artifact
uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # https://github.com/actions/download-artifact/releases/tag/v3.0.1
with:
Expand Down Expand Up @@ -254,12 +224,8 @@ jobs:
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # https://github.com/actions/setup-node/releases/tag/v3.5.1
with:
node-version: ${{ env.NODE_VERSION }}
- uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # https://github.com/actions/cache/releases/tag/v3.0.11
with:
path: ${{ env.NODE_MODULES_PATHS }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
cache: 'npm'
- run: npm ci --no-audit
- name: Download the Handsontable build artifact
uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # https://github.com/actions/download-artifact/releases/tag/v3.0.1
with:
Expand Down Expand Up @@ -290,12 +256,8 @@ jobs:
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # https://github.com/actions/setup-node/releases/tag/v3.5.1
with:
node-version: ${{ env.NODE_VERSION }}
- uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # https://github.com/actions/cache/releases/tag/v3.0.11
with:
path: ${{ env.NODE_MODULES_PATHS }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
cache: 'npm'
- run: npm ci --no-audit
- name: Download the Handsontable build artifact
uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # https://github.com/actions/download-artifact/releases/tag/v3.0.1
with:
Expand Down Expand Up @@ -337,9 +299,7 @@ jobs:
fail-fast: false
matrix:
version: ${{fromJson(needs.prepare-matrix.outputs.versions)}}
# TODO: IMPORTANT! Add `angular` to the list below after fixing the issue described in
# https://github.com/handsontable/dev-handsontable/issues/1292
framework: [angular-9, angular-10, angular-11, angular-12, angular-13, js, react, vue, vue3, ts]
framework: [angular, angular-12, angular-13, angular-14, angular-15, angular-16, js, react, vue, vue3, ts]

env:
FRAMEWORK_EXAMPLES_PATH: examples/${{ matrix.version }}/docs/${{ matrix.framework }}
Expand All @@ -356,13 +316,8 @@ jobs:
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # https://github.com/actions/setup-node/releases/tag/v3.5.1
with:
node-version: ${{ env.NODE_VERSION }}
- uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # https://github.com/actions/cache/releases/tag/v3.0.11
if: steps.path-check.outputs.n-a != 'true'
with:
path: ${{ env.NODE_MODULES_PATHS }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
cache: 'npm'
- run: npm ci --no-audit

# ---------------------------------------------------------
# --- Only applicable if processing the `next` version. ---
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/docs-linter.yml
Expand Up @@ -18,19 +18,20 @@ jobs:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # https://github.com/actions/checkout/releases/tag/v3.1.0

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # https://github.com/actions/setup-node/releases/tag/v3.5.1
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # https://github.com/actions/setup-node/releases/tag/v3.6.0
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'

- name: Install Handsontable dependencies
run: |
npm ci --no-audit
cache-dependency-path: docs/package-lock.json

- name: Install Documentation dependencies
run: |
cd docs/ && npm ci --no-audit

- name: Install Handsontable dependencies
run: |
npm ci --no-audit

- name: Lint
run: |
cd docs/ && npm run docs:lint
8 changes: 4 additions & 4 deletions .github/workflows/docs-staging.yml
Expand Up @@ -35,15 +35,15 @@ jobs:
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login -u ${GITHUB_ACTOR} --password-stdin https://docker.pkg.github.com

- name: Install the monorepo dependencies and build the packages
- name: Install the documentation dependencies
run: |
cd ..
npm ci
npm run all build -- --e examples visual-tests

- name: Install the documentation dependencies
- name: Install the monorepo dependencies and build the packages
run: |
cd ..
npm ci
npm run all build -- --e examples visual-tests

- name: Generate API references
run: |
Expand Down
17 changes: 9 additions & 8 deletions docs/.vuepress/handsontable-manager/dependencies.js
Expand Up @@ -22,7 +22,7 @@ const getPackageUrls = (packageName, version, fileSelection) => {
js: 'react-handsontable.min.js'
},
'@handsontable/angular': {
js: 'handsontable-angular.umd.min.js',
js: 'handsontable-angular.umd.js',
subDir: 'bundles/'
},
'@handsontable/vue': {
Expand Down Expand Up @@ -91,13 +91,14 @@ const buildDependencyGetter = (version) => {
redux: ['https://cdn.jsdelivr.net/npm/redux@4/dist/redux.min.js', []],
rxjs: ['https://cdn.jsdelivr.net/npm/rxjs@6/bundles/rxjs.umd.js', [/* todo */]],
'core-js': ['https://cdn.jsdelivr.net/npm/core-js@2/client/core.min.js', [/* todo */]],
zone: ['https://cdn.jsdelivr.net/npm/zone.js@0.9/dist/zone.min.js', [/* todo */]],
'angular-compiler': ['https://cdn.jsdelivr.net/npm/@angular/compiler@8/bundles/compiler.umd.min.js', [/* todo */]],
'angular-core': ['https://cdn.jsdelivr.net/npm/@angular/core@8/bundles/core.umd.min.js', [/* todo */]],
'angular-common': ['https://cdn.jsdelivr.net/npm/@angular/common@8/bundles/common.umd.min.js', [/* todo */]],
'angular-forms': ['https://cdn.jsdelivr.net/npm/@angular/forms@7/bundles/forms.umd.min.js', [/* todo */]],
'angular-platform-browser': ['https://cdn.jsdelivr.net/npm/@angular/platform-browser@8/bundles/platform-browser.umd.min.js', [/* todo */]],
'angular-platform-browser-dynamic': ['https://cdn.jsdelivr.net/npm/@angular/platform-browser-dynamic@8/bundles/platform-browser-dynamic.umd.min.js', [/* todo */]],
zone: ['https://cdn.jsdelivr.net/npm/zone.js@0.11.4/dist/zone.min.js', [/* todo */]],
'angular-compiler': ['https://cdn.jsdelivr.net/npm/@angular/compiler@12/bundles/compiler.umd.min.js', [/* todo
*/]],
'angular-core': ['https://cdn.jsdelivr.net/npm/@angular/core@12/bundles/core.umd.min.js', [/* todo */]],
'angular-common': ['https://cdn.jsdelivr.net/npm/@angular/common@12/bundles/common.umd.min.js', [/* todo */]],
'angular-forms': ['https://cdn.jsdelivr.net/npm/@angular/forms@12/bundles/forms.umd.min.js', [/* todo */]],
'angular-platform-browser': ['https://cdn.jsdelivr.net/npm/@angular/platform-browser@12/bundles/platform-browser.umd.min.js', [/* todo */]],
'angular-platform-browser-dynamic': ['https://cdn.jsdelivr.net/npm/@angular/platform-browser-dynamic@12/bundles/platform-browser-dynamic.umd.min.js', [/* todo */]],
'hot-angular': [getPackageUrls('@handsontable/angular', version, 'js'), [/* todo */]],
'hot-vue': [getPackageUrls('@handsontable/vue', version, 'js'), [/* todo */], null, 'hot-vue3'],
'hot-vue3': [getPackageUrls('@handsontable/vue3', version, 'js'), [/* todo */], null, 'hot-vue'],
Expand Down