Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Charts overriding custom chart config with default config #199

Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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} reactVersion="16" 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
Loading