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

refactor: extract chart logic into reusable mixin #8562

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

Conversation

tomivirkki
Copy link
Member

Description

Extracted vaadin-chart logic into mixin to be reused by the Lit version.

Type of change

  • Refactor

import { inflateFunctions } from './helpers.js';

/** @private */
export function deepMerge(target, source) {
Copy link
Member

Choose a reason for hiding this comment

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

We could move this to helpers.js so that we can import it from there also in vaadin-chart-series-mixin.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@@ -8,9 +8,10 @@
* See https://vaadin.com/commercial-license-and-service-terms for the full
* license.
*/
import './vaadin-chart.js';
Copy link
Member

Choose a reason for hiding this comment

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

I think there is no need for this import. In vaadin-chart.js we import vaadin-chart-series.js and that should be enough. Previously the import was there only to get global Chart class for instanceof check.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

* See https://vaadin.com/commercial-license-and-service-terms for the full
* license.
*/

Copy link
Member

Choose a reason for hiding this comment

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

nit: extra newline before import can be removed.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

Copy link

sonarqubecloud bot commented Feb 1, 2025

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

Successfully merging this pull request may close these issues.

2 participants