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

"Preview via API" examples from docs don't work #1523

Closed
sam-e-ch opened this issue May 22, 2024 · 3 comments
Closed

"Preview via API" examples from docs don't work #1523

sam-e-ch opened this issue May 22, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@sam-e-ch
Copy link

Describe the bug
When looking at both examples linked on https://visualize.admin.ch/docs/charts/preview-via-api there is the same error:

Application error: a client-side exception has occurred (see the browser console for more information).

The browser console shows the following message:

Error: You need an <ConfiguratorStateProvider> to useConfiguratorState
    at ew (configurator-state.tsx:1856:11)
    at R (chart-published.tsx:62:19)
    at ak (react-dom.production.min.js:167:135)
    at i (react-dom.production.min.js:290:335)
    at oD (react-dom.production.min.js:280:383)
    at react-dom.production.min.js:280:319
    at oO (react-dom.production.min.js:280:319)
    at oE (react-dom.production.min.js:271:86)
    at ox (react-dom.production.min.js:268:399)
    at x (scheduler.production.min.js:13:197)
    at MessagePort.T (scheduler.production.min.js:14:126)

To Reproduce
Steps to reproduce the behavior:

  1. Open https://visualize.admin.ch/_preview or https://visualize.admin.ch/_preview_post
  2. There is an error message but no chart

Expected behavior
I expect the demos to show a working chart.

Environment (please complete the following information):

I tested it both on Pop!_OS 22.04 using Chromium Version 124 and Windows 11 using Edge 124.

@sam-e-ch sam-e-ch added the bug Something isn't working label May 22, 2024
@ptbrowne
Copy link
Collaborator

Thanks @sam-e-ch for the feedback, and sorry for the inconvenience. It has been solved via #1524.

For my curiosity, could you explain to me how do you use the preview and how it is useful to you ? It might be something we'd want to include in a future "usecases" section on the visualize documentation site.

@ptbrowne
Copy link
Collaborator

It should be deployed to test.visualize.admin.ch shortly.

@Rdataflow
Copy link
Contributor

@ptbrowne The idea is to facilitate the navigation of NFI charts - to in the future better integrate with lfi.ch/resultate/ page without going through the whole chart selection and configuration but to provide a limited set of parameters to adapt ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants