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

Fix/misc documentation sandbox improvements #315

Merged
merged 3 commits into from
Mar 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
18 changes: 16 additions & 2 deletions sandbox/Sandbox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import "./styles.css";
const sandboxData = loadDataset();
const NOT_ALLOWED_PROPERTIES = ["height", "width"];
const isPropertyDocumented = k => !NOT_ALLOWED_PROPERTIES.includes(k);
// eslint-disable-next-line no-undef
const reactD3GraphVersion = rd3gRunningVersion;

/**
* This is a sample integration of react-d3-graph, in this particular case all the rd3g config properties
Expand Down Expand Up @@ -404,14 +406,26 @@ export default class Sandbox extends React.Component {
<div className="container__form">
<h4>
<a href="https://github.com/danielcaldas/react-d3-graph" target="_blank">
react-d3-graph
{reactD3GraphVersion ? `react-d3-graph@${reactD3GraphVersion}` : "react-d3-graph"}
</a>
</h4>
<h4>
<a href="https://danielcaldas.github.io/react-d3-graph/docs/index.html" target="_blank">
docs
📖Documentation
</a>
</h4>
<h5>
<a href="https://paypal.me/DanielCaldas321" target="_blank">
❤️Donate
</a>
<a
href="https://github.com/danielcaldas/react-d3-graph/stargazers"
target="_blank"
style={{ marginLeft: "4px" }}
>
⭐Become a stargazer
</a>
</h5>
<h3>Configurations</h3>
<Form
className="form-wrapper"
Expand Down
2 changes: 1 addition & 1 deletion sandbox/graph-config-tooltips.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sandbox/rd3g.sandbox.bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/components/graph/graph.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
* - If value is negative, nodes will repel each other. Most of the times this is what we want, so nodes don"t overlap.
* @param {number} [d3.linkLength=100] - <a id="d3-link-length" href="#d3-link-length">🔗</a> the length of each link from the center of the nodes it joins.
* @param {number} [d3.linkStrength=1] - <a id="d3-link-strength" href="#d3-link-strength">🔗</a> <a target="_blank" href="https://github.com/d3/d3-force#link_strength">see d3-force link.strength</a>
* @param {number} [d3.disableLinkForce=false] - <a id="d3-disable-link-force" href="#d3-disable-link-force">🔗</a> ⚠️🧪EXPERIMENTAL🧪⚠️ it completely disables d3 force link and simulation to re-trigger so that one can obtain
* @param {boolean} [d3.disableLinkForce=false] - <a id="d3-disable-link-force" href="#d3-disable-link-force">🔗</a> ⚠️🧪EXPERIMENTAL🧪⚠️ it completely disables d3 force link and simulation to re-trigger so that one can obtain
* precise render of node positions as described by the author <a target="_blank" href="https://github.com/antoninklopp">@antoninklopp</a> in <a target="_blank" href="https://github.com/danielcaldas/react-d3-graph/pull/278">the Pull Request description</a>.
* </br>
* @param {Object} node node object is explained in next section. ⬇️
Expand Down
250 changes: 125 additions & 125 deletions tools/graph-config-jsdoc.json

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions webpack.config.dist.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const webpack = require("webpack");
const path = require("path");
const Visualizer = require("webpack-visualizer-plugin");
const BundleAnalyzerPlugin = require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
Expand Down Expand Up @@ -28,5 +29,8 @@ module.exports = {
openAnalyzer: true,
}),
new Visualizer({ filename: "../gen-docs/visualizer-stats.html" }),
new webpack.DefinePlugin({
rd3gRunningVersion: JSON.stringify(process.env.npm_package_version || "unknown"),
}),
],
};
6 changes: 6 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const webpack = require("webpack");
const path = require("path");

module.exports = {
Expand All @@ -24,4 +25,9 @@ module.exports = {
resolve: {
extensions: [".js", ".jsx"],
},
plugins: [
new webpack.DefinePlugin({
rd3gRunningVersion: JSON.stringify(process.env.npm_package_version || "unknown"),
}),
],
};