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

[WC-2678]: Add playground to Custom Chart #1436

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

samuelreichert
Copy link
Contributor

Pull request type


Description

@samuelreichert samuelreichert force-pushed the feat/WC-2678-custom-chart-dev-mode branch from 711ae37 to 67e08d6 Compare February 12, 2025 08:30
@samuelreichert samuelreichert changed the title [WIP][WC-2678]: custom chart dev mode [WC-2678]: Add playground to Custom Chart Feb 17, 2025
@samuelreichert samuelreichert force-pushed the feat/WC-2678-custom-chart-dev-mode branch from 67e08d6 to b23e744 Compare February 18, 2025 08:22
@samuelreichert samuelreichert marked this pull request as ready for review February 18, 2025 08:23
@samuelreichert samuelreichert requested a review from a team as a code owner February 18, 2025 08:23
@samuelreichert samuelreichert force-pushed the feat/WC-2678-custom-chart-dev-mode branch from b23e744 to 1f25272 Compare February 18, 2025 14:10
Copy link
Collaborator

@iobuhov iobuhov left a 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 {
Copy link
Collaborator

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";
Copy link
Collaborator

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.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. We should minimize usage of debounce
  2. Merging props (updateData) can be done in separate function/module
  3. Same about managing PlotlyChart


class PropsAtom<T> {
constructor(public props: T) {
makeObservable(this, { props: observable.struct, setProps: action });
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants