Skip to content

Commit aba73c0

Browse files
authored
Merge pull request #105 from taifen/fix/react-tiny-popover-upgrade
Upgrade `react-tiny-popover` (Fixes an issue with react and react-dom peer dependencies)
2 parents dfcb163 + 9a6fd36 commit aba73c0

File tree

6 files changed

+36
-36
lines changed

6 files changed

+36
-36
lines changed

.changeset/long-flies-hang.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"react-view": patch
3+
---
4+
5+
Updated react-tiny-popover to use React 17 and 18

CONTRIBUTING.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,24 @@
55
```sh
66
git clone https://github.com/uber/react-view
77
cd react-view
8-
yarn
8+
pnpm install
99
```
1010

11-
2. You can test your changes inside of the storybook:
11+
2. You can test your changes inside of the Ladle dev server by running:
1212

1313
```sh
14-
yarn storybook
14+
pnpm ladle serve
1515
```
1616

1717
3. When done, run all unit tests, e2e tests, typescript check and eslint via:
1818

1919
```sh
20-
yarn test:ci
20+
pnpm typecheck
21+
pnpm lint
22+
pnpm test
23+
24+
pnpm exec playwright install
25+
pnpm test:e2e:dev
2126
```
2227

2328
All features and bug fixes should be covered by unit or e2e tests.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@
4949
"@babel/traverse": "^7.23.4",
5050
"@babel/types": "^7.23.4",
5151
"@miksu/prettier": "^1.18.6",
52-
"@miksu/react-tiny-popover": "^3.5.1",
5352
"copy-to-clipboard": "^3.3.3",
5453
"lodash": "^4.17.21",
5554
"prism-react-renderer": "^2.3.0",
56-
"react-simple-code-editor": "^0.13.1"
55+
"react-simple-code-editor": "^0.13.1",
56+
"react-tiny-popover": "^8.0.4"
5757
},
5858
"devDependencies": {
5959
"@babel/preset-typescript": "^7.23.3",

pnpm-lock.yaml

Lines changed: 13 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ui/error.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This source code is licensed under the MIT license found in the
55
LICENSE file in the root directory of this source tree.
66
*/
77
import * as React from "react";
8-
import Popover from "@miksu/react-tiny-popover";
8+
import { Popover } from "react-tiny-popover";
99
import { formatBabelError, frameError, getStyles } from "../utils";
1010
import type { TErrorProps } from "../types";
1111

@@ -17,7 +17,7 @@ const PopupError: React.FC<{ enabled: boolean; children: React.ReactNode }> = ({
1717
return (
1818
<Popover
1919
isOpen={enabled}
20-
position={"bottom"}
20+
positions={"bottom"}
2121
content={<div>{children}</div>}
2222
>
2323
<div />

src/ui/knob.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This source code is licensed under the MIT license found in the
55
LICENSE file in the root directory of this source tree.
66
*/
77
import * as React from "react";
8-
import Popover from "@miksu/react-tiny-popover";
8+
import { Popover } from "react-tiny-popover";
99
import type { TPropValue, TImportsConfig } from "../types";
1010
import Error from "./error";
1111
import Editor from "./editor";
@@ -56,11 +56,11 @@ const Label: React.FC<{
5656
return (
5757
<Popover
5858
isOpen={Boolean(isHover)}
59-
position={"top"}
59+
positions={"top"}
6060
content={<div>{tooltip}</div>}
61+
ref={hoverRef as any}
6162
>
6263
<label
63-
ref={hoverRef as any}
6464
style={{
6565
fontWeight: 500,
6666
lineHeight: "20px",
@@ -83,11 +83,11 @@ const BooleanKnob: React.FC<{
8383
return (
8484
<Popover
8585
isOpen={Boolean(isHover)}
86-
position={"top"}
86+
positions={"top"}
8787
content={<div>{tooltip}</div>}
88+
ref={hoverRef as any}
8889
>
8990
<div
90-
ref={hoverRef as any}
9191
style={{
9292
display: "flex",
9393
alignItems: "center",

0 commit comments

Comments
 (0)