-
- Downloads
Make format export optional (#40606)
* Make Formatting on Exports Optional Formatting on exports can be turned off via a middleware key: `:format-export?` which will control if the 'app style' formatting will be applied to the exported results. `:format-export? false` will return the file as in previous Metabase versions. * format_export's default value provided in the QP middleware Should still default to formatted for v. 49, as the formatting is intended as a feature. This default value should be provided in a central place, so is added to the middleware and is therefore not necessary for the API to provide a default. * weird indentation * Add format_export param to dashboard dashcard query endpoint * Add format_export option to embedded dashboard downloads endpoint * Move default true value to the streaming-results-writer impls * Default true but for real this time * Add format_export to the public Question endpoint * Add test to card api * Dashboard exports endpoint test * Add test to dashboard embeds Test still fails and I don't know why yet * the dangers of println debugging.... Well, I was passing a string false the whole time. Turns out the problem was me * Public Card downloads endpoint now has format_export and test * export_format also works for adhoc queries using api/dataset * Let defendpoint do the boolean parsing * Embed endpoint should now work too. * Unify format-rows and format-export middlewares * Sneaky endpoint! * In xlsx, always parse temporal strings so that viz-settings formatting is applied * Snuck in an incomplete change by accident. removed it. * Can now specify format/no format on subscriptions * Fix and move migration * default format rows to true in attachments * Ok, I think that should actually work for subscriptions. * Change endpoints to use format_rows instead of confusing format_export * format_rows everywhere * Fix more test failures * redef'd function had wrong signature * Make format export optional (FE part) (#40643) * Refactor download URL builder code Need to handle query `params` and request `body` separately * Export `useHover` from `metabase/ui` * Add unformatted export for dashboard cards * Add unformatted export for saved questions * Fix POST body encoding * Add unformatted export for ad-hoc questions * Ensure `format_export` is always false for Excel * Add unformatted export to public questions * Add unformatted export to embedded questions and dashboards * Fix behavior for PNG format * Add tests for `QueryDownloadPopover` * Fix e2e downloads helper (allow URL query params) * Rework alt key handling * Add e2e test * Switch to `format_rows` instead of `format_export` * Add unformatted export option to subscriptions * Fix `isHoldingAltKey` initial state * Rework e2e test to use Total column * Fix initial checkbox state for subscriptions * Use "Alt" in tooltip label for Windows/Linux * Show the subscriptions toggle only for CSV attachments --------- Co-authored-by:adam-james <21064735+adam-james-v@users.noreply.github.com> * Address review feedback --------- Co-authored-by:
Anton Kulyk <kuliks.anton@gmail.com>
Showing
- e2e/support/helpers/e2e-downloads-helpers.js 5 additions, 4 deletionse2e/support/helpers/e2e-downloads-helpers.js
- e2e/test/scenarios/sharing/downloads/downloads.cy.spec.js 56 additions, 0 deletionse2e/test/scenarios/sharing/downloads/downloads.cy.spec.js
- frontend/src/metabase/dashboard/components/DashCard/DashCardMenu/DashCardMenu.tsx 4 additions, 4 deletions...shboard/components/DashCard/DashCardMenu/DashCardMenu.tsx
- frontend/src/metabase/query_builder/actions/downloading.ts 45 additions, 22 deletionsfrontend/src/metabase/query_builder/actions/downloading.ts
- frontend/src/metabase/query_builder/components/QueryDownloadPopover/QueryDownloadPopover.styled.tsx 14 additions, 1 deletion...ents/QueryDownloadPopover/QueryDownloadPopover.styled.tsx
- frontend/src/metabase/query_builder/components/QueryDownloadPopover/QueryDownloadPopover.tsx 63 additions, 9 deletions.../components/QueryDownloadPopover/QueryDownloadPopover.tsx
- frontend/src/metabase/query_builder/components/QueryDownloadPopover/QueryDownloadPopover.unit.spec.tsx 129 additions, 0 deletions...s/QueryDownloadPopover/QueryDownloadPopover.unit.spec.tsx
- frontend/src/metabase/query_builder/components/QueryDownloadWidget/QueryDownloadWidget.tsx 4 additions, 4 deletions...er/components/QueryDownloadWidget/QueryDownloadWidget.tsx
- frontend/src/metabase/sharing/components/EmailAttachmentPicker.jsx 42 additions, 1 deletion...src/metabase/sharing/components/EmailAttachmentPicker.jsx
- frontend/src/metabase/sharing/components/SharingSidebar/SharingSidebar.jsx 1 addition, 0 deletions...base/sharing/components/SharingSidebar/SharingSidebar.jsx
- frontend/src/metabase/ui/index.ts 1 addition, 0 deletionsfrontend/src/metabase/ui/index.ts
- resources/migrations/001_update_migrations.yaml 14 additions, 0 deletionsresources/migrations/001_update_migrations.yaml
- src/metabase/api/card.clj 3 additions, 2 deletionssrc/metabase/api/card.clj
- src/metabase/api/dashboard.clj 4 additions, 3 deletionssrc/metabase/api/dashboard.clj
- src/metabase/api/dataset.clj 4 additions, 2 deletionssrc/metabase/api/dataset.clj
- src/metabase/api/embed.clj 8 additions, 6 deletionssrc/metabase/api/embed.clj
- src/metabase/api/public.clj 3 additions, 2 deletionssrc/metabase/api/public.clj
- src/metabase/email/messages.clj 22 additions, 21 deletionssrc/metabase/email/messages.clj
- src/metabase/legacy_mbql/schema.cljc 5 additions, 3 deletionssrc/metabase/legacy_mbql/schema.cljc
- src/metabase/models/pulse.clj 5 additions, 2 deletionssrc/metabase/models/pulse.clj
Loading
Please register or sign in to comment