Skip to content

Commit 6454829

Browse files
committed
fix conflict
2 parents e0caab0 + 0cea960 commit 6454829

File tree

138 files changed

+803
-2278
lines changed

Some content is hidden

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

138 files changed

+803
-2278
lines changed

.changeset/eleven-dogs-laugh.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"victory-core": patch
3+
---
4+
5+
Refactor victory-accessible-group to a function component

.eslintrc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ module.exports = {
6767
"no-undef": "off",
6868
"max-nested-callbacks": "off",
6969
"@typescript-eslint/no-empty-function": "off",
70-
"react/prop-types": "off",
7170
},
7271
},
7372
{
@@ -86,6 +85,7 @@ module.exports = {
8685
"plugin:@typescript-eslint/recommended-requiring-type-checking",
8786
],
8887
rules: {
88+
"react/prop-types": "off",
8989
"no-use-before-define": "off",
9090
"valid-jsdoc": "off",
9191
"@typescript-eslint/no-use-before-define": [

.github/workflows/ci.yml

+3-22
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,16 @@ on:
1414
jobs:
1515
build:
1616
runs-on: ubuntu-latest
17-
strategy:
18-
matrix:
19-
node-version: [16.x, 18.x]
2017
steps:
2118
- uses: actions/checkout@v4
2219
- uses: ./.github/actions/setup
23-
with:
24-
node-version: ${{ matrix.node-version }}
2520

2621
- name: Check all package.json's and tsconfig.json's are in sync.
2722
run: |
2823
pnpm sync
2924
git diff --no-ext-diff --quiet --exit-code
3025
31-
- name: Build libraries and distributions ${{ matrix.node-version }}
26+
- name: Build libraries and distributions
3227
run: pnpm build
3328

3429
format:
@@ -37,8 +32,6 @@ jobs:
3732
steps:
3833
- uses: actions/checkout@v4
3934
- uses: ./.github/actions/setup
40-
with:
41-
node-version: 18.x
4235

4336
- name: Format
4437
run: pnpm format
@@ -49,38 +42,26 @@ jobs:
4942
steps:
5043
- uses: actions/checkout@v4
5144
- uses: ./.github/actions/setup
52-
with:
53-
node-version: 18.x
5445

5546
- name: Lint
5647
run: pnpm lint
5748

5849
types:
5950
needs: [build]
6051
runs-on: ubuntu-latest
61-
strategy:
62-
matrix:
63-
node-version: [16.x, 18.x]
6452
steps:
6553
- uses: actions/checkout@v4
6654
- uses: ./.github/actions/setup
67-
with:
68-
node-version: ${{ matrix.node-version }}
6955

70-
- name: Types Check ${{ matrix.node-version }}
56+
- name: Types Check
7157
run: pnpm types:check
7258

7359
test:
7460
needs: [build]
7561
runs-on: ubuntu-latest
76-
strategy:
77-
matrix:
78-
node-version: [16.x, 18.x]
7962
steps:
8063
- uses: actions/checkout@v4
8164
- uses: ./.github/actions/setup
82-
with:
83-
node-version: ${{ matrix.node-version }}
8465

85-
- name: Test ${{ matrix.node-version }}
66+
- name: Test
8667
run: pnpm jest

docs/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
"fuse.js": "^3.2.1",
2929
"lodash": "^4.17.19",
3030
"prismjs": "^1.15.0",
31-
"prop-types": "^15.8.1",
3231
"react": "^16.8.0",
3332
"react-cool-inview": "^0.5.14",
3433
"react-copy-to-clipboard": "^5.0.2",

docs/src/content/introduction/index.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ In this guide, we’ll show you how to get started with Victory and walk you thr
2323

2424
You can do this on your own if you'd like, or you can...
2525

26-
* Clone down [this project we've started for you](https://github.com/FormidableLabs/victory-tutorial) using ```git clone git@github.com:FormidableLabs/victory-tutorial.git```
26+
* Clone down [this project we've started for you](https://github.com/FormidableLabs/victory-tutorial) using `git clone git@github.com:FormidableLabs/victory-tutorial.git`
2727
* `cd victory-tutorial`
2828
* Replace the existing code in the `client.js` file with:
2929

@@ -153,6 +153,8 @@ class App extends React.Component {
153153
ReactDOM.render(<App/>, mountNode);
154154
```
155155

156+
While the axes defaults are great, you can see there's some overlap with the y-axis and first bar. Let's fix that in the next section.
157+
156158
#### 6. Customize the axes
157159

158160
Next, let's modify the tick labels on the axes to be a little more descriptive. We can do this by adding and configuring `VictoryAxis` components to our chart, so let's import `VictoryAxis`. Import statements should now look like this:

docs/src/content/introduction/ssr.md

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
id: 1
3+
title: Server Side Rendering
4+
category: introduction
5+
type: docs
6+
scope: null
7+
---
8+
9+
# Server Side Rendering
10+
11+
In frameworks such as Next.js 13+, context is fully supported within Client Components, but it cannot be created or consumed directly within Server Components. This is because Server Components have no React state (since they're not interactive), and context is primarily used for rerendering interactive components deep in the tree after some React state has been updated.
12+
Victory uses `createContext` to perform its operations and it must be rendered client side by adding the `use client` directive in your components when used in a framework with Server Side Component support.
13+
14+
```jsx
15+
"use client";
16+
import React from 'react';
17+
import { VictoryBar, VictoryChart, VictoryTheme } from "victory";
18+
19+
const data = [
20+
{ quarter: 1, earnings: 13000 },
21+
{ quarter: 2, earnings: 16500 },
22+
{ quarter: 3, earnings: 14250 },
23+
{ quarter: 4, earnings: 19000 }
24+
];
25+
26+
const App = ()=>{
27+
return (
28+
<div style={styles.container}>
29+
<VictoryChart width={350} theme={VictoryTheme.material}>
30+
<VictoryBar data={data} x="quarter" y="earnings" />
31+
</VictoryChart>
32+
</div>
33+
);
34+
}
35+
36+
export default App;
37+
```

docs/src/partials/markdown/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ export function renderHeading(props) {
113113
const slug = text
114114
.trim()
115115
.toLowerCase()
116+
.replace(/^\d+\.\s*/, "") // remove leading numbers and periods
116117
.replace(/[^\w\- ]/g, "") // Remove punctuation
117118
.replace(/\s+/g, "-"); // Replace spaces with a dash
118119

@@ -144,7 +145,6 @@ renderHeading.propTypes = {
144145
* @param {Object} meta - meta
145146
* @returns {Object} link element
146147
*/
147-
// eslint-disable-next-line react/no-multi-comp
148148
export const renderLink = ({ href, children }) => {
149149
if (/^\w+:/.test(href)) {
150150
return (
@@ -161,7 +161,7 @@ renderLink.propTypes = {
161161
href: PropTypes.string,
162162
};
163163

164-
/* eslint-enable react/prop-types, no-magic-numbers */
164+
/* eslint-enable no-magic-numbers */
165165
const Markdown = (props) => {
166166
const { className, source, scope, theme } = props;
167167
/* eslint-disable react/prop-types, no-magic-numbers */

packages/victory-area/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# victory-area
22

3+
## 36.9.1
4+
5+
## 36.9.0
6+
7+
### Minor Changes
8+
9+
- Remove prop-types definitions and dependency ([#2758](https://github.com/FormidableLabs/victory/pull/2758))
10+
311
## 36.8.6
412

513
### Patch Changes

packages/victory-area/package.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "victory-area",
3-
"version": "36.8.6",
3+
"version": "36.9.1",
44
"description": "Area Component for Victory",
55
"keywords": [
66
"data visualization",
@@ -21,9 +21,8 @@
2121
"license": "MIT",
2222
"dependencies": {
2323
"lodash": "^4.17.19",
24-
"prop-types": "^15.8.1",
25-
"victory-core": "^36.8.6",
26-
"victory-vendor": "^36.8.6"
24+
"victory-core": "^36.9.1",
25+
"victory-vendor": "^36.9.1"
2726
},
2827
"peerDependencies": {
2928
"react": ">=16.6.0"

packages/victory-area/src/area.tsx

-9
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
/* eslint no-magic-numbers: ["error", { "ignore": [-1, 0, 1, 2] }]*/
22
import React from "react";
3-
import PropTypes from "prop-types";
43
import * as d3Shape from "victory-vendor/d3-shape";
54
import {
65
Helpers,
7-
CommonProps,
86
Path,
97
UserProps,
108
VictoryCommonPrimitiveProps,
@@ -176,13 +174,6 @@ export const Area: React.FC<AreaProps> = (initialProps) => {
176174
: area;
177175
};
178176

179-
Area.propTypes = {
180-
...CommonProps.primitiveProps,
181-
groupComponent: PropTypes.element,
182-
interpolation: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
183-
pathComponent: PropTypes.element,
184-
};
185-
186177
export interface AreaProps extends VictoryCommonPrimitiveProps {
187178
horizontal?: VictoryCommonThemeProps["horizontal"];
188179
groupComponent?: React.ReactElement;

packages/victory-area/src/victory-area.tsx

-27
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
import PropTypes from "prop-types";
21
import React from "react";
32
import { getBaseProps } from "./helper-methods";
43
import { Area } from "./area";
54
import {
6-
PropTypes as CustomPropTypes,
75
Helpers,
86
VictoryLabel,
97
VictoryContainer,
10-
CommonProps,
118
DefaultTransitions,
129
VictoryClipContainer,
1310
addEvents,
@@ -71,30 +68,6 @@ class VictoryAreaBase extends React.Component<VictoryAreaProps> {
7168
"width",
7269
];
7370

74-
static propTypes = {
75-
...CommonProps.baseProps,
76-
...CommonProps.dataProps,
77-
interpolation: PropTypes.oneOfType([
78-
PropTypes.oneOf([
79-
"basis",
80-
"cardinal",
81-
"catmullRom",
82-
"linear",
83-
"monotoneX",
84-
"monotoneY",
85-
"natural",
86-
"step",
87-
"stepAfter",
88-
"stepBefore",
89-
]),
90-
PropTypes.func,
91-
]),
92-
label: CustomPropTypes.deprecated(
93-
PropTypes.string,
94-
"Use `labels` instead for individual data labels",
95-
),
96-
};
97-
9871
static defaultProps: VictoryAreaProps = {
9972
containerComponent: <VictoryContainer />,
10073
dataComponent: <Area />,

packages/victory-axis/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# victory-axis
22

3+
## 36.9.1
4+
5+
## 36.9.0
6+
7+
### Minor Changes
8+
9+
- Remove prop-types definitions and dependency ([#2758](https://github.com/FormidableLabs/victory/pull/2758))
10+
311
## 36.8.6
412

513
## 36.8.5

packages/victory-axis/package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "victory-axis",
3-
"version": "36.8.6",
3+
"version": "36.9.1",
44
"description": "Axis Component for Victory",
55
"keywords": [
66
"data visualization",
@@ -21,8 +21,7 @@
2121
"license": "MIT",
2222
"dependencies": {
2323
"lodash": "^4.17.19",
24-
"prop-types": "^15.8.1",
25-
"victory-core": "^36.8.6"
24+
"victory-core": "^36.9.1"
2625
},
2726
"peerDependencies": {
2827
"react": ">=16.6.0"

0 commit comments

Comments
 (0)