Skip to content

Commit 7a92e2f

Browse files
committed
Fix Vue 3 linting errors
Replace deprecated filter syntax with localize() function calls and clean up test files.
1 parent 89aac95 commit 7a92e2f

File tree

15 files changed

+66
-56
lines changed

15 files changed

+66
-56
lines changed

client/src/components/ActivityBar/ActivitySettings.test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import { useActivityStore } from "@/stores/activityStore";
1010
import mountTarget from "./ActivitySettings.vue";
1111

1212
const localVue = getLocalVue();
13-
localVue.use(PiniaVuePlugin);
1413

1514
const { server, http } = useServerMock();
1615
const activityItemSelector = ".activity-settings-item";

client/src/components/Annotation.vue

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
class="annotation"
77
tag-name="p"
88
:value="annotation"
9-
:title="'Edit annotation...' | localize"
10-
:placeholder="'Edit annotation...' | localize">
9+
:title="localize('Edit annotation...')"
10+
:placeholder="localize('Edit annotation...')">
1111
<DebouncedInput v-slot="inputScope" v-model="annotation" :delay="1000">
1212
<b-form-textarea
1313
size="sm"
@@ -24,6 +24,8 @@
2424
</template>
2525

2626
<script>
27+
import { localize } from "@/utils/localization";
28+
2729
import DebouncedInput from "./DebouncedInput";
2830
2931
import ClickToEdit from "./ClickToEdit.vue";
@@ -49,9 +51,6 @@ export default {
4951
},
5052
},
5153
},
52-
methods: {
53-
localize,
54-
},
5554
};
5655
</script>
5756

client/src/components/DatasetInformation/DatasetInformation.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ interface DatasetResponse {
2626
}
2727

