Skip to content
This repository has been archived by the owner on May 20, 2024. It is now read-only.

Quasar 2 - second try #2438

Merged
merged 75 commits into from
May 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
5ba54d2
rename styl files to sass files
pogopaule May 18, 2021
5f3d82a
install quasar v2 and quasar/app v3
pogopaule May 18, 2021
ebf7f54
upgrade eslint
pogopaule May 18, 2021
c2add33
update quasar.conf.js
pogopaule May 18, 2021
99e0b14
remove hard-source-webpack-plugin
pogopaule May 18, 2021
56a7730
migrate stylus syntax to sass syntax
pogopaule May 18, 2021
8d6a2eb
fix line in .eslintrc
pogopaule May 18, 2021
b1be735
upgrade vue router
pogopaule May 19, 2021
a2bb197
upgrade vuex
pogopaule May 19, 2021
a27efa0
upgrade vue-i18n
pogopaule May 19, 2021
ff69697
content-class -> class and content-style -> style
pogopaule May 19, 2021
7e77b97
update QScrollObserver
pogopaule May 19, 2021
3a6ae78
update QTable
pogopaule May 19, 2021
9809ad8
zh-hant -> zh-TW
tiltec Aug 22, 2021
014e495
add stylus loader
tiltec Aug 22, 2021
f270b09
upgrade vue-router, vuex, eslint-parser
tiltec Aug 23, 2021
4e75d65
remove old vue dependency
tiltec Aug 23, 2021
f03c6f3
fix datastore and boot files
tiltec Aug 23, 2021
b567c03
WIP fix storybook
tiltec Aug 23, 2021
9fe3e05
fix storybook setup
tiltec Aug 24, 2021
b0e4810
fix first story
tiltec Aug 24, 2021
92a3ece
fix i18n datetime breaking change
tiltec Aug 24, 2021
a3e20ad
fix storybook $icon support
tiltec Aug 24, 2021
d7ba268
rewrite some component styles to sass
tiltec Aug 24, 2021
e0d383f
change stylelint to look for sass files
tiltec Aug 24, 2021
908c512
remove $listeners
tiltec Aug 24, 2021
72d3aef
WIP messy upgrade
tiltec Sep 1, 2021
6c5a670
fix two more tests
tiltec Sep 2, 2021
914f9ba
updates & fixes
tiltec Mar 15, 2022
4d8e090
Merge remote-tracking branch 'origin/master' into quasar-2-second-try
tiltec Mar 15, 2022
ef9f0c6
yarn upgrade
tiltec Mar 15, 2022
107a09a
add @-alias for service worker compilation
tiltec Mar 15, 2022
9032032
try to fix some tests
tiltec Mar 22, 2022
33a16c9
rewrite '>>>' to '::v-deep()'
tiltec Mar 23, 2022
8b0f6e0
add percentage sign
tiltec Mar 23, 2022
61452a5
update dependencies
tiltec Mar 23, 2022
7af2d0e
add back margin on feedbackitem
tiltec Mar 24, 2022
b4e7d42
fix statistics sidenav entry
tiltec Mar 24, 2022
6b96e80
fix some redirects
tiltec Mar 24, 2022
054ebd4
fix: value -> modelValue
tiltec Mar 24, 2022
d727657
fix date-time input on small screens
tiltec Mar 24, 2022
713245c
fix search
tiltec Mar 24, 2022
2eb084b
Merge remote-tracking branch 'origin/master' into quasar-2-second-try
tiltec Mar 24, 2022
cbe143f
ignore storybook-static
tiltec Mar 24, 2022
9a68e68
hey linter
tiltec Mar 24, 2022
41f4232
hey hey
tiltec Mar 24, 2022
4d91f89
fix mobile sidenav
tiltec Mar 25, 2022
56ff00b
fix some map stuff
tiltec Apr 11, 2022
d0dcca6
Merge remote-tracking branch 'origin/master' into quasar-2-second-try
tiltec Apr 11, 2022
7438954
avoid CSP by using vue-i18n runtime
tiltec Apr 11, 2022
a7d548e
Revert "avoid CSP by using vue-i18n runtime"
tiltec Apr 11, 2022
9677a21
yarn upgrade
tiltec Apr 11, 2022
ce3cab6
skip extra upgrade step
tiltec Apr 11, 2022
07d67a9
drop outdated comment
tiltec Apr 11, 2022
77f3e76
clarify comment about compat mode
tiltec Apr 11, 2022
f3b7d44
Fix sending wall messages
nicksellen Apr 13, 2022
2d87a8c
Update deps
nicksellen Apr 27, 2022
6947f2c
Downgrade to jest 27
nicksellen Apr 27, 2022
89f94b6
replace unmaintained eslint-plugin-node
tiltec Apr 29, 2022
7a042de
adjust code style
tiltec Apr 29, 2022
47bff2a
try skipping one test
tiltec Apr 29, 2022
e798c4a
Fix storyshot tests
nicksellen May 4, 2022
e400a11
Update snapshots
nicksellen May 4, 2022
36d4a1f
Merge branch 'quasar-2-second-try' of github.com:karrot-dev/karrot-fr…
nicksellen May 4, 2022
6ae85ab
Style fixes
nicksellen May 4, 2022
fda1089
Remove debug logging
nicksellen May 4, 2022
ef4596a
Fix router tests
nicksellen May 4, 2022
8ab9945
Fix signup component test
nicksellen May 4, 2022
be0332e
Fix conversation tests
nicksellen May 4, 2022
e7dcd19
Fix map tests
nicksellen May 4, 2022
ea9d520
Style fixes
nicksellen May 4, 2022
0d8daf8
Update snapshots
nicksellen May 4, 2022
1e44add
Explain use of markRaw
nicksellen May 5, 2022
8df55f2
Merge remote-tracking branch 'origin/master' into quasar-2-second-try
tiltec May 8, 2022
2061076
remove double space
tiltec May 8, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 2 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -373,10 +373,8 @@ jobs:
git config user.name "CircleCI"
git branch --delete --force $BRANCH || true
git checkout -b $BRANCH
yarn upgrade --latest --ignore-engines
# stay with quasar@1 and vue@2 and webpack@4 until we found time to upgrade
# downgrade stylelint due to https://github.com/karrot-dev/karrot-frontend/issues/2461
yarn upgrade --ignore-engines vue@legacy quasar@legacy @quasar/app@legacy vuex-persistedstate@^3.1.0 stylelint-webpack-plugin@^2.2.2 eslint-webpack-plugin@2 @quasar/quasar-ui-qiconpicker@qv1 @vue/test-utils@^1.3.0 stylelint@^13.13.1 vue-router@^3 vue-i18n@^8
nicksellen marked this conversation as resolved.
Show resolved Hide resolved
# holding back jest to 27 due to https://github.com/vuejs/vue-jest/issues/467
yarn upgrade --latest --ignore-engines jest@^27 babel-jest@^27 jest-environment-jsdom@^27
tee pr.txt \<<EOL
[CI] update dependencies

