Skip to content

Commit

Permalink
update default querying component views
Browse files Browse the repository at this point in the history
  • Loading branch information
heypoom committed Jan 14, 2025
1 parent ea9bdae commit 0780f53
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 32 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"@mantine/core": "^7.8.0",
"@mantine/form": "^7.8.0",
"@mantine/hooks": "^7.8.0",
"@metabase/embedding-sdk-react": "^0.52.6",
"@metabase/embedding-sdk-react": "^0.53.1-nightly",
"@tanstack/react-query": "^5.32.0",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
Expand Down
26 changes: 2 additions & 24 deletions src/components/InteractiveQuestionView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,8 @@ export const InteractiveQuestionView = ({ isSaveEnabled = false }: Props) => {
</Group>

<Group gap="xs">
<ThemedButton
size="compact-sm"
leftSection={<CustomIcon icon="filter" />}
onClick={() => changeView("filter")}
>
Add a filter
</ThemedButton>

<ThemedButton
size="compact-sm"
leftSection={<CustomIcon icon="sum" />}
onClick={() => changeView("summary")}
>
Change the summary
</ThemedButton>
<InteractiveQuestion.FilterDropdown />
<InteractiveQuestion.SummarizeDropdown />

{isSaveEnabled && (
<ThemedButton
Expand All @@ -78,19 +65,10 @@ export const InteractiveQuestionView = ({ isSaveEnabled = false }: Props) => {

{view === "viz" && (
<Box h="500px">
<InteractiveQuestion.FilterBar />
<InteractiveQuestion.QuestionVisualization />
</Box>
)}

{view === "filter" && (
<InteractiveQuestion.Filter onClose={() => changeView("viz")} />
)}

{view === "summary" && (
<InteractiveQuestion.Summarize onClose={() => changeView("viz")} />
)}

{view === "editor" && (
<InteractiveQuestion.Editor onApply={() => changeView("viz")} />
)}
Expand Down
2 changes: 1 addition & 1 deletion src/themes/proficiency.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const metabase: MetabaseTheme = {
border: "rgba(0, 0, 0, 0.12)",
background: colors.background,
"background-hover": "#fCFDFD",
"background-disabled": colors.lighterGrey,
"background-disabled": "transparent",
charts: [
colors.primary,
"rgba(37, 90, 157, 1)",
Expand Down
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1108,10 +1108,10 @@
resolved "https://registry.yarnpkg.com/@mantine/utils/-/utils-6.0.21.tgz#6185506e91cba3e308aaa8ea9ababc8e767995d6"
integrity sha512-33RVDRop5jiWFao3HKd3Yp7A9mEq4HAJxJPTuYm1NkdqX6aTKOQK7wT8v8itVodBp+sb4cJK6ZVdD1UurK/txQ==

"@metabase/embedding-sdk-react@^0.52.6":
version "0.52.6"
resolved "https://registry.yarnpkg.com/@metabase/embedding-sdk-react/-/embedding-sdk-react-0.52.6.tgz#6fbf6ce0674306f1ac4643fe464a6c10ab627e3a"
integrity sha512-wRtfaB4tDqP55WDz6seH7PCeC1vOxZw7q6elerYKphSv9VRlZlB1f3ae/IHqfvT8XOuFGf9GOUoD7z/85grsiA==
"@metabase/embedding-sdk-react@^0.53.1-nightly":
version "0.53.1-nightly"
resolved "https://registry.yarnpkg.com/@metabase/embedding-sdk-react/-/embedding-sdk-react-0.53.1-nightly.tgz#622bc8fdfadc5eba658717b6c7be0ac3588eccd3"
integrity sha512-ThVQ9EeeDimzUClnZ4otpwyCySRDdx95yV+Avamn5aHWUVs0IZ/gmoqc8869TkMBWtEwXtaEj2rjMK++UifWGg==
dependencies:
"@dnd-kit/core" "^6.0.8"
"@dnd-kit/modifiers" "^6.0.1"
Expand All @@ -1125,7 +1125,7 @@
"@mantine/dates" "^6.0.13"
"@mantine/hooks" "^6.0.13"
"@react-oauth/google" "^0.11.1"
"@reduxjs/toolkit" "^2.3.0"
"@reduxjs/toolkit" "^2.5.0"
"@snowplow/browser-tracker" "^3.1.6"
"@tanstack/react-virtual" "^3.1.2"
"@tippyjs/react" "^4.2.6"
Expand Down Expand Up @@ -1394,7 +1394,7 @@
resolved "https://registry.yarnpkg.com/@react-oauth/google/-/google-0.11.1.tgz#f937c8d02bd37e3a6be7713b8212e9b9b9b3f914"
integrity sha512-tywZisXbsdaRBVbEu0VX6dRbOSL2I6DgY97woq5NMOOOz+xtDsm418vqq+Vx10KMtra3kdHMRMf0hXLWrk2RMg==

"@reduxjs/toolkit@^2.3.0":
"@reduxjs/toolkit@^2.5.0":
version "2.5.0"
resolved "https://registry.yarnpkg.com/@reduxjs/toolkit/-/toolkit-2.5.0.tgz#4679b09b4da211cb9a821803aabf86a13c96fbfa"
integrity sha512-awNe2oTodsZ6LmRqmkFhtb/KH03hUhxOamEQy411m3Njj3BbFvoBovxo4Q1cBWnV1ErprVj9MlF0UPXkng0eyg==
Expand Down

0 comments on commit 0780f53

Please sign in to comment.