Skip to content

Commit 24f60a7

Browse files
Feat #1126 Add Data Tab to rtk-query-monitor (#1129)
* fix: broken rtk-query-monitor demo not working #1126 Description: downgrades framer-motion in order to remove the runtime error "_framerMotion.motion.custom is not a function" See: https://stackoverflow.com/questions/66703410/next-js-framermotion-motion-custom-is-not-a-function * feat(rtk-query): add Data tab #1126 * fix: bump min popup width to 700px #1126 Description: improve UI of rtk-query right side tabs * fix: bump min popup window width again to 760px #1126 * chore: add changeset * feat(rtk-query): improve a11y of rtk-query-monitor tab panel #1126 * chore(rtk-query): add few integration tests to rtk-query-monitor #1126 * Fix merge * Deduplicate msw Co-authored-by: Nathan Bierema <nbierema@gmail.com>
1 parent 6cf1865 commit 24f60a7

29 files changed

+432
-80
lines changed

.changeset/lemon-balloons-sniff.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@redux-devtools/rtk-query-monitor': minor
3+
---
4+
5+
feat(rtk-query): add Data tab to rtk-query-monitor #1126 #1129

.changeset/popular-dodos-laugh.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'rtk-query-demo': patch
3+
---
4+
5+
fix: rtk-query-monitor demo not working #1126 #1129

.changeset/ten-files-return.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'remotedev-redux-devtools-extension': patch
3+
---
4+
5+
bump min popup window width to 760px #1126 #1129

extension/src/browser/views/includes/style.pug

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ style.
77
overflow: hidden;
88
height: 100%;
99
width: 100%;
10-
min-width: 350px;
10+
min-width: 760px;
1111
min-height: 400px;
1212
margin: 0;
1313
padding: 0;
@@ -17,6 +17,7 @@ style.
1717
color: #fff;
1818
}
1919
#root {
20+
min-width: 760px;
2021
height: 100%;
2122
}
2223
#root > div {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
demo
22
lib
3+
dist

packages/redux-devtools-rtk-query-monitor/.eslintrc.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,13 @@ module.exports = {
99
project: ['./tsconfig.json'],
1010
},
1111
},
12+
{
13+
files: ['test/**/*.ts', 'test/**/*.tsx'],
14+
extends: '../../eslintrc.ts.react.jest.base.json',
15+
parserOptions: {
16+
tsconfigRootDir: __dirname,
17+
project: ['./tsconfig.test.json'],
18+
},
19+
},
1220
],
1321
};

packages/redux-devtools-rtk-query-monitor/demo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"@redux-devtools/rtk-query-monitor": "^3.0.0",
2121
"@reduxjs/toolkit": "^1.8.2",
2222
"framer-motion": "^6.3.15",
23-
"msw": "^0.42.3",
23+
"msw": "^0.43.0",
2424
"react": "^18.2.0",
2525
"react-dom": "^18.2.0",
2626
"react-icons": "^4.4.0",
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
preset: 'ts-jest',
3+
testEnvironment: 'jsdom',
4+
moduleNameMapper: {
5+
'\\.css$': '<rootDir>/test/__mocks__/styleMock.ts',
6+
},
7+
globals: {
8+
'ts-jest': {
9+
tsconfig: 'tsconfig.test.json',
10+
},
11+
},
12+
};

packages/redux-devtools-rtk-query-monitor/package.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,11 @@
3737
"build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts,.tsx\" --out-dir lib/esm",
3838
"build:types": "tsc --emitDeclarationOnly",
3939
"clean": "rimraf lib",
40+
"test": "jest",
4041
"lint": "eslint . --ext .ts,.tsx",
4142
"type-check": "tsc --noEmit",
4243
"prepack": "pnpm run clean && pnpm run build",
43-
"prepublish": "pnpm run type-check && pnpm run lint"
44+
"prepublish": "pnpm run type-check && pnpm run lint && pnpm run test"
4445
},
4546
"dependencies": {
4647
"@babel/runtime": "^7.18.3",
@@ -68,18 +69,26 @@
6869
"@babel/preset-typescript": "^7.17.12",
6970
"@redux-devtools/core": "^3.13.1",
7071
"@reduxjs/toolkit": "^1.8.2",
72+
"@testing-library/jest-dom": "^5.16.4",
73+
"@testing-library/react": "^13.3.0",
74+
"@types/jest": "^27.5.2",
7175
"@types/hex-rgba": "^1.0.1",
7276
"@types/lodash.debounce": "^4.0.7",
7377
"@types/react": "^18.0.14",
7478
"@typescript-eslint/eslint-plugin": "^5.29.0",
7579
"@typescript-eslint/parser": "^5.29.0",
7680
"eslint": "^8.18.0",
7781
"eslint-config-prettier": "^8.5.0",
82+
"eslint-plugin-jest": "^26.5.3",
7883
"eslint-plugin-react": "^7.30.1",
7984
"eslint-plugin-react-hooks": "^4.6.0",
85+
"jest": "^27.5.1",
8086
"react": "^18.2.0",
87+
"react-dom": "^18.2.0",
88+
"react-redux": "^8.0.2",
8189
"redux": "^4.2.0",
8290
"rimraf": "^3.0.2",
91+
"ts-jest": "^27.1.5",
8392
"typescript": "~4.7.4"
8493
},
8594
"peerDependencies": {

packages/redux-devtools-rtk-query-monitor/src/components/QueryForm.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ export class QueryForm extends React.PureComponent<
128128
{({ styling, base16Theme }) => {
129129
return (
130130
<form
131+
id="rtk-query-monitor-query-selection-form"
131132
action="#"
132133
onSubmit={this.handleSubmit}
133134
{...styling('queryForm')}

0 commit comments

Comments
 (0)