Skip to content

Commit

Permalink
#179 added new dense UI themes support
Browse files Browse the repository at this point in the history
+ data preview dense theme settings
+ updated docs for the supported theme list
RandomFractals committed Jan 18, 2020
1 parent 820c553 commit cdbf5dc
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -54,7 +54,7 @@ List of Data Preview 🈸 extension config Settings, `data.preview` command(s),

| Setting | Type | Default Value | Description |
| ------- | ---- | ------------- | ----------- |
| data.preview.theme | string | dark | Data Preview UI Theme: `dark`, `light`, or `vaporwave` (hight contrast blue theme) |
| data.preview.theme | string | dark | Data Preview UI Theme: `dark`, `light`, `dense.light`, `dense.dark`, or `vaporwave` (hight contrast blue theme) |
| data.preview.charts.plugin | string | d3fc | Data Preview Charts 📊 library to use for built-in charts: [d3fc](https://d3fc.io/) or [highcharts](https://www.highcharts.com/demo) |
| data.preview.create.json.files | boolean | false | Creates `.json` data files for Arrow, Avro & Excel binary data formats |
| data.preview.create.json.schema | boolean | true | Creates `.schema.json` files for Arrow & Avro metadata binary data formats |
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -332,10 +332,12 @@
"enum": [
"light",
"dark",
"dense.light",
"dense.dark",
"vaporwave"
],
"default": "dark",
"description": "Data Preview UI Theme: light, dark || vaporwave (hight constrast blue theme)"
"description": "Data Preview UI Theme: light, dark, dense.light, dense.dark || vaporwave (hight constrast blue theme)"
},
"data.preview.charts.plugin": {
"type": "string",
6 changes: 5 additions & 1 deletion src/data.preview.ts
Original file line number Diff line number Diff line change
@@ -821,7 +821,11 @@ export class DataPreview {
get theme(): string {
const uiTheme: string = <string>workspace.getConfiguration('data.preview').get('theme');
let dataViewTheme: string = 'material'; // default light theme
if (uiTheme === 'dark' || uiTheme === '.dark') {
if (uiTheme.startsWith('dense')) {
// append dense UI theme name
dataViewTheme += '-dense';
}
if (uiTheme.endsWith('dark') || uiTheme.endsWith('.dark')) {
dataViewTheme += '.dark'; // material dark theme
} else {
dataViewTheme = uiTheme; // custom data view theme

0 comments on commit cdbf5dc

Please sign in to comment.