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

fix(screenshots): dashboard screenshots do not capture filter state #29989

Merged
merged 1 commit into from
Aug 23, 2024

Conversation

fisjac
Copy link
Contributor

@fisjac fisjac commented Aug 22, 2024

SUMMARY

When downloading a Dashboard as image or Export to PDF, the filters applied to the dashboard are not considered in the downloaded/exported file.

To fix this, I've pulled the relevant slices of dashboard state from the redux store and attached them to the screenshot request payload.

TESTING INSTRUCTIONS

Create a Dashboard with a table using the vehicle sales dataset with the date column.

Apply any dashboard Time filter (Time Grain filter → year)

Publish your changes.

Click on the three ellipses > Download as image or Export as PDF

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@dosubot dosubot bot added change:frontend Requires changing the frontend dashboard:export Related to exporting dashboards labels Aug 22, 2024
@apache apache deleted a comment from github-actions bot Aug 22, 2024
@geido
Copy link
Member

geido commented Aug 22, 2024

/testenv up

Copy link
Contributor

@geido Ephemeral environment spinning up at http://34.217.179.238:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@geido geido merged commit 7db34b9 into apache:master Aug 23, 2024
36 of 38 checks passed
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

@sadpandajoe sadpandajoe added the v4.1 Label added by the release manager to track PRs to be included in the 4.1 branch label Aug 27, 2024
sadpandajoe pushed a commit that referenced this pull request Aug 27, 2024
@jacob-roldan
Copy link

Is this feature working with 4.1.0-rc4?

Testing with apache/superset:4.1.0rc4. This is the dashboard:
image

And the image downloaded is:
test-2024-11-05T08-24-35 625Z

I don't see the filter value. I've tested with and without the new parameters ENABLE_DASHBOARD_SCREENSHOT_ENDPOINTS and ENABLE_DASHBOARD_DOWNLOAD_WEBDRIVER_SCREENSHOT, but I had the same result

@github-actions github-actions bot added 🍒 4.1.0 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels labels Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels change:frontend Requires changing the frontend dashboard:export Related to exporting dashboards size/S v4.1 Label added by the release manager to track PRs to be included in the 4.1 branch 🍒 4.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants