Skip to content

Conversation

zellerbaptiste
Copy link
Contributor

@zellerbaptiste zellerbaptiste commented May 5, 2025

  • mise à jour du path des fichiers storybook dans src
  • ajout du watch de toutes les props pour rerender les graphiques / tableaux
  • correction du shadow root sur les composants unitaires
  • ajout d'options d'exports dans le package.json pour permettre plus de possibilités
  • mise à disposition des composants unitaires
  • mise à jour des dépendances NPM

Closes #37
Closes #42
Closes #43
Closes #44
Closes #45

Resolves react-dsfr #391

@zellerbaptiste zellerbaptiste added the enhancement New feature or request label May 5, 2025
@zellerbaptiste zellerbaptiste requested review from smalot and Copilot May 5, 2025 09:42
@zellerbaptiste zellerbaptiste self-assigned this May 5, 2025
Copy link

netlify bot commented May 5, 2025

Deploy Preview for dsfr-chart ready!

Name Link
🔨 Latest commit 9ea6e83
🔍 Latest deploy log https://app.netlify.com/projects/dsfr-chart/deploys/682b04e6b205d70008d9b8be
😎 Deploy Preview https://deploy-preview-49--dsfr-chart.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the DSFR-chart library to v2.0.4 by revising file paths for Storybook, adding watchers on component props to trigger chart re-renders, correcting shadow root handling for custom elements, and updating dependency configurations.

  • Updated Vue components to re-render charts on prop changes
  • Refactored custom element definitions to manage shadow roots internally
  • Improved documentation and ESLint configuration

Reviewed Changes

Copilot reviewed 26 out of 27 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/components/LineChart.vue Added a watcher on $props to reset and re-create the chart when props change
src/components/GaugeChart.vue Added a watcher on $props to re-create the gauge chart when props change
src/components/BarLineChart.vue Added a watcher on $props to reset data and re-create the chart as needed
src/components/BarChart.vue Added a watcher on $props to reset and re-create the chart when props change
src/charts/*.js Updated custom element definitions to supply shadowRoot: false in defineCustomElement and removed it from define
eslint.config.js Revised globals configuration for better ESLint parsing and consistency
README.md & CONTRIBUTING.md Updated documentation examples to reflect the new usage patterns
.storybook/preview.js Updated Storybook preview configuration to import the new chart runtime
Files not reviewed (1)
  • package.json: Language not supported
Comments suppressed due to low confidence (1)

src/charts/TableChart.js:8

  • The configuration for shadowRoot is now passed into defineCustomElement while being removed from customElements.define. Verify that this change aligns with the intended behavior of rendering components without a Shadow DOM.
const TableChartElement = defineCustomElement(TableChart, { shadowRoot: false });

@zellerbaptiste zellerbaptiste requested a review from keryanS May 19, 2025 08:29
@zellerbaptiste zellerbaptiste merged commit 2a3be36 into main May 19, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
4 participants