2828
const datasetResponse: DatasetResponse = {
29-
id: "FOO_HDA_ID",
29+
id: HDA_ID,
3030
hid: 32,
3131
uuid: "5e89abe4-e8f7-468a-9ef1-d4e322183fa5",
3232
name: "Add column on data 31",

client/src/components/Form/Elements/FormBoolean.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ describe("FormBoolean", () => {
1919

2020
it("check initial value and value change", async () => {
2121
const switchComponent = wrapper.findComponent(".custom-switch");
22+
const input = wrapper.find("input[type='checkbox']");
2223
expect(switchComponent.props().value).toBe(false);
2324
await wrapper.setProps({ value: "true" });
2425
expect(wrapper.emitted().input[0][0]).toBe(true);

client/src/components/Form/Elements/FormData/FormData.test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import MountTarget from "./FormData.vue";
1414
jest.mock("@/composables/filter");
1515

1616
const localVue = getLocalVue();
17-
localVue.use(PiniaVuePlugin);
1817

1918
let eventStore;
2019

client/src/components/Indices/IndexFilter.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
name="query"
88
:value="debouncedValue"
99
autocomplete="off"
10-
:placeholder="placeholder | localize"
10+
:placeholder="localize(placeholder)"
1111
data-description="filter index input"
1212
class="search-query index-filter-query"
1313
:size="size"
@@ -45,6 +45,7 @@ import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
4545
import { BButton, BInputGroup, BInputGroupAppend, BModal } from "bootstrap-vue";
4646
4747
import DebouncedInput from "@/components/DebouncedInput";
48+
import { localize } from "@/utils/localization";
4849
4950
/**
5051
* Component for the search/filter button on the top of Galaxy object index grids.

client/src/components/RuleCollectionBuilder.vue

Lines changed: 43 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -52,35 +52,35 @@
5252
'rules-container-full': initialElements == null,
5353
}">
5454
<RuleComponent
55+
v-model:display-rule-type="displayRuleType"
5556
rule-type="sort"
56-
:display-rule-type.sync="displayRuleType"
5757
@saveRule="handleRuleSave">
58-
<ColumnSelector :target.sync="addSortingTarget" :col-headers="activeRuleColHeaders" />
58+
<ColumnSelector v-model:target="addSortingTarget" :col-headers="activeRuleColHeaders" />
5959
<label v-b-tooltip.hover.noninteractive :title="titleNumericSort">
6060
<input v-model="addSortingNumeric" type="checkbox" />
6161
{{ l("Numeric sorting.") }}
6262
</label>
6363
</RuleComponent>
6464
<RuleComponent
65+
v-model:display-rule-type="displayRuleType"
6566
rule-type="add_column_basename"
66-
:display-rule-type.sync="displayRuleType"
6767
@saveRule="handleRuleSave">
6868
<ColumnSelector
69-
:target.sync="addColumnBasenameTarget"
69+
v-model:target="addColumnBasenameTarget"
7070
:col-headers="activeRuleColHeaders" />
7171
</RuleComponent>
7272
<RuleComponent
73+
v-model:display-rule-type="displayRuleType"
7374
rule-type="add_column_rownum"
74-
:display-rule-type.sync="displayRuleType"
7575
@saveRule="handleRuleSave">
7676
<label>
7777
{{ l("Starting from") }}
7878
<input v-model="addColumnRownumStart" type="number" min="0" />
7979
</label>
8080
</RuleComponent>
8181
<RuleComponent
82+
v-model:display-rule-type="displayRuleType"
8283
rule-type="add_column_metadata"
83-
:display-rule-type.sync="displayRuleType"
8484
@saveRule="handleRuleSave">
8585
<label>
8686
{{ l("For") }}
@@ -91,17 +91,17 @@
9191
</label>
9292
</RuleComponent>
9393
<RuleComponent
94+
v-model:display-rule-type="displayRuleType"
9495
rule-type="add_column_from_sample_sheet_index"
95-
:display-rule-type.sync="displayRuleType"
9696
@saveRule="handleRuleSave">
9797
<label>
9898
{{ l("Value") }}
9999
<input v-model="addColumnSampleSheetIndexValue" type="number" min="0" />
100100
</label>
101101
</RuleComponent>
102102
<RuleComponent
103+
v-model:display-rule-type="displayRuleType"
103104
rule-type="add_column_group_tag_value"
104-
:display-rule-type.sync="displayRuleType"
105105
@saveRule="handleRuleSave">
106106
<label>
107107
{{ l("Value") }}
@@ -113,10 +113,10 @@
113113
</label>
114114
</RuleComponent>
115115
<RuleComponent
116+
v-model:display-rule-type="displayRuleType"
116117
rule-type="add_column_regex"
117-
:display-rule-type.sync="displayRuleType"
118118
@saveRule="handleRuleSave">
119-
<ColumnSelector :target.sync="addColumnRegexTarget" :col-headers="activeRuleColHeaders" />
119+
<ColumnSelector v-model:target="addColumnRegexTarget" :col-headers="activeRuleColHeaders" />
120120
<label>
121121
<input v-model="addColumnRegexType" type="radio" value="global" />Create column matching
122122
expression.
@@ -132,7 +132,7 @@
132132
from expression replacement.
133133
</label>
134134
<br />
135-
<RegularExpressionInput :target.sync="addColumnRegexExpression" />
135+
<RegularExpressionInput v-model:target="addColumnRegexExpression" />
136136
<label v-if="addColumnRegexType == 'groups'">
137137
{{ l("Number of Groups") }}
138138
<input v-model="addColumnRegexGroupCount" type="number" min="1" />
@@ -147,21 +147,23 @@
147147
</label>
148148
</RuleComponent>
149149
<RuleComponent
150+
v-model:display-rule-type="displayRuleType"
150151
rule-type="add_column_concatenate"
151-
:display-rule-type.sync="displayRuleType"
152152
@saveRule="handleRuleSave">
153153
<ColumnSelector
154-
:target.sync="addColumnConcatenateTarget0"
154+
v-model:target="addColumnConcatenateTarget0"
155155
:col-headers="activeRuleColHeaders" />
156156
<ColumnSelector
157-
:target.sync="addColumnConcatenateTarget1"
157+
v-model:target="addColumnConcatenateTarget1"
158158
:col-headers="activeRuleColHeaders" />
159159
</RuleComponent>
160160
<RuleComponent
161+
v-model:display-rule-type="displayRuleType"
161162
rule-type="add_column_substr"
162-
:display-rule-type.sync="displayRuleType"
163163
@saveRule="handleRuleSave">
164-
<ColumnSelector :target.sync="addColumnSubstrTarget" :col-headers="activeRuleColHeaders" />
164+
<ColumnSelector
165+
v-model:target="addColumnSubstrTarget"
166+
:col-headers="activeRuleColHeaders" />
165167
<label>
166168
<select v-model="addColumnSubstrType">
167169
<option value="keep_prefix">Keep only prefix specified.</option>
@@ -176,78 +178,82 @@
176178
</label>
177179
</RuleComponent>
178180
<RuleComponent
181+
v-model:display-rule-type="displayRuleType"
179182
rule-type="add_column_value"
180-
:display-rule-type.sync="displayRuleType"
181183
@saveRule="handleRuleSave">
182184
<label>
183185
{{ l("Value") }}
184186
<input v-model="addColumnValue" type="text" />
185187
</label>
186188
</RuleComponent>
187189
<RuleComponent
190+
v-model:display-rule-type="displayRuleType"
188191
rule-type="remove_columns"
189-
:display-rule-type.sync="displayRuleType"
190192
@saveRule="handleRuleSave">
191193
<ColumnSelector
192-
:target.sync="removeColumnTargets"
194+
v-model:target="removeColumnTargets"
193195
:col-headers="activeRuleColHeaders"
194196
:multiple="true" />
195197
</RuleComponent>
196198
<RuleComponent
199+
v-model:display-rule-type="displayRuleType"
197200
rule-type="split_columns"
198-
:display-rule-type.sync="displayRuleType"
199201
@saveRule="handleRuleSave">
200202
<ColumnSelector
201-
:target.sync="splitColumnsTargets0"
203+
v-model:target="splitColumnsTargets0"
202204
label="Odd Row Column(s)"
203205
:col-headers="activeRuleColHeaders"
204206
:multiple="true" />
205207
<ColumnSelector
206-
:target.sync="splitColumnsTargets1"
208+
v-model:target="splitColumnsTargets1"
207209
label="Even Row Column(s)"
208210
:col-headers="activeRuleColHeaders"
209211
:multiple="true" />
210212
</RuleComponent>
211213
<RuleComponent
214+
v-model:display-rule-type="displayRuleType"
212215
rule-type="swap_columns"
213-
:display-rule-type.sync="displayRuleType"
214216
@saveRule="handleRuleSave">
215217
<ColumnSelector
216-
:target.sync="swapColumnsTarget0"
218+
v-model:target="swapColumnsTarget0"
217219
label="Swap Column"
218220
:col-headers="activeRuleColHeaders" />
219221
<ColumnSelector
220-
:target.sync="swapColumnsTarget1"
222+
v-model:target="swapColumnsTarget1"
221223
label="With Column"
222224
:col-headers="activeRuleColHeaders" />
223225
</RuleComponent>
224226
<RuleComponent
227+
v-model:display-rule-type="displayRuleType"
225228
rule-type="add_filter_regex"
226-
:display-rule-type.sync="displayRuleType"
227229
@saveRule="handleRuleSave">
228-
<ColumnSelector :target.sync="addFilterRegexTarget" :col-headers="activeRuleColHeaders" />
229-
<RegularExpressionInput :target.sync="addFilterRegexExpression" />
230+
<ColumnSelector v-model:target="addFilterRegexTarget" :col-headers="activeRuleColHeaders" />
231+
<RegularExpressionInput v-model:target="addFilterRegexExpression" />
230232
<label v-b-tooltip.hover :title="titleInvertFilterRegex">
231233
<input v-model="addFilterRegexInvert" type="checkbox" />
232234
{{ l("Invert filter.") }}
233235
</label>
234236
</RuleComponent>
235237
<RuleComponent
238+
v-model:display-rule-type="displayRuleType"
236239
rule-type="add_filter_matches"
237-
:display-rule-type.sync="displayRuleType"
238240
@saveRule="handleRuleSave">
239-
<ColumnSelector :target.sync="addFilterMatchesTarget" :col-headers="activeRuleColHeaders" />
241+
<ColumnSelector
242+
v-model:target="addFilterMatchesTarget"
243+
:col-headers="activeRuleColHeaders" />
240244
<input v-model="addFilterMatchesValue" type="text" />
241245
<label v-b-tooltip.hover :title="titleInvertFilterMatches">
242246
<input v-model="addFilterMatchesInvert" type="checkbox" />
243247
{{ l("Invert filter.") }}
244248
</label>
245249
</RuleComponent>
246250
<RuleComponent
251+
v-model:display-rule-type="displayRuleType"
247252
rule-type="add_filter_compare"
248-
:display-rule-type.sync="displayRuleType"
249253
@saveRule="handleRuleSave">
250-
<ColumnSelector :target.sync="addFilterCompareTarget" :col-headers="activeRuleColHeaders" />
254+
<ColumnSelector
255+
v-model:target="addFilterCompareTarget"
256+
:col-headers="activeRuleColHeaders" />
251257
<label>
252258
Filter out rows
253259
<select v-model="addFilterCompareType">
@@ -260,8 +266,8 @@
260266
<input v-model="addFilterCompareValue" type="text" />
261267
</RuleComponent>
262268
<RuleComponent
269+
v-model:display-rule-type="displayRuleType"
263270
rule-type="add_filter_count"
264-
:display-rule-type.sync="displayRuleType"
265271
@saveRule="handleRuleSave">
266272
<label>
267273
Filter which rows?
@@ -280,10 +286,10 @@
280286
</label>
281287
</RuleComponent>
282288
<RuleComponent
289+
v-model:display-rule-type="displayRuleType"
283290
rule-type="add_filter_empty"
284-
:display-rule-type.sync="displayRuleType"
285291
@saveRule="handleRuleSave">
286-
<ColumnSelector :target.sync="addFilterEmptyTarget" :col-headers="activeRuleColHeaders" />
292+
<ColumnSelector v-model:target="addFilterEmptyTarget" :col-headers="activeRuleColHeaders" />
287293
<label v-b-tooltip.hover :title="titleInvertFilterEmpty">
288294
<input v-model="addFilterEmptyInvert" type="checkbox" />
289295
{{ l("Invert filter.") }}
@@ -292,11 +298,11 @@
292298
<div v-if="displayRuleType == 'mapping'">
293299
<div v-for="(map, index) in mapping" :key="map.type" class="map" :index="index">
294300
<ColumnSelector
301+
v-model:target="map.columns"
302+
v-model:ordered-edit="map.editing"
295303
:class="'rule-map-' + map.type.replace(/_/g, '-')"
296304
:label="mappingTargets()[map.type].label"
297305
:help="mappingTargets()[map.type].help"
298-
:target.sync="map.columns"
299-
:ordered-edit.sync="map.editing"
300306
:col-headers="colHeaders"
301307
:multiple="mappingTargets()[map.type].multiple"
302308
:ordered="true"

client/src/components/Tool/ToolForm.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<div v-if="showEntryPoints">
1111
<ToolEntryPoints v-for="job in entryPoints" :key="job.id" :job-id="job.id" />
1212
</div>
13-
<b-modal v-model="showError" size="sm" :title="errorTitle | l" scrollable ok-only>
13+
<b-modal v-model="showError" size="sm" :title="localize(errorTitle)" scrollable ok-only>
1414
<b-alert v-if="errorMessage" show variant="danger">
1515
{{ errorMessage }}
1616
</b-alert>
@@ -121,6 +121,7 @@ import { useJobStore } from "@/stores/jobStore";
121121
import { useTourStore } from "@/stores/tourStore";
122122
import { useUserStore } from "@/stores/userStore";
123123
import { useUserToolsServiceCredentialsStore } from "@/stores/userToolsServiceCredentialsStore";
124+
import { localize } from "@/utils/localization";
124125
125126
import { getToolFormData, submitJob, updateToolFormData } from "./services";
126127

client/src/components/User/DiskUsage/Quota/ProvidedQuotaSourceUsageBar.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@
33
v-if="objectStore.quota.enabled"
44
v-slot="{ result: quotaUsage, loading: isLoadingUsage }"
55
:quota-source-label="objectStore.quota.source">
6-
<LoadingSpan v-if="isLoadingUsage" :message="loadingMessage | localize" />
6+
<LoadingSpan v-if="isLoadingUsage" :message="localize(loadingMessage)" />
77
<QuotaUsageBar v-else-if="quotaUsage" :quota-usage="quotaUsage" :embedded="true" :compact="true" />
88
</QuotaSourceUsageProvider>
99
</template>
1010

1111
<script>
12+
import { localize } from "@/utils/localization";
13+
1214
import { QuotaSourceUsageProvider } from "./QuotaUsageProvider";
1315
1416
import QuotaUsageBar from "./QuotaUsageBar.vue";

client/src/components/Workflow/Editor/Lint.test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import { getUntypedWorkflowParameters } from "./modules/parameters";
1111
import Lint from "./Lint.vue";
1212

1313
const localVue = getLocalVue();
14-
localVue.use(PiniaVuePlugin);
1514

1615
const steps = {
1716
0: {

0 commit comments

Comments
 (0)