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

Refactor ToggleButton and ToggleGroup #3509

Closed
wants to merge 50 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
aa8c514
fix: remove the DigitizeButton
dnlkoch Sep 4, 2023
7c5e80d
Merge pull request #3493 from terrestris/remove-digitize-button
dnlkoch Sep 4, 2023
e66738e
refactor: remove deprecated HOC components
annarieger Sep 4, 2023
e8eeaa8
Merge pull request #3496 from terrestris/remove-hocs
annarieger Sep 4, 2023
daa2de6
chore: update several dependencies
dnlkoch Sep 4, 2023
e1ef868
chore: :lipstick:
dnlkoch Sep 4, 2023
75a86da
chore: set updated plugin name
dnlkoch Sep 4, 2023
b9ad1ce
build: update enzyme adapter
dnlkoch Sep 4, 2023
01f9599
build: include TextDecode and TextEncoder
dnlkoch Sep 4, 2023
f65318d
build: wrap several tests in act()
dnlkoch Sep 4, 2023
76d5d02
build: disable assertions, toBeVisible() isn't working for the model …
dnlkoch Sep 4, 2023
301c69d
build: temporarily disable/remove inkmap dependencies
dnlkoch Sep 4, 2023
8cc903e
build: ignore some context typings (should be fixed as well)
dnlkoch Sep 4, 2023
b0f873c
fix: make use of dayjs
dnlkoch Sep 4, 2023
89c8749
build: antd.variable.css doesn’t exist anymore
dnlkoch Sep 4, 2023
e242cf0
fix: don't pass icon prop
dnlkoch Sep 5, 2023
c2723b4
ci: run with node 18
dnlkoch Sep 5, 2023
30524c2
Merge pull request #3499 from terrestris/dependency-updates
dnlkoch Sep 5, 2023
0a602c6
refactor: remove Panel, Window and Titlebar components
annarieger Sep 4, 2023
27caa13
Merge pull request #3497 from terrestris/remove-window
annarieger Sep 5, 2023
7a162a6
refactor: remove toolbar component
annarieger Sep 5, 2023
b6b3a2f
Merge pull request #3503 from terrestris/remove-toolbar
annarieger Sep 5, 2023
632cc92
refactor: remove user chip component
annarieger Sep 6, 2023
11e5ce0
Merge pull request #3504 from terrestris/remove-userchip
annarieger Sep 6, 2023
a264f71
chore: homogenize / sort imports using simple-sort-plugin
ahennr Sep 6, 2023
6aec328
chore: ignore intelliJ specific files
ahennr Sep 6, 2023
dafd330
chore: introduce .npmrc
ahennr Sep 6, 2023
d585255
Merge pull request #3505 from terrestris/homozenize-imports
ahennr Sep 6, 2023
c0066c7
refactor: factor out some code to react-util and use it (#3498)
hwbllmnn Sep 6, 2023
3063c98
refactor: transform to react fc
annarieger Sep 6, 2023
b7beb6e
Merge pull request #3508 from terrestris/refactor-add-wms
annarieger Sep 11, 2023
3cbb5a4
fix: adjust to breaking changes in latest version of react-util
dnlkoch Oct 24, 2023
0c148c7
chore: disable failing test, see #3142
dnlkoch Oct 24, 2023
91823ac
chore: update to ol 8 api
dnlkoch Oct 24, 2023
072f12d
build: cleanup ignore patterns
dnlkoch Oct 24, 2023
3229e43
build: remove empty directory and readd missing directory
dnlkoch Oct 24, 2023
44e20b7
fix: adjust to change Key type in @types/react
dnlkoch Oct 24, 2023
616a6b9
chore: update dependencies
dnlkoch Oct 24, 2023
18369fb
Merge pull request #3596 from terrestris/update-dependencies
dnlkoch Oct 27, 2023
632a3dc
chore: refactor geolocation button
ahennr Sep 12, 2023
163b6fa
fix: refactor example to function component and fix button
dnlkoch Oct 24, 2023
f3f0953
Merge pull request #3512 from terrestris/geolocation
dnlkoch Oct 27, 2023
84b49a1
chore: include @terrestris/eslint-config-typescript-react
dnlkoch Sep 6, 2023
1b95402
build: add @terrestris/eslint-config-typescript-react plugin
dnlkoch Sep 6, 2023
a5aa096
build: add the antd reset.css
dnlkoch Sep 6, 2023
96d58ed
refactor: simplify the ToggleButton and ToggleGroup components
dnlkoch Sep 6, 2023
95b99bf
ci: rename eslint config file
dnlkoch Nov 13, 2023
6c46d5a
test: fix after update function component
dnlkoch Nov 13, 2023
e3d838c
fix: add missing variable to dependency array
dnlkoch Nov 13, 2023
7263c08
feat: migrate to function component (and make use of the refactored T…
dnlkoch Nov 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
module.exports = {
extends: [
'@terrestris/eslint-config-typescript',
'@terrestris/eslint-config-typescript-react',
'plugin:testing-library/react',
'plugin:jest-dom/recommended'
],
plugins: [
'testing-library',
'jest-dom'
'jest-dom',
'simple-import-sort'
],
rules: {
'no-underscore-dangle': 'off',
'@typescript-eslint/member-ordering': 'off',
'testing-library/no-node-access': 'warn',
'testing-library/no-container': 'warn'
'no-underscore-dangle': 'off',
'simple-import-sort/exports': 'warn',
'simple-import-sort/imports': 'warn'
}
};
10 changes: 7 additions & 3 deletions .eslintrc.styleguide.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ module.exports = {
'markdown'
],
overrides: [{
files: ["**/*.{md,mkdn,mdown,markdown}"],
processor: "markdown/markdown"
files: [
'**/*.{md,mkdn,mdown,markdown}'
],
processor: 'markdown/markdown'
}, {
files: ["**/*.{md,mkdn,mdown,markdown}/*.{js,javascript,jsx,node}"]
files: [
'**/*.{md,mkdn,mdown,markdown}/*.{js,javascript,jsx,node}'
]
}],
env: {
browser: true
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/on-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
with:
persist-credentials: false

- name: Setup Node.js 16 👷🏻
- name: Setup Node.js 18 👷🏻
uses: actions/setup-node@v1
with:
node-version: 16
node-version: 18

- name: Cache Node.js modules 💾
uses: actions/cache@v2
Expand All @@ -29,7 +29,7 @@ jobs:
${{ runner.OS }}-

- name: Install dependencies ⏬
run: npm ci
run: npm ci --force

- name: Build styleguide 🏗️
run: npm run build:styleguide
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/on-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
- name: Checkout sources 🔰
uses: actions/checkout@v2

- name: Setup Node.js 16
- name: Setup Node.js 18
uses: actions/setup-node@v1
with:
node-version: 16
node-version: 18

- name: Cache Node.js modules 💾
uses: actions/cache@v2
Expand All @@ -24,7 +24,7 @@ jobs:
${{ runner.OS }}-

- name: Install dependencies ⏬
run: npm ci
run: npm ci --force

- name: Build artifacts 🏗️
run: npm run build
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/on-push-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
- name: Checkout sources 🔰
uses: actions/checkout@v2

- name: Setup Node.js 16 👷🏻
- name: Setup Node.js 18 👷🏻
uses: actions/setup-node@v1
with:
node-version: 16
node-version: 18

- name: Cache Node.js modules 💾
uses: actions/cache@v2
Expand All @@ -27,7 +27,7 @@ jobs:
${{ runner.OS }}-

- name: Install dependencies ⏬
run: npm ci
run: npm ci --force

- name: Generate coverage 🧪
run: npm test
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ jobs:
- name: Checkout sources 🔰
uses: actions/checkout@v2

- name: Setup Node.js 16 👷🏻
- name: Setup Node.js 18 👷🏻
uses: actions/setup-node@v1
with:
node-version: 16
node-version: 18

- name: Install dependencies ⏬
run: npm ci
run: npm ci --force

- name: Build artifacts 🏗️
run: npm run build
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ node_modules

# ignore IntelliJ iml files
*.iml
.idea
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ module.exports = {
},
plugins: [
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-proposal-class-properties'
'@babel/plugin-transform-class-properties'
]
};
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = {
'<rootDir>/dist/'
],
transformIgnorePatterns: [
'node_modules/(?!(ol|antd|@camptocamp/inkmap|(rc-[a-z-]*)|@ant-design\/css-animation|(-[a-z]+)*|@babel\/runtime)/)'
'node_modules/(?!(ol|@camptocamp/inkmap|@terrestris/react-util|d3-selection)/)'
],
setupFiles: [
'<rootDir>/jest/__mocks__/matchMediaMock.js'
Expand Down
28 changes: 27 additions & 1 deletion jest/setup.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,34 @@
import Enzyme from 'enzyme';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
import Adapter from '@cfaester/enzyme-adapter-react-18';
import 'whatwg-fetch';
import 'jest-canvas-mock';
import '@testing-library/jest-dom';
import 'regenerator-runtime/runtime';
import {
TextEncoder,
TextDecoder
} from 'util';

Object.assign(global, {
TextDecoder,
TextEncoder
});

Enzyme.configure({ adapter: new Adapter() });

jest.mock('use-resize-observer', () => ({
__esModule: true,
default: jest.fn().mockImplementation(() => ({
observe: jest.fn(),
unobserve: jest.fn(),
disconnect: jest.fn(),
})),
}));

window.ResizeObserver =
window.ResizeObserver ||
jest.fn().mockImplementation(() => ({
disconnect: jest.fn(),
observe: jest.fn(),
unobserve: jest.fn(),
}));
Loading