Skip to content

Commit 757430a

Browse files
authoredJan 8, 2025
Update embedding sdk version to 0.52.6
Update embedding sdk to 0.52.6 with breaking changes
2 parents f6ad9be + c9f184c commit 757430a

File tree

5 files changed

+30
-17
lines changed

5 files changed

+30
-17
lines changed
 

Diff for: ‎.prettierrc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"semi": true,
3+
"trailingComma": "all"
4+
}

Diff for: ‎README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Metabase embedding SDK for React sample application
22

3-
You'll need a Pro or Enterprise version of Metabase 50 up and running. If you're not sure where to start, sign up for [Pro Cloud](https://www.metabase.com/pricing).
3+
You'll need a Pro or Enterprise version of Metabase 52 up and running. If you're not sure where to start, sign up for [Pro Cloud](https://www.metabase.com/pricing).
44

55
> [!IMPORTANT]
6-
> The SDK is currently only compatible with Metabase v1.50 or higher
6+
> The SDK is compatible with Metabase v1.51 or higher
77
88
## Create `.env` file
99

@@ -28,7 +28,7 @@ On the card that says **JWT**, click the **Setup** button.
2828

2929
### JWT identity provider URI
3030

31-
In the **JWT IDENTITY PROVIDER URI** field, paste `localhost:9090/sso/metabase` (or substitute your Cloud URL for localhost).
31+
In the **JWT IDENTITY PROVIDER URI** field, paste `localhost:9090/sso/metabase` (or substitute your Cloud URL for localhost).
3232

3333
In your `.env` this address is set as:
3434

Diff for: ‎client/package-lock.json

+13-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: ‎client/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"preview": "vite preview"
1212
},
1313
"dependencies": {
14-
"@metabase/embedding-sdk-react": "^1.51.4",
14+
"@metabase/embedding-sdk-react": "^0.52.6",
1515
"react": "^18.3.1",
1616
"react-dom": "^18.3.1"
1717
},
@@ -28,4 +28,4 @@
2828
"globals": "^15.11.0",
2929
"vite": "^5.4.10"
3030
}
31-
}
31+
}

Diff for: ‎client/src/App.jsx

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
1+
/// <reference types="vite/client" />
2+
13
import {
24
MetabaseProvider,
35
InteractiveQuestion,
4-
defineEmbeddingSdkTheme,
5-
defineEmbeddingSdkConfig,
6+
defineMetabaseAuthConfig,
7+
defineMetabaseTheme,
68
} from "@metabase/embedding-sdk-react";
79

810
// Configuration
9-
const config = defineEmbeddingSdkConfig({
11+
const config = defineMetabaseAuthConfig({
1012
metabaseInstanceUrl: import.meta.env.VITE_METABASE_INSTANCE_URL,
1113
authProviderUri: import.meta.env.VITE_AUTH_PROVIDER_URI,
1214
});
1315

1416
const questionId = 14;
1517

16-
const theme = defineEmbeddingSdkTheme({
18+
const theme = defineMetabaseTheme({
1719
// Specify a font to use from the set of fonts supported by Metabase.
1820
// You can set the font to "Custom" to use the custom font
1921
// configured in your Metabase instance.
@@ -44,7 +46,6 @@ const theme = defineEmbeddingSdkTheme({
4446
components: {
4547
question: {
4648
backgroundColor: "#FFFFFF",
47-
textColor: "#4C5773",
4849
},
4950

5051
table: {
@@ -63,8 +64,8 @@ const theme = defineEmbeddingSdkTheme({
6364

6465
function App() {
6566
return (
66-
<div className="App" width="1200px" height="800px">
67-
<MetabaseProvider config={config} theme={theme}>
67+
<div className="App" style={{ width: "1200px", height: "800px" }}>
68+
<MetabaseProvider authConfig={config} theme={theme}>
6869
<InteractiveQuestion questionId={questionId} />
6970
</MetabaseProvider>
7071
</div>

0 commit comments

Comments
 (0)
Please sign in to comment.