This project is mirrored from https://github.com/metabase/metabase.
Pull mirroring updated .
- Dec 10, 2024
-
-
github-automation-metabase authored
Co-authored-by:
Phoomparin Mano <poom@metabase.com>
-
github-automation-metabase authored
* wip next sdk compat * better code generation, dts works * Last line of file should end in a newline character * feat(sdk): make MetabaseProvider not break ssr * aUpdate enterprise/frontend/src/embedding-sdk/package.template.json * address pr comments * refactor(sdk): use relative paths when fixing d.ts files * make types work on moduleResolution: node * add loading text * fix(sdk): #50736 make sure we don't break the host app if a sdk component is rendered outside of the provider for a render * fix: this should make types work for real? * self review fixes * update test for PublicComponentWrapper * Update enterprise/frontend/src/embedding-sdk/components/private/PublicComponentWrapper/PublicComponentWrapper.tsx * remove unused component * eslint-disable-next-line for MetabaseProvider * list tsx as dependency * /next -> /nextjs --------- Co-authored-by:
Nicolò Pretto <info@npretto.com> Co-authored-by:
Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev> Co-authored-by:
Phoomparin Mano <poom@metabase.com>
-
- Dec 04, 2024
-
-
github-automation-metabase authored
* add style and className to static dashboards * unify props for static and interactive Co-authored-by:
Phoomparin Mano <poom@metabase.com>
-
- Dec 03, 2024
-
-
github-automation-metabase authored
* rename onClose to onCancel * rename questionHeight to drillThroughQuestionHeight * rename showVisualizationSelector to withVisualizationSelector * rename parameter value props * doc updates for parameter values * rename the chart type selector prop * document the withChartTypeSelector prop Co-authored-by:
Phoomparin Mano <poom@metabase.com>
-
github-automation-metabase authored
* add withVisualizationSelector prop * add tests * add to docs * use default layout in tests * only use custom layout when needed * make withChartTypeSelector false by default Co-authored-by:
Phoomparin Mano <poom@metabase.com>
-
- Nov 29, 2024
-
-
github-automation-metabase authored
feat(sdk): use string types for specifying entity ids instead of internal nanoid type (#50663) (#50704) Co-authored-by:
Phoomparin Mano <poom@metabase.com>
-
- Nov 27, 2024
-
-
github-automation-metabase authored
* add background-inverse color mapping * add tooltip themes * tooltip theming * apply to echarts tooltip * update tooltip default color * update tooltip defaults * add sdk color mapping * add additional theme colors * add echarts tooltip story * add loki tests * remove background-inverse theme color option * add to docs * use ChartTooltipRoot for story and update loki snapshot * update secondaryTextColor docstring * fix unit tests Co-authored-by:
Phoomparin Mano <poom@metabase.com>
-
- Nov 23, 2024
-
-
Denis Berezin authored
* feat(sdk): migrate existing sdk tests to cypress component testing * Self review
-
- Nov 21, 2024
-
-
Phoomparin Mano authored
* add stories for dark theme * add dark theme editor stories * add entity picker colors * add editor-only picker * remove redundant story wrapper for dark theme stories * add theme keys to docs * add warning message
-
- Nov 20, 2024
-
-
Phoomparin Mano authored
* revamp the create question component * docs updates * add stories and update styles * prevent switching to visualization when it is not ready * ensure CreateQuestion works in flex parents * add basic e2e tests for CreateQuestion * ensure that switching between editor and visualization works * use the save button for the disabled state * update the question title when the question is saved * implement updating questions in place * rename replaceQuestion * make CreateQuestion props all optional * add background color to modal header * hide the save button if question is dirty * hide save button instead of disabling per design feedback * update e2e tests * revert e2e helpers * add title update assertions * whitespace changes
-
- Nov 19, 2024
-
-
Phoomparin Mano authored
* allow passing custom views to underlying ad-hoc questions * update readme docs * accept component instead * tweak layout story * update docs * add e2e tests * cleanup tests * remove incorrect tests * simplify tests * rename prop to renderDrillThroughQuestion and update docs * swap docs order * add missing marker * clarify drill-through naming * replace dead links
-
- Nov 13, 2024
-
-
Nicolò Pretto authored
* wip: Alert component for SDKError * use the alert component for the default sdk error component * fix tests * update e2e
-
- Nov 12, 2024
-
-
Phoomparin Mano authored
* add filter picker skeleton * add filter picker skeleton * add picker in popover use case * reuse FilterColumnPicker * add question filter logic * remove fixed width from popover * add onClose handler * add e2e test skeleton * contain FilterBar in Box in story * add a test for adding filters * update e2e tests * add filter picker to the docs * inline props and functions * update the props
-
Oisin Coveney authored
-
- Nov 08, 2024
-
-
Phoomparin Mano authored
-
Mahatthana (Kelvin) Nomsawadi authored
* Correct embedding hash options type semantically * Pass `X-Metabase-Locale` to embed downloads * wip locale header middleware * Allow smart scalar text to be translated * Stop using global variable * Add more details to embedding types * Extend the E2E util type and correct some properties types * Add e2e test * Fix dashboard name * Add a test for static embed question * Make a type name follows a convention Co-authored-by:
Denis Berezin <denis.berezin@metabase.com> * Fix failed E2E tests due to missing default values * Fix public embed not working with `?locale` anymore * Revert "wip locale header middleware" This reverts commit 83d8d135. * Preserve locale when in the `as-admin` macro is used Motivating issue: ```shell ❯ http get 'http://localhost:3000/api/embed/dashboard/eyJhbGciOiJIUzI1NiJ9.eyJyZXNvdXJjZSI6eyJkYXNoYm9hcmQiOjEyfSwicGFyYW1zIjp7fX0.QZ-tEWpgJeSMUuaPfuH6_VQwM2yXNMcuureWCtHsszU/dashcard/162/card/124' x-metabase-locale:fr -pb | jq '.data|.cols|map(.display_name)' [ "State", "Count" ] ``` I'm running a query that has aggregated columns and it is returning the untranslated. Note that these are computed and dynamically given a display name. ```clojure (case tag :count (i18n/tru "Count") :cum-count (i18n/tru "Cumulative count")) ``` The problem is that we run embedding things as admin. And that gets the current user, which in embed and public spaces is nil, and so binds a nil to user-locale, which defaults to english when translating. After: ``` ❯ http get 'http://localhost:3000/api/embed/dashboard/eyJhbGciOiJIUzI1NiJ9.eyJyZXNvdXJjZSI6eyJkYXNoYm9hcmQiOjEyfSwicGFyYW1zIjp7fX0.QZ-tEWpgJeSMUuaPfuH6_VQwM2yXNMcuureWCtHsszU/dashcard/162/card/124' x-metabase-locale:fr -pb | jq '.data|.cols|map(.display_name)' [ "State", "Nombre de lignes" ] ❯ http get 'http://localhost:3000/api/embed/dashboard/eyJhbGciOiJIUzI1NiJ9.eyJyZXNvdXJjZSI6eyJkYXNoYm9hcmQiOjEyfSwicGFyYW1zIjp7fX0.QZ-tEWpgJeSMUuaPfuH6_VQwM2yXNMcuureWCtHsszU/dashcard/162/card/124' x-metabase-locale:zh -pb | jq '.data|.cols|map(.display_name)' [ "State", "行数" ] ❯ http get 'http://localhost:3000/api/embed/dashboard/eyJhbGciOiJIUzI1NiJ9.eyJyZXNvdXJjZSI6eyJkYXNoYm9hcmQiOjEyfSwicGFyYW1zIjp7fX0.QZ-tEWpgJeSMUuaPfuH6_VQwM2yXNMcuureWCtHsszU/dashcard/162/card/124 ' x-metabase-locale:es -pb | jq '.data|.cols|map(.display_name)' [ "State", "Contar" ] ``` This is fetching a dashboard's card which is a query of orders grouped by created at month, sum of total. --------- Co-authored-by:
Nicolò Pretto <info@npretto.com> Co-authored-by:
Denis Berezin <denis.berezin@metabase.com> Co-authored-by:
dan sutton <dan@dpsutton.com>
-
- Nov 07, 2024
-
-
Oisin Coveney authored
-
- Nov 06, 2024
-
-
Nicolò Pretto authored
* refactor + more specific auth errors * fix linting issues * make tests pass, again * make test pass for real? * continues the refactor and hopefully makes tests pass * try to simplify the logic a little bit more * also logs to the console for the edge case of invalid session * remove setLoginStatus * fix typo * fix debug line that should have been commented * remove dead code * remove test for code that doesnt exist * address feedback from PR * update test copy * Update enterprise/frontend/src/embedding-sdk/store/auth.ts Co-authored-by:
Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev> * Update enterprise/frontend/src/embedding-sdk/store/auth.ts Co-authored-by:
Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev> * update copy for site settings error * ex -> exception * Update enterprise/frontend/src/embedding-sdk/store/auth.ts Co-authored-by:
Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev> * Update enterprise/frontend/src/embedding-sdk/store/auth.ts Co-authored-by:
Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev> * update tests to use the updated copy + small typos * refactor: use jest spy on to check for console.error Co-authored-by:
"Mahatthana (Kelvin) Nomsawadi" <me@bboykelvin.dev> * use full error message in test * renamed response to session * mock implementation of console.log * fix(49482): don't create a new store on each MetabaseProvider render (#49492) * fix(49482): don't create a new store on each MetabaseProvider render * remove store prop as it seems to not be used --------- Co-authored-by:
Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
-
- Nov 05, 2024
-
-
Denis Berezin authored
* Add possibility to hide columns in CollectionBrowser * Add tests * Review fixes * Fix e2e
-
Denis Berezin authored
* Add isOpen prop to control CreateDashboardModal * Add props to storybook
-
- Nov 04, 2024
-
-
Phoomparin Mano authored
feat(sdk): ability to enforce the destination collection to save to and hide the collection picker (#49251) * add ability to hide the collection picker * add save options * make sure collectionId is fresh * update sdk question form component * make collectionId accept null * apply saveOptions to sdk components * revert to use initialCollectionId as context name * target the correct collection id * add e2e tests * update e2e tests * move into within * update test * remove collectionId from default args * revert e2e of hide columns * make e2e helper more generic * use saveToCollectionId prop to save to a specific collection * update e2e tests * update comment formatting Co-authored-by:
Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev> * clean up leftover changes from an earlier version * readme update * indicate that saveToCollectionId is only applicable to static questions * revert QuestionEditor.isSaveEnabled defaults * update comment format * remove unused initialCollectionId prop * experiment: try to fix failing custom-columns e2e --------- Co-authored-by:
Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
-
- Nov 01, 2024
-
-
Denis Berezin authored
* Fix scroll for EditableDashboard in fullscreen mode * Fix scroll for InteractiveDashboard in fullscreen mode * Display fullscreen control to dashboards by default * Fix issue with public shared questions empty footer
-
- Oct 30, 2024
-
-
Denis Berezin authored
* fix(sdk): Editable dashboard should not overlap content below it * Add sizing note
-
- Oct 29, 2024
-
-
Oisin Coveney authored
-
- Oct 28, 2024
-
-
Phoomparin Mano authored
-
- Oct 25, 2024
-
-
Phoomparin Mano authored
* cancel request on unmount in static question * use deferred promise * remove logs * alias cancelled to deferred.promise * extract useLoadStaticQuestion hook * add tests for request cancellation * change updateQuestion method * add sanity check with fetchMock
-
- Oct 24, 2024
-
-
Phoomparin Mano authored
* implement saving questions in interactive question * close modal on create question * add e2e test for saving questions
-
Denis Berezin authored
-
- Oct 18, 2024
-
-
Nicolò Pretto authored
* defineEmbeddingSdkConfig to make typing easier when the config is created outside of the jsx * also add defineEmbeddingSdkTheme, move them to index.ts as i don't have a good name for what file to put them into :shrugs: * updated the readme to use the defineXXX functions
-
Oisin Coveney authored
-
- Oct 17, 2024
-
-
Phoomparin Mano authored
* hide downloads by default in the sdk * update readme to reflect withDownloads prop * update readme formatting * update tests
-
- Oct 14, 2024
-
-
Oisin Coveney authored
-
- Oct 08, 2024
-
-
Nicolò Pretto authored
Co-authored-by:
Oisin Coveney <oisin@metabase.com> Co-authored-by:
Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev> Co-authored-by:
bryan <bryan.maass@gmail.com> Co-authored-by:
Nicolò Pretto <info@npretto.com>
-
- Oct 03, 2024
-
-
Nicolò Pretto authored
* wip locale header middleware * wip fe code for the locale provider for both public/static and sdk * clean up code * move api.baseurl assignment outside of useEffect to make it work on first render * e2e test for locale * Revert "wip locale header middleware" This reverts commit c215eac3. * remove public/static code as we want to focus on the sdk * adds docs for `X-Metabase-Locale` header and for why we don't use I18NApi.locale * Update frontend/src/metabase/lib/api.js * doc: explain why we have the unused state
-
- Oct 02, 2024
-
-
Nicolò Pretto authored
* fix(sdk): fix zindex issues after switch to portals * Target portal to a different root than popovers and co --------- Co-authored-by:
Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
-
- Oct 01, 2024
-
-
Nicolò Pretto authored
* fix(sdk): modal pushing content below when opened * render the portal below the content so we don't need the zIndex Co-authored-by:
Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev> --------- Co-authored-by:
Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
-
Uladzimir Havenchyk authored
* add eslint plugin for storybook * fixup * fixup * fixup
-
Nicolò Pretto authored
-
- Sep 30, 2024
-
-
Uladzimir Havenchyk authored
* refactor: rework stories from MDX to MDX + CSF * short syntax * fix or bypass typescript errors * fix leftovers * cleanup leftovers * convert js stories to tsx * restore some comments * fix linting
-
- Sep 26, 2024
-
-
Nicolò Pretto authored
* IS_EMBEDDING_SDK_BUILD -> IS_EMBEDDING_SDK to keep things simple, as we already have that name in other places * don't load metabase css in sdk stories * first two stories * make the store not a global "singleton" anymore * basic test for font-family styles in the SDK * allow any custom font in theme.fontFamily as we actually support it * fix tests using hardcoded default font family
-