korbit-ai[bot] commented on code in PR #33119:
URL: https://github.com/apache/superset/pull/33119#discussion_r2041740200
##########
superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx:
##########
@@ -246,8 +246,8 @@ const SliceHeaderControls = (
if (menu) {
menu.style.visibility = 'hidden';
}
- downloadAsImage(
- getScreenshotNodeSelector(props.slice.slice_id),
+ downloadAsPdf(
+ '.dashboard',
Review Comment:
### Incorrect PDF Download Scope <sub></sub>
<details>
<summary>Tell me more</summary>
###### What is the issue?
The selector for PDF download is too broad. It captures the entire dashboard
instead of the specific slice that was intended to be downloaded.
###### Why this matters
Users will receive PDFs of the entire dashboard when they only want a
specific chart/slice, leading to unnecessary content in the exported file.
###### Suggested change ∙ *Feature Preview*
Use the specific chart selector instead:
```typescript
`.dashboard-chart-id-${props.slice.slice_id}`
```
###### Provide feedback to improve future suggestions
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/cd2b4b13-0462-4453-9413-cd8ef1a36313/upvote)
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/cd2b4b13-0462-4453-9413-cd8ef1a36313?what_not_true=true)
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/cd2b4b13-0462-4453-9413-cd8ef1a36313?what_out_of_scope=true)
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/cd2b4b13-0462-4453-9413-cd8ef1a36313?what_not_in_standard=true)
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/cd2b4b13-0462-4453-9413-cd8ef1a36313)
</details>
<sub>
💬 Looking for more details? Reply to this comment to chat with Korbit.
</sub>
<!--- korbi internal id:eba50019-7598-44c7-a314-e728cff9f302 -->
[](eba50019-7598-44c7-a314-e728cff9f302)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]