Skip to content

Commit

Permalink
react/material UI plugin for wq 1.3 (WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
sheppard committed Sep 14, 2021
1 parent 797ba2a commit f9050fa
Show file tree
Hide file tree
Showing 46 changed files with 5,046 additions and 1,811 deletions.
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
packages/*/node_modules
packages/*/dist
build/
data_wizard/static/
25 changes: 25 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"env": {
"browser": true,
"es6": true
},
"extends": [
"eslint:recommended",
"plugin:jest/recommended",
"plugin:react/recommended"
],
"globals": {
"global": "readonly",
"module": "readonly"
},
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": ["react", "jest"],
"rules": {}
}
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ jobs:
node-version: [14]
package:
- progress
- progress-element
- wizard
steps:
- uses: actions/checkout@v2
with:
Expand Down
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*.yml
*.md
*.css
*.html
build/
dist/
data_wizard/static/
20 changes: 9 additions & 11 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
// FIXME: jest ignores if this is moved to package.json
module.exports = {
presets: [
[
'@babel/preset-env',
{
targets: {
node: 'current'
}
}
]
]
plugins: [['@babel/plugin-transform-react-jsx', { useSpread: true }]],
env: {
test: {
presets: [
['@babel/preset-env', { targets: { node: 'current' } }],
'@babel/preset-react',
],
},
},
};
7 changes: 4 additions & 3 deletions data_wizard/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from wq.db import rest
from wq.db.rest.views import ModelViewSet
from wq.db.rest.serializers import ModelSerializer
from wq.db.rest.renderers import HTMLRenderer, JSONRenderer
from .models import Run
from . import views as wizard
from rest_framework.settings import api_settings
Expand Down Expand Up @@ -40,6 +41,7 @@ def get_object_url(self, instance):

class RunViewSet(ModelViewSet, wizard.RunViewSet):
record_serializer_class = RecordSerializer
renderer_classes = [HTMLRenderer, JSONRenderer]
pagination_class = api_settings.DEFAULT_PAGINATION_CLASS
_namespace = 'wq'

Expand All @@ -57,9 +59,8 @@ def user_filter(qs, request):
serializer=RunSerializer,
viewset=RunViewSet,
url='datawizard',
modes=[],
server_modes=[
'list', 'detail',
modes=[
'list', 'detail', 'edit',
'serializers', 'columns', 'ids', 'data', 'auto', 'records',
],
postsave='datawizard/{{id}}{{#task_id}}/auto?task={{task_id}}{{/task_id}}',
Expand Down
2 changes: 2 additions & 0 deletions data_wizard/static/app/js/wizard.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data_wizard/static/app/js/wizard.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit f9050fa

Please sign in to comment.