Skip to content

Commit

Permalink
Merge pull request #435 from deneb-viz/feature/json-editor-grand-changes
Browse files Browse the repository at this point in the history
Initial JSON  updates to editor component
  • Loading branch information
dm-p authored May 6, 2024
2 parents 9d34bf5 + 831caad commit ff0a855
Show file tree
Hide file tree
Showing 202 changed files with 39,011 additions and 16,111 deletions.
19 changes: 11 additions & 8 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
bin
node_modules
dist
coverage
test
.eslintrc.js
karma.conf.ts
test.webpack.config.js
bin
node_modules
dist
coverage
test
.eslintrc.js
karma.conf.ts
test.webpack.config.js
src/features/json-editor/theme/*.js
# packages are handled by individual inting
packages
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
24 changes: 18 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,20 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v2
- name: Check out code
uses: actions/checkout@v3
- name: Cache turbo build setup
uses: actions/cache@v3
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- name: Setup Node
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 14
node-version: 20
cache: 'npm'
- name: Cache Node.js modules
uses: actions/cache@v2
with:
Expand All @@ -23,14 +31,18 @@ jobs:
${{ runner.OS }}-
- name: Install Packages
run: npm ci
- name: Build packages
run: npm run build
- name: Check Package Versions are in Sync
run: npm run validate-packages-sync
- name: Validate Current Configuration (deneb-config.json)
run: npm run validate-config-for-commit
- name: Linting Checks
run: npm run eslint
- name: Prettier Checks
run: npm run prettier-check
- name: Unit Tests
run: npm test
- name: Tests
run: npm run test
- name: Confirm pbiviz package (AppSource Version)
run: npm run package
# When pushing to 'main', this will invoke an alpha build
Expand Down
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,10 @@ typings/
.api/
.tmp/
dist/
webpack.statistics*.html
webpack.statistics*.html

# Yalc
**/.yalc/**/*.md

# Turbo
.turbo
3 changes: 2 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
legacy-peer-deps=true
legacy-peer-deps=true
@deneb-viz:registry=https://registry.npmjs.org/
50 changes: 50 additions & 0 deletions .syncpackrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"$schema": "https://unpkg.com/[email protected]/dist/schema.json",
"source": [
"package.json",
"packages/*/package.json"
],
"indent": " ",
"versionGroups": [
{
"label": "Power BI Visuals API should match desired version",
"dependencies": [
"powerbi-visuals-api"
],
"dependencyTypes": [
"dev"
],
"pinVersion": "5.7.0"
},
{
"label": "Vega should be specific version we wish to package",
"dependencies": [
"vega"
],
"dependencyTypes": [
"dev"
],
"pinVersion": "5.28.0"
},
{
"label": "Vega-Lite should be specific version we wish to package",
"dependencies": [
"vega-lite"
],
"dependencyTypes": [
"dev"
],
"pinVersion": "5.18.0"
},
{
"label": "Use wildcard when developing local packages",
"dependencies": [
"@deneb-viz/**"
],
"dependencyTypes": [
"dev"
],
"pinVersion": "*"
}
]
}
5 changes: 5 additions & 0 deletions assets/error_indicator_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions assets/error_indicator_light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions assets/warning_indicator_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions assets/warning_indicator_light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 additions & 0 deletions capabilities.json
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,35 @@
"displayName": "Editor Options",
"description": "Editor Options description.",
"properties": {
"theme": {
"displayNameKey": "Objects_Editor_Theme",
"descriptionKey": "Objects_Editor_Theme_Description",
"displayName": "Theme",
"description": "Theme description.",
"type": {
"enumeration": [
{
"displayNameKey": "Enum_Theme_Dark",
"value": "dark",
"displayName": "Dark"
},
{
"displayNameKey": "Enum_Theme_Light",
"value": "light",
"displayName": "Light"
}
]
}
},
"backgroundPassThrough": {
"displayNameKey": "Objects_Editor_BackgroundPassThrough",
"descriptionKey": "Objects_Editor_BackgroundPassThrough_Description",
"displayName": "BG pass-through",
"description": "BG pass-through description",
"type": {
"bool": true
}
},
"position": {
"displayNameKey": "Objects_Editor_Position",
"descriptionKey": "Objects_Editor_Position_Description",
Expand Down Expand Up @@ -417,6 +446,15 @@
"type": {
"numeric": true
}
},
"localCompletion": {
"displayNameKey": "Objects_Editor_LocalCompletion",
"descriptionKey": "Objects_Editor_LocalCompletion_Description",
"displayName": "Local auto-completion",
"description": "Local auto-completion description",
"type": {
"bool": true
}
}
}
},
Expand Down
31 changes: 15 additions & 16 deletions config/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import capabilities from '../capabilities.json';
import features from './features.json';
import { dependencies } from '../package.json';
import { devDependencies } from '../package.json';
import { visual } from '../pbiviz.json';
import { SelectionMode } from '../src/features/interactivity';
import { SelectionMode } from '@deneb-viz/core-dependencies';

/**
* This is an object that contains the visual's metadata. This is used to
Expand Down Expand Up @@ -184,22 +184,24 @@ export const PROPERTY_DEFAULTS = {
showVersionNotification: false
},
editor: {
provider: 'jsoneditor',
backgroundPassThrough: true,
dataTableRowsPerPage: PREVIEW_PANE_DATA_TABLE.rowsPerPage.default,
debounceInterval: 200,
tabSize: 2,
position: 'left',
fontSize: {
default: 10,
min: 8,
max: 30
},
wordWrap: true,
localCompletion: false,
maxLineLength: 40,
position: 'left',
previewScrollbars: false,
showGutter: true,
showLineNumbers: true,
showViewportMarker: true,
maxLineLength: 40,
previewScrollbars: false,
dataTableRowsPerPage: PREVIEW_PANE_DATA_TABLE.rowsPerPage.default
tabSize: 2,
theme: 'light',
wordWrap: true
},
vega: {
jsonSpec: null,
Expand Down Expand Up @@ -247,14 +249,12 @@ export const PROVIDER_RESOURCES = {
interactivityDocumentationUrl:
'https://deneb-viz.github.io/interactivity-overview',
changelogDocumentationUrl: 'https://deneb-viz.github.io/changelog',
examplesUrl: 'https://deneb-viz.github.io/community/resources',
legacyVersion: '1.0.0.57'
examplesUrl: 'https://deneb-viz.github.io/community/resources'
},
vega: {
documentationUrl: 'https://vega.github.io/vega/docs/',
examplesUrl: 'https://vega.github.io/vega/examples/',
schemaUrl: 'https://vega.github.io/schema/vega/v5.json',
legacyVersion: '5.21.0',
patch: {
signals: [
{
Expand All @@ -271,8 +271,7 @@ export const PROVIDER_RESOURCES = {
vegaLite: {
documentationUrl: 'https://vega.github.io/vega-lite/docs/',
examplesUrl: 'https://vega.github.io/vega-lite/examples/',
schemaUrl: 'https://vega.github.io/schema/vega-lite/v5.json',
legacyVersion: '5.1.1'
schemaUrl: 'https://vega.github.io/schema/vega-lite/v5.json'
}
};

Expand All @@ -283,8 +282,8 @@ export const PROVIDER_RESOURCES = {
* if necessary.
*/
export const PROVIDER_VERSIONS = {
vega: dependencies['vega'],
vegaLite: dependencies['vega-lite']
vega: devDependencies['vega'],
vegaLite: devDependencies['vega-lite']
};

/**
Expand Down
Loading

0 comments on commit ff0a855

Please sign in to comment.