Skip to content

Commit

Permalink
Merge pull request #199 from propeldata/sasha/pro-2771-charts-overrid…
Browse files Browse the repository at this point in the history
…ing-custom-chart-config-with-default-config

Charts overriding custom chart config with default config
  • Loading branch information
sashathor committed Feb 28, 2024
2 parents 162ba08 + 12f0bef commit 82c19a6
Show file tree
Hide file tree
Showing 106 changed files with 1,898 additions and 2,504 deletions.
5 changes: 5 additions & 0 deletions .changeset/brave-moons-destroy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@propeldata/ui-kit': patch
---

[Counter, Leaderboard, PieChart, TimeSeries]: pass `query.timeZone` when provided
5 changes: 5 additions & 0 deletions .changeset/chatty-snakes-lay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@propeldata/ui-kit': patch
---

Provide `cardProps` to customize wrapper `Card` component
5 changes: 5 additions & 0 deletions .changeset/cool-eels-matter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@propeldata/ui-kit': patch
---

[TimeSeries, Leaderboard, PieChart] Fix custom chart config logic
3 changes: 2 additions & 1 deletion .changeset/soft-cameras-grin.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
'@propeldata/ui-kit': patch
---

Add fallbacks for Loading, Error, and Empty states
Add `errorFallback` callback for Error state, `renderLoader` callback for Loading state, and `renderEmpty` callback for
Empty state.
1,595 changes: 900 additions & 695 deletions .pnp.cjs

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion app/examples/react-16/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# react-16
A CRA (Create React App) project utilizing the [Example Dashboard](../../../packages//examples/dashboard/) to operate
within a React version 16 environment.
4 changes: 1 addition & 3 deletions app/examples/react-16/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@
},
"dependencies": {
"@propeldata/ui-kit": "workspace:^",
"dashboard-example": "workspace:^",
"react": "^16.8.0",
"react-dom": "^16.8.0",
"react-scripts": "^5.0.1"
},
"devDependencies": {
"tailwindcss": "^3.3.1"
},
"browserslist": {
"production": [
">0.2%",
Expand Down
68 changes: 2 additions & 66 deletions app/examples/react-16/src/App.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,5 @@
import React from 'react'
import {
AccessTokenProvider,
ThemeProvider,
useTheme,
FilterProvider,
SimpleFilter,
RelativeTimeRange
} from '@propeldata/ui-kit'
import {
TimeSeriesStaticTest,
TimeSeriesConnectedTest,
LeaderboardStaticTest,
LeaderboardConnectedTest,
CounterStaticTest,
CounterConnectedTest,
PieChartStaticTest,
PieChartConnectedTest
} from 'components'
import { Dashboard } from 'dashboard-example'

const { REACT_APP_CLIENT_ID, REACT_APP_CLIENT_SECRET } = process.env

Expand All @@ -31,53 +14,6 @@ async function fetchToken() {
return access_token
}

const GlobalStyles = () => {
const theme = useTheme()
if (document && theme) {
document.body.style.setProperty('--bg-color', theme.bgSecondary)
}
return null
}

export default function App() {
const [theme, setTheme] = React.useState('lightTheme')
return (
<AccessTokenProvider fetchToken={fetchToken}>
<FilterProvider>
<ThemeProvider baseTheme={theme}>
<GlobalStyles />
<main style={{ color: 'var(--propel-text-secondary)', backgroundColor: 'var(--propel-bg-secondary)' }}>
<h1 className="px-6 py-3 text-3xl">
React 16 Testing App
<button className="m-3" onClick={() => setTheme(theme === 'lightTheme' ? 'darkTheme' : 'lightTheme')}>
{theme === 'lightTheme' ? '🌚' : '🌞'}
</button>
</h1>
<hr />
<div className="px-6 py-3 w-full flex justify-end">
<SimpleFilter
query={{
columnName: process.env.REACT_APP_DIMENSION_1,
dataPool: { name: process.env.REACT_APP_DATA_POOL_UNIQUE_NAME_1 },
maxValues: 1000,
timeRange: { relative: RelativeTimeRange.LastNDays, n: 30 }
}}
autocompleteProps={{ containerStyle: { width: '500px' }, placeholder: 'Filter by taco name' }}
/>
</div>
<div className="grid grid-cols-2 gap-2">
<TimeSeriesStaticTest />
<TimeSeriesConnectedTest />
<LeaderboardStaticTest />
<LeaderboardConnectedTest />
<CounterStaticTest />
<CounterConnectedTest />
<PieChartStaticTest />
<PieChartConnectedTest />
</div>
</main>
</ThemeProvider>
</FilterProvider>
</AccessTokenProvider>
)
return <Dashboard fetchToken={fetchToken} envs={process.env} />
}
48 changes: 0 additions & 48 deletions app/examples/react-16/src/components/CounterStaticTest.jsx

This file was deleted.

68 changes: 0 additions & 68 deletions app/examples/react-16/src/components/LeaderboardConnectedTest.jsx

This file was deleted.

76 changes: 0 additions & 76 deletions app/examples/react-16/src/components/LeaderboardStaticTest.jsx

This file was deleted.

56 changes: 0 additions & 56 deletions app/examples/react-16/src/components/PieChartConnectedTest.jsx

This file was deleted.

Loading

0 comments on commit 82c19a6

Please sign in to comment.