Expand Down
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
/src-cordova
/.quasar
/node_modules
/storybook-static
/docs/_book
/docs/node_modules
/docs/book
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = {
// Uncomment any of the lines below to choose desired strictness,
// but leave only one uncommented!
// See https://eslint.vuejs.org/rules/#available-rules
'plugin:vue/recommended', // Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead)
'plugin:vue/vue3-recommended', // Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead)

'standard',

Expand Down
10 changes: 8 additions & 2 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
// require('@storybook/addon-postcss')

const QuasarConfFile = require('@quasar/app/lib/quasar-conf-file')
const getQuasarCtx = require('@quasar/app/lib/helpers/get-quasar-ctx')

module.exports = {
stories: ['../src/**/*.story.js'],
core: {
builder: 'webpack5',
},
stories: ['../src/**/LatestMessages.story.js'],
addons: [
'@storybook/addon-actions',
'@storybook/addon-links',
'@storybook/addon-essentials',
],
webpackFinal: async (config, { configType }) => {
// `configType` has a value of 'DEVELOPMENT' or 'PRODUCTION'
Expand All @@ -19,7 +25,7 @@ module.exports = {
const quasarConfig = new QuasarConfFile(ctx)
await quasarConfig.prepare()
await quasarConfig.compile()
const webpackConfig = quasarConfig.webpackConf
const webpackConfig = quasarConfig.webpackConf.renderer

// Manual merge with our webpack config
config.module.rules = webpackConfig.module.rules
Expand Down
39 changes: 18 additions & 21 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,25 @@
// Vue config
import 'quasar/dist/quasar.styl'
import '../src/css/app.styl'
import 'quasar/dist/quasar.css'
import '@/css/app.sass'

import Vue from 'vue'
import Vuex from 'vuex'
import VueI18n from 'vue-i18n'
import VueRouter from 'vue-router'
import configureQuasar from '>/configureQuasar'
import { RouterLinkStub, TransitionStub, TransitionGroupStub } from '@vue/test-utils'
import { IconPlugin } from '@/base/icons'
// import Vuex from 'vuex'
// import VueRouter from 'vue-router'
import { i18nPlugin } from '@/base/i18n'
import { Quasar } from 'quasar'
import quasarConfig from '>/quasarConfig'
import { RouterLinkStub } from '@vue/test-utils'
import icons from '@/base/icons'
import { app } from '@storybook/vue3'

Vue.config.productionTip = false
Vue.config.devtools = true
configureQuasar(Vue)
Vue.use(Vuex) // Install Vuex
Vue.use(IconPlugin)
Vue.use(VueI18n)
Vue.use(VueRouter)
app.use(i18nPlugin)
app.use(Quasar, quasarConfig)
// app.use(Vuex)
// app.use(VueRouter)
app.config.globalProperties.$icon = icons.get

Vue.component('RouterLink', RouterLinkStub)
Vue.component('Transition', TransitionStub)
Vue.component('TransitionGroup', TransitionGroupStub)
Vue.directive('measure', {})
Vue.config.errorHandler = (err, vm, info) => {
app.component('RouterLink', RouterLinkStub)
app.directive('measure', {})
app.config.errorHandler = (err, vm, info) => {
console.log(err, vm, info)
}

Expand Down
1 change: 0 additions & 1 deletion CONTRIBUTE.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,4 @@ To make it easier to look for documentation and help on the internet, here's a l
* JS framework: [VueJS](https://vuejs.org/v2/guide/)
* UI framework: [Quasar](http://quasar.dev/guide/)
* State management: [Vuex](https://vuex.vuejs.org/en/)
* Style: [Stylus](http://stylus-lang.com/)
* Test framework: [Jest](https://facebook.github.io/jest/docs/en/getting-started.html)
3 changes: 0 additions & 3 deletions build/stylelintCustomSyntax.js

This file was deleted.

2 changes: 1 addition & 1 deletion docs/src/forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,4 +169,4 @@ e.g. the status about a `save` action would be available as `saveStatus` or the
- uses `hasNonFieldError` & `firstNonFieldError` to show errors unrelated to fields?
- sets `::loading="isPending"` on submit button?
- uses pending status for non-submit actions? (e.g. destroy)
- Does the form use [vuelidate](https://monterail.github.io/vuelidate/) (`$v`) to check for validation errors client-side?
- Does the form use [vuelidate](https://vuelidate-next.netlify.app) to check for validation errors client-side?
4 changes: 2 additions & 2 deletions docs/src/frontend-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ src/
- ...
- datastore/ # vuex namespaced modules and plugins
- activity.js
- activity.spec.js # unit test
- activity.spec.js # unit test
- ...
- components/ # reusable components (atoms, molecules, organism)
- ActivityUser.vue
Expand All @@ -26,7 +26,7 @@ src/
- ...
- pages/ # page templates and instances
- ActivitiesManage.vue # page connected with mapGetters and mapActions
- ActivitiesManageUI.vue # or with vuex-connect
- ActivitiesManageUI.vue
- ...
```

Expand Down
56 changes: 56 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
const esModules = ['quasar', 'quasar/lang', 'lodash-es', 'leaflet'].join('|')

module.exports = {
roots: [
'<rootDir>/src/',
],
globals: {
__DEV__: true,
},
testEnvironment: 'jsdom',
testEnvironmentOptions: {
pretendToBeVisual: true,
},
collectCoverage: true,
coverageDirectory: './coverage/',
coverageReporters: [
'json',
'lcov',
],
// Needed in JS codebases too because of feature flags
coveragePathIgnorePatterns: ['/node_modules/', '.d.ts$'],
testMatch: [
'<rootDir>/src/**/*.spec.js',
],
moduleDirectories: [
'node_modules',
'<rootDir>/src',
],
moduleFileExtensions: ['vue', 'js', 'json'],
moduleNameMapper: {
'^quasar$': 'quasar/dist/quasar.esm.prod.js',
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/test/fileMock.js',
'\\.(css|less|styl|stylus|sass|scss)$': '<rootDir>/test/styleMock.js',
'@/(.*)$': '<rootDir>/src/$1',
'>/(.*)$': '<rootDir>/test/$1',
},
transform: {
'.*\\.vue$': '@vue/vue3-jest',
'.*\\.js$': 'babel-jest',
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub',
},
transformIgnorePatterns: [`node_modules/(?!(${esModules}))`],
snapshotSerializers: ['jest-serializer-vue'],
setupFiles: [
'<rootDir>/test/setup/env.js',
'<rootDir>/test/setup/unhandledPromiseRejectionHandler.js',
'<rootDir>/test/setup/mockRandom.js',
'<rootDir>/test/setup/mockScroll.js',
'<rootDir>/test/setup/mockUserAgent.js',
'<rootDir>/test/setup/mockLocation.js',
'jest-canvas-mock',
],
setupFilesAfterEnv: [
'<rootDir>/test/setup/afterEnv.js',
],
}
4 changes: 3 additions & 1 deletion jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
"exclude": [
"dist",
".quasar",
"node_modules"
"node_modules",
"storybook-static",
"docs/_book"
]
}
Loading