-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release 3.2 #105
Release 3.2 #105
Changes from all commits
3952cee
5ddf522
87a035a
3c51435
b70a010
5271454
d06eb7b
e03f246
1040fc4
4650693
0854871
3b14659
f3dd309
8b3c007
4466820
4c622ee
f1b3c1a
5865efa
4cfb0fd
8a11768
d53b7d6
89d20a5
47b471b
81c076d
5c4e9a5
3b19d5d
1cc2c2f
f013dda
8831dea
07ecf50
f3dfe3c
b5d7e79
40d30d3
9c56f9d
a326f5e
51de62c
26bb7aa
0ce5c6b
7dd75d9
b43c065
b73c97c
7aab132
74a3b3a
1397a7e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"includePaths": [ | ||
".", | ||
"assets/scss/" | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
@import "node_modules/uu-bootstrap/scss/configuration"; | ||
|
||
@import "node_modules/vanillajs-datepicker/sass/datepicker-bs5"; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"root": true, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:vue/vue3-recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier" | ||
], | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"parser": "@typescript-eslint/parser", | ||
"sourceType": "module", | ||
"extraFileExtensions": [".vue"] | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts"], | ||
|
||
"parserOptions": { | ||
"project": ["./tsconfig.json"] // Specify it only for TypeScript files | ||
} | ||
} | ||
], | ||
"plugins": [ | ||
"vue", | ||
"@typescript-eslint" | ||
], | ||
"rules": { | ||
"@typescript-eslint/no-non-null-assertion": "off", | ||
"@typescript-eslint/no-inferrable-types": "off", | ||
"vue/html-self-closing": ["error", { | ||
"html": { | ||
"void": "any", | ||
"normal": "always", | ||
"component": "always" | ||
}, | ||
"svg": "always", | ||
"math": "always" | ||
}], | ||
"@typescript-eslint/no-unused-vars": ["warn", { | ||
"varsIgnorePattern": "(props)|(emits?)|_" | ||
}], | ||
"vue/require-v-for-key": "warn", | ||
"vue/no-v-model-argument": "off" // NO idea why this rule exists | ||
}, | ||
"ignorePatterns": ["**/*.test.ts", "dist/*", "node_modules/*"] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.sass-cache/ | ||
*.css.map | ||
*.sass.map | ||
*.scss.map | ||
!dist/css/*.css.map | ||
|
||
node_modules | ||
vite.config.d.ts | ||
*.log* | ||
.cache | ||
.output | ||
.env | ||
generated | ||
|
||
.idea |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Custom UU-List example | ||
|
||
An example of a custom DSCList-based UU-List. You can copy this folder | ||
as a basis. | ||
|
||
## Use as a template: | ||
|
||
1. Copy the contents of this dir to a folder in your project | ||
2. Install deps (yarn install) | ||
3. Update cdh-vue-lib to latest release using yarn | ||
4. Rename `CustomList.vue` to a more descriptive name, and update the `index.ts` import | ||
5. Change the indicated values in `vite.config.ts`; use the name you used for the file above | ||
6. Go make your own implementation! |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"name": "uu-list", | ||
"version": "1.0.0", | ||
"author": "Humanities IT Portal development", | ||
"license": "Apache-2.0", | ||
"scripts": { | ||
"dev": "vite dev", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you give me a quick rundown of how you develop a component that uses whole stack at once? Is it just running the Django test project with both Vite and sass watching for changes in the background? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, sort off. Writing a Vue component just involves running The However, that's only for the Vue components. If you want to build any of the 'root stylesheets' shipped in the library (read: the full UU-bootstrap project + django specific additions), you'll need the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cheers! |
||
"build": "vite build", | ||
"preview": "vite preview" | ||
}, | ||
"dependencies": { | ||
"@intlify/unplugin-vue-i18n": "^1.5.0", | ||
"cdh-vue-lib": "git+https://github.com/CentreForDigitalHumanities/Vue-lib.git#v0.3.2", | ||
"vue-i18n": "9" | ||
}, | ||
"devDependencies": { | ||
"@vitejs/plugin-vue": "^4.3.4", | ||
"typescript": "^5.2.2", | ||
"vite": "^4.4.9", | ||
"vue": "^3.3.4" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
<script setup> | ||
import {DSCList} from "cdh-vue-lib/components"; | ||
import {useI18n} from "vue-i18n"; | ||
|
||
// Required stuff | ||
const props = defineProps(['config']); | ||
|
||
const {t} = useI18n() | ||
|
||
// Demo stuff | ||
function statusColor(status) { | ||
switch (status) { | ||
case "C": | ||
return "green" | ||
|
||
case "R": | ||
return "orange" | ||
|
||
case "O": | ||
return "red" | ||
|
||
default: | ||
return "" | ||
} | ||
} | ||
</script> | ||
|
||
<!-- Here you can define your translations. Please remember to use `t` in your template instead of `$t` --> | ||
<i18n> | ||
{ | ||
"en": { | ||
"name": "Name", | ||
"refnum": "Reference Number", | ||
"status": "Status" | ||
}, | ||
"nl": { | ||
"name": "Naam", | ||
"refnum": "Referentie Nummer", | ||
"status": "Status" | ||
} | ||
} | ||
</i18n> | ||
|
||
<template> | ||
<!-- Required stuff --> | ||
<DSCList :config="config"> | ||
<template #data="{data, isLoading}"> | ||
<!-- Custom stuff --> | ||
<!-- Add your table here --> | ||
<div> | ||
<div v-if="isLoading"> | ||
<!-- Show a 'loading' message if data is being loaded --> | ||
Loading... | ||
</div> | ||
<table class="table" v-else> | ||
<thead> | ||
<tr> | ||
<th> | ||
{{ t('name') }} | ||
</th> | ||
<th> | ||
{{ t('refnum') }} | ||
</th> | ||
<th> | ||
{{ t('status') }} | ||
</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr v-for="datum in data"> | ||
<td> | ||
{{ datum.project_name }} | ||
</td> | ||
<td> | ||
{{ datum.reference_number }} | ||
</td> | ||
<td :class="`text-bg-${statusColor(datum.status)}`"> | ||
{{ datum.get_status_display }} | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
<!-- end custom stuff, begin required stuff --> | ||
</template> | ||
</DSCList> | ||
</template> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import CustomList from "./CustomList.vue"; | ||
import "cdh-vue-lib/dist/style.css" | ||
|
||
export default CustomList; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "esnext", | ||
"module": "esnext", | ||
"strict": true, | ||
"jsx": "preserve", | ||
"moduleResolution": "node", | ||
"declaration": true, | ||
"outDir": "dist", | ||
"skipLibCheck": true, | ||
"esModuleInterop": true, | ||
"allowSyntheticDefaultImports": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"useDefineForClassFields": true, | ||
"resolveJsonModule": true, | ||
"sourceMap": true, | ||
"baseUrl": ".", | ||
"typeRoots": [ | ||
"src/stubs.d.ts" | ||
], | ||
"paths": { | ||
"@/*": [ | ||
"./src/*" | ||
] | ||
}, | ||
"lib": [ | ||
"esnext", | ||
"dom", | ||
"dom.iterable", | ||
"scripthost" | ||
] | ||
}, | ||
"include": [ | ||
"src/**/*.ts", | ||
"src/**/*.tsx", | ||
"src/**/*.vue", | ||
"tests/**/*.ts", | ||
"tests/**/*.tsx" | ||
], | ||
"exclude": [ | ||
"node_modules", | ||
"vite.config.ts" | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason tests don't all suported Python versions named in README.md?
I can imagine it eats up lots of runner minutes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing is now done using Django 5, which does not support Python 3.9;
At some point I had multiple
requirements.txt
per Django version, which would allow proper testing of all version combinations, but that was a lot of (annoying) upkeep.