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

Clicking on visualization options on slow loading dashboard cards leads to a page reload or error #21830

Closed
nemanjaglumac opened this issue Apr 20, 2022 · 0 comments · Fixed by #21879
Assignees
Milestone

Comments

@nemanjaglumac
Copy link
Member

nemanjaglumac commented Apr 20, 2022

Describe the bug
If you have a slow loading dashboard card and you edit the dashboard and click on the visualization options ("palette" icon) while the card is still loading, it will reload the whole page in production. It will show an error in the dev mode.

Logs

TypeError: Cannot read properties of undefined (reading 'insights')
    at Object.getHidden (graph.js:320:1)
    at getSettingWidget (settings.js:143:1)
    at settings.js:174:1
    at Array.map (<anonymous>)
    at getSettingsWidgets (settings.js:173:1)
    at getSettingsWidgetsForSeries (visualization.js:96:1)
    at ChartSettings._getWidgets (ChartSettings.jsx:127:1)
    at ChartSettings.render (ChartSettings.jsx:167:1)
    at finishClassComponent (react-dom.development.js:17160:1)
    at updateClassComponent (react-dom.development.js:17110:1)

To Reproduce
Steps to reproduce the behavior:

  1. Throttle the network speed to less than 500kbps
  2. Save Orders as a question and add it to a dashboard when offered to do so
  3. Dashboard should be in the edit mode
  4. While the dashboard card is still loading results, hover over it and click the palette icon
  5. If you're in production, you'll notice a page reload

Alternatively
You probably need to use API to set this up until #14957 gets resolved

  1. Create native PG query select pg_sleep(20) and add it to a dashboard
  2. Open previously created dashboard
  3. While the card is still loading, click on the pencil icon to edit the dashboard
  4. Hover over it and click the palette icon
  5. If you're in production, you'll notice a page reload

Expected behavior
Visualization options, click behavior and add series buttons shouldn't even show up in the UI until the dashboard card query fully finished loading.
Alternatively, make those buttons/icons disabled until card results are ready.

Screenshots
image

Information about your Metabase Installation:
local dev, master, 038e016, H2, Sample Database

Severity
Between the P3 and P2 (because of the page reload).

Additional context
This alone has caused multiple flakes in our E2E test suite in CI.

@nemanjaglumac nemanjaglumac changed the title Visualization options on slow loading dashboard cards lead to a page reload Clicking on visualization options on slow loading dashboard cards leads to a page reload or error Apr 20, 2022
@ranquild ranquild self-assigned this Apr 21, 2022
nemanjaglumac added a commit that referenced this issue Apr 21, 2022
@ranquild ranquild added this to the 0.43 milestone Apr 22, 2022
This was referenced Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants