Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
55cd664
Install vue3 and dependencies
hasanakg Nov 3, 2023
6b0bb41
Mock correct version of inertia
itamargiv Nov 3, 2023
f263227
Update error message fallback render function
itamargiv Nov 3, 2023
d6b7d37
Fix missing Vue import
itamargiv Nov 3, 2023
7cd1640
Setup i18n
hasanakg Nov 3, 2023
ae9303d
Setup pinia
hasanakg Nov 3, 2023
0c829c6
Update defineComponent
hasanakg Nov 3, 2023
8d0f3c8
Replace wikit-dialog with codex-dialog in Home.vue
hasanakg Nov 3, 2023
770eb06
Replace wikit-dialog with codex-dialog in Results.vue
hasanakg Nov 3, 2023
120b733
Update bubble
hasanakg Nov 3, 2023
00d029f
Update lifecycle methods
hasanakg Nov 3, 2023
16f1c27
Fix TS errors
hasanakg Nov 3, 2023
5a14f12
Remove vuex from tests
itamargiv Nov 3, 2023
47acded
Replace wikit dialog and select
hasanakg Nov 6, 2023
94accbd
Empty playground.vue
hasanakg Nov 6, 2023
7bb1b54
Add migration eslint rules
hasanakg Nov 6, 2023
d619900
Update propsData to props
itamargiv Nov 7, 2023
37d9970
Update tests
hasanakg Nov 7, 2023
e97286a
Add lost package-lock.json
itamargiv Nov 9, 2023
79bd3e2
Merge pull request #751 from wmde/install-vue3
itamargiv Nov 9, 2023
bdec2f6
Setup i18n (#753)
hasanakg Nov 9, 2023
1bfc2ef
Setup pinia
hasanakg Nov 3, 2023
278cd8b
Merge pull request #752 from wmde/setup-pinia
itamargiv Nov 9, 2023
6e1463c
Merge branch 'feature/update-vue' into update-definecomponent
itamargiv Nov 9, 2023
12493bd
Merge pull request #754 from wmde/update-definecomponent
itamargiv Nov 9, 2023
b6f1fca
Resolve package-lock conflicts
itamargiv Nov 9, 2023
aba60c8
Remove console.log
itamargiv Nov 9, 2023
6383277
Restore Playground.vue
itamargiv Nov 9, 2023
d7d6e2e
Fix linting issues
itamargiv Nov 9, 2023
94eea39
Merge branch 'feature/update-vue' into replace-wikit-dialog
itamargiv Nov 9, 2023
1e61f66
Merge pull request #755 from wmde/replace-wikit-dialog
itamargiv Nov 9, 2023
8603b4b
Merge branch 'feature/update-vue' into fix-deprecation-errors
itamargiv Nov 9, 2023
04e61cb
Merge pull request #756 from wmde/fix-deprecation-errors
itamargiv Nov 9, 2023
d21a06e
Merge branch 'feature/update-vue' into update-tests
itamargiv Nov 9, 2023
5d6799f
Update package-lock
itamargiv Nov 9, 2023
9f4bd03
Merge pull request #757 from wmde/update-tests
itamargiv Nov 9, 2023
4402808
Fix i18n (#760)
itamargiv Nov 10, 2023
3464d0e
Update browser tests (#759)
hasanakg Nov 10, 2023
d5dd0f9
Fix mix manifest
itamargiv Nov 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ module.exports = {
rules: {
'max-len': [ 'error', 120 ],
'no-multiple-empty-lines' : ['error', { 'max': 1 }],
'vue/multi-word-component-names' : [ 'off' ]
},
'vue/multi-word-component-names' : [ 'off' ],
// Migration changes
'vue/no-deprecated-v-bind-sync': 'off',
'vue/no-deprecated-slot-attribute': 'off',
'vue/require-explicit-emits': 'off',
'vue/no-deprecated-v-on-native-modifier': 'off',
'vue/no-deprecated-slot-scope-attribute': 'off',
'vue/no-v-for-template-key-on-child': 'off',
'vue/no-deprecated-destroyed-lifecycle': 'off',
'vue/no-v-model-argument': 'off'
},
};
28 changes: 26 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const path = require("path");
module.exports = {
// Where are your vue tests located?
"roots": [
Expand All @@ -9,7 +10,7 @@ module.exports = {
// js: transform js files with babel, we can now use import statements in tests
// ts: transform ts files with babel, to import ts files into js specs
"transform": {
".*\\.(vue)$": "<rootDir>/node_modules/@vue/vue2-jest",
".*\\.(vue)$": "<rootDir>/node_modules/@vue/vue3-jest",
"^.+\\.js$": "<rootDir>/node_modules/babel-jest",
"^.+\\.tsx?$": "<rootDir>/node_modules/ts-jest"
},
Expand All @@ -21,6 +22,29 @@ module.exports = {
// "import Counter from '@/Counter.vue'"
// (no need for a full path)
"moduleNameMapper": {
"^@/(.*)$": "<rootDir>/resources/js/$1"
"^vue$": "@vue/compat",
'^@vue/composition-api$': '@vue/compat',
'^@wmde/wikit-vue-components$':
'@wmde/wikit-vue-components/dist/wikit-vue-components-vue3compat.common.js',
'^wikit-dist(.*)$': "<rootDir>/node_modules/@wmde/wikit-vue-components/dist$1",
"^@/(.*)$": "<rootDir>/resources/js/$1",
},
// For Vue migration build
// Further info: https://test-utils.vuejs.org/migration/#-vue-vue3-jest-jest-28
"testEnvironmentOptions": {
"customExportConditions": ["node", "node-addons"],
},
// For Vue migration build
// Add compat config to test as well
"globals": {
"vue-jest": {
"compilerOptions": {
compatConfig: {
MODE: 3,
COMPILER_V_ON_NATIVE: true,
COMPILER_V_BIND_SYNC: true
}
}
}
}
}
3,089 changes: 1,624 additions & 1,465 deletions package-lock.json

Large diffs are not rendered by default.

25 changes: 11 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@
"production": "mix --production"
},
"devDependencies": {
"@pinia/testing": "^0.1.3",
"@types/jest": "^29.5.5",
"@types/lodash": "^4.14.199",
"@typescript-eslint/eslint-plugin": "^6.7.5",
"@typescript-eslint/parser": "^6.7.5",
"@vue/compiler-sfc": "^3.3.8",
"@vue/eslint-config-typescript": "^12.0.0",
"@vue/test-utils": "^1.3.6",
"@vue/vue2-jest": "^29.2.6",
"@vue/test-utils": "^2.0.0",
"@vue/vue3-jest": "^29.2.4",
"@vue/runtime-dom": "^3.3.8",
"@wikimedia/codex": "^0.20.0",
"@wikimedia/codex-design-tokens": "^0.20.0",
"@wikimedia/codex-icons": "^0.20.0",
Expand All @@ -42,25 +45,19 @@
"ts-jest": "^29.1.0",
"ts-loader": "^9.5.0",
"typescript": "^5.2.2",
"vue-loader": "^15.10.2",
"vue-template-compiler": "^2.6.14"
"vue-loader": "^16.0.0"
},
"dependencies": {
"@inertiajs/inertia": "^0.11.0",
"@inertiajs/inertia-vue": "^0.8.0",
"@vue/composition-api": "^1.7.2",
"@inertiajs/inertia-vue3": "^0.6.0",
"@vue/compat": "^3.3.8",
"@wmde/wikit-tokens": "^2.1.0-alpha.15",
"@wmde/wikit-vue-components": "^2.1.0-alpha.16",
"date-fns": "^2.30.0",
"lodash": "^4.17.21",
"pinia": "^2.1.7",
"ress": "^5.0.2",
"vue": "^2.6.14",
"vue-banana-i18n": "1.5.0",
"vuex": "^3.6.2"
},
"overrides": {
"@wikimedia/codex": {
"vue": "^2.6.14"
}
"vue": "^3.3.8",
"vue-banana-i18n": "2.3.0"
}
}
10 changes: 5 additions & 5 deletions public/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"review-status-none": "None of the above",
"result-form-submit": "Save reviews",
"changes-submitted-message": "Review successfully saved for:",
"log-in-message": "Please <a href=\"$1\">log in</a> to make any changes.",
"log-in-message": "Please [$1 log in] to make any changes.",
"results-page-description": "You can fix them! The table below presents you with links to the statements on Wikidata and to the entries on the external source. You can compare the values and manually fix the mismatches by editing Wikidata or the external source. After investigating and fixing the mismatches, you can indicate their status using the options from the drop-down. This tool will not automatically make these edits for you upon submission.",
"results-page-title": "What should I do with the mismatches?",
"results-instructions-button": "Instructions",
Expand Down Expand Up @@ -80,17 +80,17 @@
"faq-dialog-question-relevance": "How up-to-date are the mismatches?",
"faq-dialog-answer-relevance": "It depends! Inspecting external databases, catalogs and websites takes a lot of time and resources. The checks are performed periodically in batches. We try hard to remove outdated mismatches, but you might still find some.",
"faq-dialog-question-contributing": "How can I contribute new mismatches?",
"faq-dialog-answer-contributing": "If you've compared Wikidata's data against an external source and have found mismatches, you can open a task in <a href=\"$1\">Phabricator</a> to request an upload of your mismatches.",
"faq-dialog-answer-contributing": "If you've compared Wikidata's data against an external source and have found mismatches, you can open a task in [$1 Phabricator] to request an upload of your mismatches.",
"faq-dialog-question-more-info": "Where can I find more information?",
"faq-dialog-answer-more-info": "This tool’s documentation and the source code are available on <a href=\"$1\">GitHub</a>. You can read more about the Mismatch Finder on <a href=\"$2\">Wikidata</a> or you can <a href=\"$3\">give us feedback</a>.",
"faq-dialog-answer-more-info": "This tool’s documentation and the source code are available on [$1 GitHub]. You can read more about the Mismatch Finder on [$2 Wikidata] or you can [$3 give us feedback].",
"wikidata-tool-footer-about-tool": "About the $1",
"wikidata-tool-footer-license": "Licensed under <a href=\"$1\">$2</a>",
"wikidata-tool-footer-license": "Licensed under [$1 $2]",
"wikidata-tool-footer-source": "Get source code",
"wikidata-tool-footer-issues": "Report an issue",
"wikidata-tool-footer-about-us": "About us",
"wikidata-tool-footer-privacy": "Privacy policy",
"wikidata-tool-footer-wmde": "Wikimedia Deutschland",
"wikidata-tool-footer-team": "Made with ♥ by the <a href=\"$1\">Wikidata Team</a>",
"wikidata-tool-footer-team": "Made with ♥ by the [$1 Wikidata Team]",
"mismatch-finder-license": "BSD 3-Clause License",
"mismatch-finder-footer-more-tools": "More data quality tools",
"tool-query-builder": "Query Builder",
Expand Down
2 changes: 1 addition & 1 deletion public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"/js/app.js": "/js/app.js",
"/css/noscript.css": "/css/noscript.css",
"/css/app.css": "/css/app.css",
"/css/noscript.css": "/css/noscript.css",
"/images/clear.svg": "/images/clear.svg",
"/images/close.svg": "/images/close.svg",
"/images/download-stats.svg": "/images/download-stats.svg",
Expand Down
5 changes: 3 additions & 2 deletions resources/js/Components/AuthWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@

<script lang="ts">

import Vue, { PropType } from 'vue';
import type { PropType } from 'vue';
import { defineComponent } from 'vue';
import User from '../types/User';
import { Link as WikitLink } from '@wmde/wikit-vue-components';

export default Vue.extend({
export default defineComponent({
props: {
user: Object as PropType<User>
},
Expand Down
4 changes: 2 additions & 2 deletions resources/js/Components/LanguageSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@
import LanguageSelectorInput from '../Components/LanguageSelectorInput.vue';
import LanguageSelectorOptionsMenu from '../Components/LanguageSelectorOptionsMenu.vue';
import Language from '../types/Language';
import Vue from 'vue';
import { defineComponent } from 'vue';
import languagedata from '@wikimedia/language-data';
import closeUrl from '../../img/close.svg';

export default Vue.extend( {
export default defineComponent( {
name: 'LanguageSelector',
components: {
LanguageSelectorInput,
Expand Down
4 changes: 2 additions & 2 deletions resources/js/Components/LanguageSelectorInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
</template>

<script lang="ts">
import Vue from 'vue';
import { defineComponent } from 'vue';
import searchUrl from '../../img/search.svg';
import clearUrl from '../../img/clear.svg';

export default Vue.extend( {
export default defineComponent( {
name: 'LanguageSelectorInput',
props: {
value: {
Expand Down
5 changes: 3 additions & 2 deletions resources/js/Components/LanguageSelectorOptionsMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@

<script lang="ts">
import Language from '../types/Language';
import Vue, { PropType } from 'vue';
import type { PropType } from 'vue';
import { defineComponent } from 'vue';

export default Vue.extend( {
export default defineComponent( {
name: 'LanguageSelectorOptionsMenu',
props: {
languages: {
Expand Down
4 changes: 2 additions & 2 deletions resources/js/Components/LoadingOverlay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
</template>

<script lang="ts">
import Vue from 'vue';
import { defineComponent } from 'vue';

export default Vue.extend({
export default defineComponent({
name: 'LoadingOverlay',
props: {
delay: {
Expand Down
47 changes: 25 additions & 22 deletions resources/js/Components/MismatchRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@
</span>
</td>
<td :data-header="$i18n('column-review-status')">
<dropdown
:menuItems="Object.values(statusOptions)"
<cdx-select
:menu-items="Object.values(statusOptions)"
:disabled="disabled"
v-model="decision"
@input="$bubble('decision', {
v-model:selected="reviewStatus"
@update:selected="$bubble('decision', {
id: mismatch.id,
item_id: mismatch.item_id,
review_status: $event.value
review_status: $event
})"
/>
</td>
Expand All @@ -79,15 +79,16 @@
</wikit-button>
</div>
</div>
<wikit-dialog class="full-description-dialog"
<cdx-dialog class="full-description-dialog"
:title="$i18n('column-upload-info')"
ref="fullDescriptionDialog"
:actions="[{
:open="fullDescriptionDialog"
:primary-action="{
label: $i18n('confirm-dialog-button'),
namespace: 'next-steps-confirm'
}]"
@action="(_, dialog) => dialog.hide()"
dismiss-button
namespace: 'next-steps-confirm',
actionType: 'progressive'
}"
@primary="() => fullDescriptionDialog = false"
close-button-label="X"
>
<wikit-link class="uploader"
:href="`https://www.wikidata.org/wiki/User:${mismatch.import_meta.user.username}`"
Expand All @@ -99,21 +100,21 @@
<div class="description">
{{this.mismatch.import_meta.description}}
</div>
</wikit-dialog>
</cdx-dialog>
</td>
</tr>
</template>

<script lang="ts">
import { formatISO } from 'date-fns';

import Vue, { PropType } from 'vue';
import type { PropType } from 'vue';
import { defineComponent } from 'vue';
import {
Button as WikitButton,
Dialog as WikitDialog,
Dropdown,
Link as WikitLink
} from '@wmde/wikit-vue-components';
import { CdxDialog, CdxSelect } from "@wikimedia/codex";
import { MenuItem } from '@wmde/wikit-vue-components/dist/components/MenuItem';

import { LabelledMismatch, ReviewDecision } from "../types/Mismatch";
Expand All @@ -131,14 +132,16 @@ type ReviewOptionMap = {
interface MismatchRowState {
statusOptions: ReviewOptionMap;
decision: ReviewMenuItem;
reviewStatus: string;
fullDescriptionDialog: boolean;
}

export default Vue.extend({
export default defineComponent({
components: {
WikitButton,
WikitLink,
WikitDialog,
Dropdown,
CdxDialog,
CdxSelect
},
props: {
mismatch: Object as PropType<LabelledMismatch>,
Expand Down Expand Up @@ -182,14 +185,14 @@ export default Vue.extend({
return {
statusOptions,
decision: statusOptions[this.mismatch.review_status],
reviewStatus: String(this.mismatch.review_status),
fullDescriptionDialog: false
};
},
methods: {
showDialog(e: Event) {
e.preventDefault();
/* eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
const descriptionDialog = this.$refs.fullDescriptionDialog! as any;
descriptionDialog.show();
this.fullDescriptionDialog = true;
}
}
});
Expand Down
5 changes: 3 additions & 2 deletions resources/js/Components/MismatchesTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@
</template>

<script lang="ts">
import Vue, { PropType } from 'vue';
import type { PropType } from 'vue';
import { defineComponent } from 'vue';
import { Table as WikitTable } from '@wmde/wikit-vue-components';

import MismatchRow from './MismatchRow.vue';

import { LabelledMismatch } from '../types/Mismatch';

export default Vue.extend({
export default defineComponent({
components: {
MismatchRow,
WikitTable,
Expand Down
5 changes: 3 additions & 2 deletions resources/js/Components/WikidataToolFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
</template>

<script lang="ts">
import Vue, { PropType } from 'vue';
import type { PropType } from 'vue';
import { defineComponent } from 'vue';
import { Link as WikitLink } from '@wmde/wikit-vue-components';

interface FooterLabels {
Expand All @@ -45,7 +46,7 @@ interface FooterUrls {
issues: string;
}

export default Vue.extend({
export default defineComponent({
name: 'WikidataToolFooter',
components: {
WikitLink,
Expand Down
4 changes: 2 additions & 2 deletions resources/js/Pages/Error.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
</template>

<script>
import Vue from 'vue';
import { defineComponent } from 'vue';

export default Vue.extend({
export default defineComponent({
props: {
title: String,
description: String
Expand Down
Loading