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

Accept viewport size as an argument for a proper screenshot of the large pivot table #15

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

doiken
Copy link

@doiken doiken commented Oct 18, 2024

Description:

Screenshots of large pivot tables, such as those using scrollbars, show a broken table.

So it's nice to have the ability to specify the size of the viewport.

Changes:

Testing:

Execute the query at the beginning with arguments.

@@ -28,7 +47,8 @@ export const handleRecordChart: Handler = ({ redash, browser }) => {
const embedUrl = `${redash.alias}/embed/query/${queryId}/visualization/${visualizationId}?api_key=${redash.apiKey}`
const filename = `${query.name}-${visualization?.name}-query-${queryId}-visualization-${visualizationId}.png`

const file = await browser.capture(embedUrl)
const options = prepareOptions(context.matches.input)
Copy link
Author

Choose a reason for hiding this comment

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

There are several candidate methods for obtaining input values.
The motivation for retrieving from matches.input is to also cover workflow steps, slash command

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.

1 participant