Uh oh!
There was an error while loading. Please reload this page.
ChartEditor: use react-chart-editor - #405
Conversation
jackparmer
commented
Mar 13, 2018
via email
Nice. It looks great. When you switch to the chart tab, should we
auto-minimize the table schema? `react-chart-editor` needs a good amount of
horizontal space and users might not now that they can collapse the table
schema sidebar. …On Tue, Mar 13, 2018 at 1:51 PM, Nicolas Riesco ***@***.***> wrote:
@jackparmer <https://github.com/jackparmer> This is just to show you how
Falcon would look like with react-chart-editor.
See that I've made the Table view the default.
I'm also thinking of making the tree view as big as the code editor. So
that the chart editor can use the whole width.
@nicolaskruchten <https://github.com/nicolaskruchten> I'm looking forward
to the new API (it'd simplify this PR a lot).
[image: peek 2018-03-13 17-45]
<https://user-images.githubusercontent.com/6199391/37359812-782f9a1c-26e6-11e8-9b3f-e48275e62271.gif>
------------------------------
You can view, comment on, or merge this pull request online at:
#405
Commit Summary
- ChartEditor: WIP
File Changes
- *M* app/components/Settings/Preview/Preview.react.js
<https://github.com/plotly/falcon-sql-client/pull/405/files#diff-0>
(24)
- *A* app/components/Settings/Preview/chart-editor.jsx
<https://github.com/plotly/falcon-sql-client/pull/405/files#diff-1>
(134)
- *M* package.json
<https://github.com/plotly/falcon-sql-client/pull/405/files#diff-2>
(6)
- *M* webpack.config.base.js
<https://github.com/plotly/falcon-sql-client/pull/405/files#diff-3>
(7)
- *M* yarn.lock
<https://github.com/plotly/falcon-sql-client/pull/405/files#diff-4>
(1015)
Patch Links:
- https://github.com/plotly/falcon-sql-client/pull/405.patch
- https://github.com/plotly/falcon-sql-client/pull/405.diff
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#405>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABx4apFPzoyZIzzO4peWgRudX5EiAO8Bks5teAcqgaJpZM4SpKgR>
.
|
nicolaskruchten
commented
Mar 13, 2018
Awesome! New release coming soon with the new API /cc @VeraZab |
n-riesco
commented
Mar 13, 2018
@jackparmer I thought about autominimise, but I was concerned some users might find difficult to discover that they can make the schema view visible again. That's why I thought making the schema view as big as the code editor would be the solution. |
jackparmer
commented
Mar 13, 2018
via email
That's why I thought making the schema view as big as the code editor would be the solution.
Yeah, that sounds good to me. …On Tue, Mar 13, 2018 at 2:10 PM, Nicolas Riesco ***@***.***> wrote:
@jackparmer <https://github.com/jackparmer> I thought about autominimise,
but I was concerned some users might find difficult to discover that they
can make the schema view visible again. That's why I thought making the
schema view as big as the code editor would be the solution.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#405 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABx4ajQCXkpwdfd467hxHfFGJ06oBpm_ks5teAuwgaJpZM4SpKgR>
.
|
@n-riesco just made a new release: https://www.npmjs.com/package/react-chart-editor |
* Implemented ChartEditor using `react-chart-editor@0.11`. * Enabled bundling of CSS by importing from a react component. * Use table view by default (instead of ChartEditor). Closesplotly#350
* Store gd in Settings state so that we can export the chart into Chart Studio.
* Removed obsolete props and state in Preview used by previous implementation of ChartEditor.
d963467 to
b5624feCompare* Moved TableTree from Settings into Preview, so that all the components under the Query panel live inside Preview. * After this change, it'll be possible for move ChartEditor so that it fills all the available width.
* Hide code editor and schemas view, when the Chart Editor is selected.
n-riesco
commented
Mar 15, 2018
@jackparmer I've updated the PR. In this end I've gone for the option of hiding both the code editor and the table schemas view (it didn't make sense to hide the code editor while the table schemas view was still visible) @nicolaskruchten@VeraZab As you can see in the screencast, I've got a problem with the initial plot size. Is there a way to set this size with the new API? |
nicolaskruchten
commented
Mar 15, 2018
|
* Upgraded to `react-chart-editor@0.13` and `react-plotly.js@2.1`.
n-riesco
commented
Mar 16, 2018
@nicolaskruchten 😿 I still see the same behaviour after upgrading to |
n-riesco
commented
Mar 16, 2018
@nicolaskruchten One thing, that is rather inconvenient with this workaround, is that I have to hard-code the height as |
nicolaskruchten
commented
Mar 19, 2018
What's the easiest way for me to get this running locally so I can play with the CSS? The height/width thing is a big pain point with this project in general :( |
jackparmer
commented
Mar 19, 2018
@nicolaskruchten It turns out the issue isn't with the CSS. In fact, I have something working, but I'll clean it and push it into the PR tomorrow. |
* Fixes PlotlyComponent autosizing issue.
* Detect before render when chart panel becomes visible.
@nicolaskruchten In principle 85afe3b could be implemented inside I think the place to deal with this issue is inside To sum up the issue:
|
nicolaskruchten
commented
Mar 21, 2018
Seconded, this is a problem in the editor in general but I thought I'd more or less fixed it by firing |
* Preview.componentWillReceiveProps now checks if props have change before triggering a state update. * Do not pre-compute the CSV string (in order to reduce memory usage). Fixesplotly#395
* Restored previous name, because `gd` could suggest it's the DOM element. * `plotlyJSON` can be stringified safely.
n-riesco
commented
Mar 23, 2018
@nicolaskruchten thanks for reviewing https://github.com/n-riesco/plotly-database-connector/blob/04dd2463ccddf834b19ef4111cffa989bf7f7fa6/app/components/Settings/Preview/chart-editor.jsx . I've renamed |
n-riesco
commented
Mar 23, 2018
@shannonlal I'm done with this PR. Would you review it, please? |
shannonlal
commented
Mar 24, 2018
@n-riesco Looking at this now |
shannonlal
left a comment
There was a problem hiding this comment.
Your throughts on define a standard for file name convention? Maybe out it in the contributing doc? I noticed that as you have be updating files you have been moving away from camel case file names to dash. I am okay with this, I just want to know if we should standardize on this. We updated chart-editor.css and Preview.css. I wanted to know if we should be making them consistent
| }); | ||
| // Cap plots to 100k rows | ||
| const length = Math.min(rows.length, 100000); |
There was a problem hiding this comment.
This should probably be defined as a const at top. const MAX_ROWS=10000;
| <div | ||
| ref={'container'} | ||
| style={{ | ||
| minHeight: 400, |
There was a problem hiding this comment.
Just a suggestion. Maybe a constant or move to a separate file. I see the min height of 400 defined in a bunch of files. Maybe we should centralize to a single file? your thoughts?
There was a problem hiding this comment.
I've re-enabled css-loader, so that we can import again .css files into a component. But I didn't create a chart-editor.css, because I feel we need tidy up the CSS in Falcon first:
- perhaps define a
.cssfile with a common theme - follow Plotly's style guide
- Jack mentioned tachyons and I'm keen to give it a go.
| import DialectSelector from './DialectSelector/DialectSelector.react'; | ||
| import ConnectButton from './ConnectButton/ConnectButton.react'; | ||
| import Preview from './Preview/Preview.react'; | ||
| import TableTree from './Preview/TableTree.react.js'; |
There was a problem hiding this comment.
Is this file no longer in use? I was working on some jest tests for table tree. If it is not needed I can move on to some other tests
There was a problem hiding this comment.
yes, it's still in use (tests are always welcome 😄). I moved the import to Preview.react.js. Now Preview.react.js contains all the components displayed under the QUERY tab.
shannonlal
left a comment
There was a problem hiding this comment.
Nothing major. Just some minor comments and more questions about standards. I am going to give this a dancer now and let you make decision as to wether you want to fix my comments or move them to another issue. Overall a really nice job. 💃
| columnNames = ['x', 'y']; | ||
| rows = []; | ||
| for (let i = 0; i < 100001; i++) { |
There was a problem hiding this comment.
Should this be (MAX_LENGTH + 1)
n-riesco
commented
Mar 24, 2018
@shannonlal I've addressed all your comments except that about CSS (I'd rather address it after we devise a plan to tidy up the CSS in Falcon; see what I replied here). |
zhaodagang
commented
May 8, 2018
Use ChartEditor, must connect plot site and logined ? |
n-riesco
commented
May 8, 2018
@zhaodagang Falcon and
If you create an account on https://plot.ly/ and login with Falcon, then you'll be able to upload your data and charts onto https://plot.ly/ . |
zhaodagang
commented
May 9, 2018
via email
Can this App connect clickhouse database ?
2018-05-09
zdg8882000
发件人:Nicolas Riesco <notifications@github.com>
发送时间:2018-05-08 23:43
主题:Re: [plotly/falcon-sql-client] ChartEditor: use react-chart-editor (#405)
收件人:"plotly/falcon-sql-client"<falcon-sql-client@noreply.github.com>
抄送:"Mr Zhao"<zdg8882000@163.com>,"Mention"<mention@noreply.github.com>
@zhaodagang Falcon and react-chart-editor can be used without login.
react-chart-editor is based on the open-source library plotly.js.
If you create an account on https://plot.ly/ and login with Falcon, then you'll be able to upload your data and charts onto https://plot.ly/ .
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread. |


@jackparmer This is just to show you how Falcon would look like with
react-chart-editor.See that I've made the Table view the default.
I'm also thinking of making the tree view as big as the code editor. So that the chart editor can use the whole width.
@nicolaskruchten I'm looking forward to the new API (it'd simplify this PR a lot).