mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
fix(storybook): fix broken Storybook stories during development (#29587)
Signed-off-by: hainenber <dotronghai96@gmail.com>
This commit is contained in:
@@ -55,7 +55,6 @@ export const parameters = {
|
||||
};
|
||||
|
||||
// Superset setup
|
||||
|
||||
configure();
|
||||
|
||||
// Register color schemes
|
||||
|
||||
@@ -24,8 +24,8 @@ import data from '../data';
|
||||
export const basic = () => (
|
||||
<SuperChart
|
||||
chartType="box-plot"
|
||||
width={400}
|
||||
height={400}
|
||||
width={800}
|
||||
height={600}
|
||||
datasource={dummyDatasource}
|
||||
queriesData={[{ data }]}
|
||||
formData={{
|
||||
|
||||
@@ -111,7 +111,9 @@ export default function transformProps(chartProps) {
|
||||
const data = Array.isArray(rawData)
|
||||
? rawData.map(row => ({
|
||||
...row,
|
||||
values: row.values.map(value => ({ ...value })),
|
||||
values: Array.isArray(row.values)
|
||||
? row.values.map(value => ({ ...value }))
|
||||
: row.values,
|
||||
key: formatLabel(row.key, datasource.verboseMap),
|
||||
}))
|
||||
: rawData;
|
||||
|
||||
@@ -16,8 +16,11 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import { configure as configureTranslation } from '@superset-ui/core';
|
||||
import CertifiedBadge, { CertifiedBadgeProps } from '.';
|
||||
|
||||
configureTranslation();
|
||||
|
||||
export default {
|
||||
title: 'CertifiedBadgeWithTooltip',
|
||||
};
|
||||
|
||||
@@ -75,6 +75,7 @@ if (!isDevMode) {
|
||||
const plugins = [
|
||||
new webpack.ProvidePlugin({
|
||||
process: 'process/browser.js',
|
||||
...(isDevMode ? { Buffer: ['buffer', 'Buffer'] } : {}), // Fix legacy-plugin-chart-paired-t-test broken Story
|
||||
}),
|
||||
|
||||
// creates a manifest.json mapping of name to hashed output used in template files
|
||||
@@ -336,6 +337,7 @@ const config = {
|
||||
fs: false,
|
||||
vm: require.resolve('vm-browserify'),
|
||||
path: false,
|
||||
...(isDevMode ? { buffer: require.resolve('buffer/') } : {}), // Fix legacy-plugin-chart-paired-t-test broken Story
|
||||
},
|
||||
},
|
||||
context: APP_DIR, // to automatically find tsconfig.json
|
||||
|
||||
Reference in New Issue
Block a user