Skip to content

Commit 1b43c82

Browse files
#161 added support for new vaporwave hight contrast blue data view UI theme
1 parent 1c4fdf9 commit 1b43c82

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
- Quick Launch new Data Preview input box for data files in open workspace
3030
- Save Filtered Data Grid || Chart 📊 Data in `.arrow` `.csv` `.json(s)` `.yml` & `.properties` formats
3131
- Save & Load Data View `.config` options
32-
- Dark & Light Data Preview 🈸 Panel Themes
32+
- Dark, Light & High Contrast Blue Data Preview 🈸 Panel Themes
3333

3434
# Next V.
3535

@@ -54,7 +54,7 @@ List of Data Preview 🈸 extension config Settings, `data.preview` command(s),
5454

5555
| Setting | Type | Default Value | Description |
5656
| ------- | ---- | ------------- | ----------- |
57-
| data.preview.theme | string | dark | Data Preview UI Theme: `dark` or `light` |
57+
| data.preview.theme | string | dark | Data Preview UI Theme: `dark`, `light`, or `vaporwave` (hight contrast blue theme) |
5858
| 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) |
5959
| data.preview.create.json.files | boolean | false | Creates `.json` data files for Arrow, Avro & Excel binary data formats |
6060
| data.preview.create.json.schema | boolean | true | Creates `.schema.json` files for Arrow & Avro metadata binary data formats |

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,10 +317,11 @@
317317
"type": "string",
318318
"enum": [
319319
"light",
320-
"dark"
320+
"dark",
321+
"vaporwave"
321322
],
322323
"default": "dark",
323-
"description": "Data Preview UI Theme: light || dark"
324+
"description": "Data Preview UI Theme: light, dark || vaporwave (hight constrast blue theme)"
324325
},
325326
"data.preview.charts.plugin": {
326327
"type": "string",

src/data.preview.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export class DataPreview {
179179
scripts: scriptsPath,
180180
styles: stylesPath,
181181
theme: this.theme,
182-
themeColor: (this.theme === '.dark') ? '#2f3136': '#eee', // for viewer dropdowns background
182+
themeColor: (this.theme === 'material') ? '#eee' : '#2f3136', // light/dark themes viewer background color
183183
charts: this._charts
184184
});
185185

@@ -820,7 +820,13 @@ export class DataPreview {
820820
*/
821821
get theme(): string {
822822
const uiTheme: string = <string>workspace.getConfiguration('data.preview').get('theme');
823-
return (uiTheme === 'dark' || uiTheme === '.dark') ? '.dark': ''; // blank for light theme css loading
823+
let dataViewTheme: string = 'material'; // default light theme
824+
if (uiTheme === 'dark' || uiTheme === '.dark') {
825+
dataViewTheme += '.dark'; // material dark theme
826+
} else {
827+
dataViewTheme = uiTheme; // custom data view theme
828+
}
829+
return dataViewTheme;
824830
}
825831

826832
/**

templates/data.view.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<script src="https://unpkg.com/@finos/[email protected]/dist/umd/perspective-viewer.js"></script>
1919
<script src="{scripts}/perspective-viewer-hypergrid.js"></script>
2020
<script src="{scripts}/perspective-viewer-{charts}.js"></script>
21-
<link rel="stylesheet" href="https://unpkg.com/@finos/[email protected]/dist/umd/material{theme}.css">
21+
<link rel="stylesheet" href="https://unpkg.com/@finos/[email protected]/dist/umd/{theme}.css">
2222
<style>
2323
body {
2424
margin: 0px;

0 commit comments

Comments
 (0)