Skip to content

feat: add viz poc 1#963

Open
nicolaskempf57 wants to merge 104 commits intomainfrom
feat_add_viz_poc_1
Open

feat: add viz poc 1#963
nicolaskempf57 wants to merge 104 commits intomainfrom
feat_add_viz_poc_1

Conversation

@nicolaskempf57
Copy link
Copy Markdown
Contributor

@nicolaskempf57 nicolaskempf57 commented Feb 26, 2026

- Convert resources to computed from savedResources
- Add loadChart() to fetch chart and extract resource IDs from series
- Add loadMissingResourcesForChart() to fetch individual resources
- Add loadSelectedChart() triggered by Charger button
- Switch form from reactive to ref
- Move dataset initialization to top level
- Fetch charts list at top level instead of onMounted
Conciergerie AI and others added 2 commits April 16, 2026 16:42
@nicolaskempf57 nicolaskempf57 marked this pull request as ready for review April 17, 2026 08:13
Comment thread package.json Outdated
Comment thread tests/visualizations/chart-configurator.spec.ts Outdated
Comment thread tests/visualizations/chart-configurator.spec.ts Outdated
Comment thread tests/visualizations/chart-configurator.spec.ts Outdated
Comment thread tests/visualizations/chart-configurator.spec.ts Outdated
Comment thread datagouv-components/src/components/Chart/ChartViewer.vue Outdated

await page.getByLabel('Titre').fill('Test Chart')
await page.getByLabel('Description').fill('Test Description')
await page.waitForTimeout(500)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we need this timeout? Could we have something more precise?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

There is a debounce for the title / description

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I changed it to 300, I don't think we can do it differently

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There is no text appearing after the debounce?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The chart title is updated but we can't select it for now, it's inside the canvas. Later it'll be replace with a p tag and one for the description too but this is not done yet

Comment thread tests/visualizations/chart-configurator.spec.ts Outdated
Comment thread datagouv-components/src/composables/useHasTabularData.ts Outdated
// Check that this function return wanted data
const response = await getData(config, props.resource.id, page, sortConfig)
if ('data' in response && response.data && response.data.length > 0) {
if ('data' in response && response.data && 0 in response.data) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why this change?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think it was a type issue, but I will double check

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yep, the issue from the typecheck is :

Error: src/components/ResourceAccordion/Preview.vue(148,35): error TS2769: No overload matches this call.
  Overload 1 of 2, '(o: {}): string[]', gave the following error.
    Argument of type 'Record<string, unknown> | undefined' is not assignable to parameter of type '{}'.
      Type 'undefined' is not assignable to type '{}'.
  Overload 2 of 2, '(o: object): string[]', gave the following error.
    Argument of type 'Record<string, unknown> | undefined' is not assignable to parameter of type 'object'.
      Type 'undefined' is not assignable to type 'object'.

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.

📊 Datastudio sur data.gouv.fr

2 participants