-
- Downloads
Embed pdf export - MS2 (#44463)
* add pdf export button to static embed and public sharing (#43743) * add export button to embed frame, it works on static embed and public sharing * move css around to make dashcard border show up on static/public embed pdf exports the library we use to render an html node to an image doesn't seem to support box shadow the original fix was done in ParametersAndCardsContainer, but that component is not used in the static/public embeds * fix types * fix night theme pdf export - use padding for the title instead of starting to draw the image from 60px, to keep the bg color - change the css to also apply the bg-color to the first child of the EmbedFrame, to make it work when exporting to pdfs, where the EmbedFrame is not part of the exported dom * refactor: exportTabAsPdfButtonText function * give a default to the filename, even though it should always be there * exportTabAsPdfButtonText -> getExportTabAsPdfButtonText * introduce .WithThemeBackground to not have a css rule too much generic * feat: adds endpoint to download results of a dashcard part of a public dashboard (#44156) * Flag to hide download buttons (#44206) * pass down downloadsEnabled to hide downloads buttons in public and embedded questions or dashcards * Update frontend/src/metabase/dashboard/components/DashCard/DashCardMenu/DashCardMenu.tsx Co-authored-by:Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev> * PLUGIN_DOWNLOADS_ENABLED -> PLUGIN_RESOURCE_DOWNLOADS * adds comment to areDownloadsEnabled function to explain what it does --------- Co-authored-by:
Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev> * logic to handle downloads url parameter (#44363) * minimal support for downloads url parameter * updates StaticEmbedSetupPane test to epxect downloads=false instead of hide_download_button=true * fix prettier mistakes * tmp fix to the tests until we have the new analytics events * fix eslint issues * update embedding snippets e2e * update embedding questions e2e * try to clean up the mess of downloads/downloadsEnabled * adds `hasPremiumFeature` check to the plugin, adds unit test for the logic * adds TODOS for analytics * unit tests for downloads flag (#45178) * fix download pdf button not showing up when titled=false and there's only one tab * unit tests for downloads flag on dashboards and questions * adds test about the container id, not sure if we should keep it * adds a comment to explain why we enable premium features in the tests * move downloadsEnabled outside of the Boolean cast as it's already a boolean * E2E tests for public/static downloads (#45240) * wip e2e tests * make downloadUtils ts friendly * assertNotEmpty function * adds tests for public questions * e2e tests for static embed downloads * publicUid -> publicUuid * fix assertNotEmpty * fix parameter not renamed * Apply suggestions from code review Co-authored-by:
Denis Berezin <denis.berezin@metabase.com> * remove duplicated test * fix another typo i forgot to rename * fix another rename issue * convert e2e-downloads-helpers to ts * refactor: put method calculation in getEndpoint function * adds note to downloadUtils --------- Co-authored-by:
Denis Berezin <denis.berezin@metabase.com> * Update e2e/test/scenarios/embedding/embedding-snippets.cy.spec.js Co-authored-by:
Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev> * change requires to import to reflect that we changed to export the source code in downloadUtils * makes downloadsEnabled prop more consistent across components * colocate downloadsEnabled with hideDownloadButton in embed-display-options * defaults displayOptions.downloads to true to simplify logic * remove unused queryString parameter in tests setup function * reword TODO * Revert "defaults displayOptions.downloads to true to simplify logic" This reverts commit aebf4cf3cf3528deefb9c40dfc48d2f39a278b97. * fix png export when on dark theme (public/embed) not having the dark … (#45497) * fix png export when on dark theme (public/embed) not having the dark background * move the border-radius fix for the dashcard export to saveChartImage * remove comments --------- Co-authored-by:
Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev> Co-authored-by:
Denis Berezin <denis.berezin@metabase.com>
Showing
- e2e/support/commands.js 2 additions, 1 deletione2e/support/commands.js
- e2e/support/commands/downloads/downloadUtils-untyped.js 7 additions, 5 deletionse2e/support/commands/downloads/downloadUtils-untyped.js
- e2e/support/commands/downloads/downloadUtils.ts 19 additions, 0 deletionse2e/support/commands/downloads/downloadUtils.ts
- e2e/support/config.js 4 additions, 5 deletionse2e/support/config.js
- e2e/support/helpers/e2e-downloads-helpers.ts 75 additions, 35 deletionse2e/support/helpers/e2e-downloads-helpers.ts
- e2e/support/helpers/e2e-embedding-helpers.js 5 additions, 4 deletionse2e/support/helpers/e2e-embedding-helpers.js
- e2e/test/scenarios/embedding/embed-resource-downloads.cy.spec.ts 183 additions, 0 deletions...t/scenarios/embedding/embed-resource-downloads.cy.spec.ts
- e2e/test/scenarios/embedding/embedding-dashboard.cy.spec.js 1 addition, 0 deletionse2e/test/scenarios/embedding/embedding-dashboard.cy.spec.js
- e2e/test/scenarios/embedding/embedding-questions.cy.spec.js 2 additions, 2 deletionse2e/test/scenarios/embedding/embedding-questions.cy.spec.js
- e2e/test/scenarios/embedding/embedding-snippets.cy.spec.js 35 additions, 9 deletionse2e/test/scenarios/embedding/embedding-snippets.cy.spec.js
- e2e/test/scenarios/embedding/shared/embedding-snippets.js 5 additions, 5 deletionse2e/test/scenarios/embedding/shared/embedding-snippets.js
- e2e/test/scenarios/sharing/public-question.cy.spec.js 2 additions, 2 deletionse2e/test/scenarios/sharing/public-question.cy.spec.js
- e2e/test/scenarios/sharing/public-resource-downloads.cy.spec.ts 155 additions, 0 deletions...st/scenarios/sharing/public-resource-downloads.cy.spec.ts
- e2e/test/scenarios/sharing/public-sharing-embed-button-behavior.cy.spec.js 12 additions, 4 deletions...s/sharing/public-sharing-embed-button-behavior.cy.spec.js
- enterprise/frontend/src/embedding-sdk/components/public/InteractiveDashboard/InteractiveDashboard.tsx 1 addition, 1 deletion...ents/public/InteractiveDashboard/InteractiveDashboard.tsx
- enterprise/frontend/src/embedding-sdk/components/public/StaticDashboard/StaticDashboard.tsx 1 addition, 1 deletion...sdk/components/public/StaticDashboard/StaticDashboard.tsx
- enterprise/frontend/src/metabase-enterprise/plugins.js 1 addition, 0 deletionsenterprise/frontend/src/metabase-enterprise/plugins.js
- enterprise/frontend/src/metabase-enterprise/resource_downloads/index.ts 1 addition, 0 deletions...ntend/src/metabase-enterprise/resource_downloads/index.ts
- enterprise/frontend/src/metabase-enterprise/resource_downloads/resource_downloads_plugin.ts 28 additions, 0 deletions...nterprise/resource_downloads/resource_downloads_plugin.ts
- enterprise/frontend/src/metabase-enterprise/resource_downloads/tests/common.unit.spec.ts 23 additions, 0 deletions...e-enterprise/resource_downloads/tests/common.unit.spec.ts
Loading
Please register or sign in to comment