-
Notifications
You must be signed in to change notification settings - Fork 45
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
[WC-2678]: Add playground to Custom Chart #1436
base: main
Are you sure you want to change the base?
Conversation
711ae37
to
67e08d6
Compare
67e08d6
to
b23e744
Compare
… data to chart data
b23e744
to
1f25272
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but need some adjustments.
import { BaseControllerHost } from "@mendix/widget-plugin-mobx-kit/BaseControllerHost"; | ||
import { ResizeController } from "./ResizeController"; | ||
|
||
export class Host extends BaseControllerHost { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Host" is too generic, can we rename it to "CustomChartControllerHost"?
@@ -1,19 +1,30 @@ | |||
import { EditorStoreState, PlaygroundData } from "@mendix/shared-charts/main"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need extract some logic from this hook into controllers. Also resize logic is duplicated in ResizeController.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- We should minimize usage of debounce
- Merging props (updateData) can be done in separate function/module
- Same about managing PlotlyChart
|
||
class PropsAtom<T> { | ||
constructor(public props: T) { | ||
makeObservable(this, { props: observable.struct, setProps: action }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure to copy code from my branch, I updated this class and added some comment in there.
Pull request type
Description