Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion app/components/CameraManager/List.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ async function saveRename(): void {
:key="position.id"
class="rounded-lg mb-1 px-2"
:active="editingId === position.id"
active-color="primary"
color="primary"
>
<template #prepend>
<v-btn
Expand Down
2 changes: 1 addition & 1 deletion app/components/CameraManager/Saver.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async function saveCurrentPosition(): void {

<template>
<v-container class="pa-3 pb-1 bg-surface-variant-lighten-5">
<v-row dense>
<v-row density="compact">
<v-col cols="12">
<v-text-field
v-model="newPositionName"
Expand Down
6 changes: 3 additions & 3 deletions app/components/ClippingPlaneCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const emit = defineEmits<Emits>();
<v-row no-gutters class="mb-1">
<v-col class="text-caption text-medium-emphasis">Origin [X, Y, Z]</v-col>
</v-row>
<v-row v-if="plane.origin" dense class="mb-2">
<v-row v-if="plane.origin" density="compact" class="mb-2">
<v-col v-for="axis in 3" :key="'orig-' + axis" cols="4">
<v-text-field
v-model.number="plane.origin[axis - 1]"
Expand All @@ -82,7 +82,7 @@ const emit = defineEmits<Emits>();
/>
</v-col>
</v-row>
<v-row v-else dense class="mb-2">
<v-row v-else density="compact" class="mb-2">
<v-col v-for="axis in 3" :key="'orig-placeholder-' + axis" cols="4">
<v-text-field
placeholder="—"
Expand Down Expand Up @@ -111,7 +111,7 @@ const emit = defineEmits<Emits>();
</v-btn>
</v-col>
</v-row>
<v-row dense>
<v-row density="compact">
<v-col v-for="axis in 3" :key="'norm-' + axis" cols="4">
<v-text-field
v-model.number="plane.normal[axis - 1]"
Expand Down
2 changes: 1 addition & 1 deletion app/components/FeedBack/Snackers.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function runAction(feedback: (typeof feedbackStore.feedbacks)[number]): void {
timeout="-1"
z-index="4"
>
<v-row dense class="flex-nowrap">
<v-row density="compact" class="flex-nowrap">
<v-col cols="auto">
<v-tooltip v-if="feedback.type === 'error'" location="left">
<span>
Expand Down
3 changes: 3 additions & 0 deletions app/components/InfraConnected.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<script setup lang="ts">
import { useInfraStore } from "@ogw_front/stores/infra";

// Renders only its slot: there is no root element to receive attributes
defineOptions({ inheritAttrs: false });

const infraStore = useInfraStore();
</script>

Expand Down
4 changes: 2 additions & 2 deletions app/components/Ruler.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ async function applyManualCoords(): Promise<void> {
<v-divider class="mb-3" />

<div class="text-caption font-weight-bold mb-2 text-medium-emphasis">Point 1</div>
<v-row dense class="mb-1" data-testid="rulerPointCard">
<v-row density="compact" class="mb-1" data-testid="rulerPointCard">
<v-col v-for="(axis, index) in ['X', 'Y', 'Z']" :key="axis">
<v-text-field
v-model.number="localPoint1[index]"
Expand All @@ -94,7 +94,7 @@ async function applyManualCoords(): Promise<void> {
</v-row>

<div class="text-caption font-weight-bold mb-2 mt-3 text-medium-emphasis">Point 2</div>
<v-row dense class="mb-1" data-testid="rulerPointCard">
<v-row density="compact" class="mb-1" data-testid="rulerPointCard">
<v-col v-for="(axis, index) in ['X', 'Y', 'Z']" :key="axis">
<v-text-field
v-model.number="localPoint2[index]"
Expand Down
8 changes: 4 additions & 4 deletions app/components/Screenshot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ function handleClose(): void {
@action="takeScreenshot"
>
<v-container class="pa-3 py-1">
<v-row justify="center" dense>
<v-row justify="center" density="compact">
<v-col cols="12" class="py-0 d-flex justify-center">
<v-btn-toggle
v-model="screenshot_type"
Expand Down Expand Up @@ -232,7 +232,7 @@ function handleClose(): void {
</v-col>
</v-row>

<v-row dense v-if="screenshot_type === 'file'" class="flex-nowrap">
<v-row density="compact" v-if="screenshot_type === 'file'" class="flex-nowrap">
<v-col class="py-1">
<v-text-field
data-testid="screenshotFileNameInput"
Expand All @@ -259,7 +259,7 @@ function handleClose(): void {
</v-col>
</v-row>

<v-row dense class="flex-nowrap align-center">
<v-row density="compact" class="flex-nowrap align-center">
<v-col class="py-1">
<v-number-input
data-testid="screenshotWidthInput"
Expand Down Expand Up @@ -299,7 +299,7 @@ function handleClose(): void {
<v-icon icon="ph-lock" size="small" class="ml-1" title="Aspect ratio locked to the view" />
</v-row>

<v-row dense class="flex-nowrap">
<v-row density="compact" class="flex-nowrap">
<v-col class="py-0">
<v-switch
data-testid="screenshotIncludeUiSwitch"
Expand Down
4 changes: 2 additions & 2 deletions app/components/ViewToolbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ onKeyStroke("Escape", () => {

<template>
<v-container :class="[$style.floatToolbar, 'pa-0', 'view-toolbar']" width="auto">
<v-row v-for="camera_option in camera_options" :key="camera_option.testId" dense>
<v-row v-for="camera_option in camera_options" :key="camera_option.testId" density="compact">
<v-col>
<v-menu
v-if="camera_option.menu && !camera_option.action"
Expand All @@ -75,7 +75,7 @@ onKeyStroke("Escape", () => {
/>
</template>
<v-card class="pa-1 mr-2" elevation="4" rounded="pill">
<v-row dense>
<v-row density="compact">
<v-col v-for="item in camera_option.menu" :key="item.title">
<ActionButton
:data-testid="item.testId"
Expand Down
2 changes: 1 addition & 1 deletion app/components/Viewer/Generic/Model/ModelCardTabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const activeTab = defineModel<string>({ required: true });
</script>

<template>
<v-row v-if="tabs.length > 0" justify="center" dense class="mb-2">
<v-row v-if="tabs.length > 0" justify="center" density="compact" class="mb-2">
<v-col cols="12" class="py-0 d-flex justify-center">
<v-btn-toggle
v-model="activeTab"
Expand Down
2 changes: 1 addition & 1 deletion app/components/Viewer/ObjectTree/Base/Controls.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ watch(
</script>

<template>
<v-row dense align="center" class="controls-row pa-1 py-0">
<v-row density="compact" align="center" class="controls-row pa-1 py-0">
<v-col cols="12">
<div
class="controls-capsule d-flex align-center rounded-pill overflow-hidden"
Expand Down
2 changes: 1 addition & 1 deletion app/components/Viewer/Options/AttributeRangeSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function commitMaximum(): void {
</script>

<template>
<v-row dense align="center" no-gutters>
<v-row density="compact" align="center" no-gutters>
<v-col cols="5" class="pe-1">
<v-text-field
data-testid="attributeMinInput"
Expand Down
1 change: 0 additions & 1 deletion app/components/Viewer/Options/TextureItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ watch(textureId, (value) => {
:autoUpload="true"
:multiple="true"
:mini="true"
class="mt-2"
/>
</v-badge>
</v-col>
Expand Down
1 change: 0 additions & 1 deletion app/components/Viewer/PointSet/SpecificPointsOptions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ async function setVertexAttributeRangesPerData(ranges: RangesPerData): Promise<v
v-model:vertex_attribute_color_map="vertex_attribute_color_map"
v-model:vertex_attribute_no_data_color="vertex_attribute_no_data_color"
v-model:vertex_attribute_time_step="vertex_attribute_time_step"
:vertex_has_colormap="true"
/>
</template>
</template>
Expand Down
4 changes: 2 additions & 2 deletions app/components/Viewer/ToolActiveChip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
interface Props {
label: string;
color: string;
icon: string;
icon?: string;
}

const { label, color, icon } = defineProps<Props>();
const { label, color, icon = "" } = defineProps<Props>();

const emit = defineEmits<{
close: [];
Expand Down
4 changes: 2 additions & 2 deletions app/components/ZScaling.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function apply(): void {
@action="apply"
>
<v-container class="pa-3 py-1">
<v-row dense>
<v-row density="compact">
<!-- ToolPanel clips its content: leave room above the slider for its thumb label -->
<v-col cols="12" class="pt-7 pb-1">
<v-slider
Expand All @@ -51,7 +51,7 @@ function apply(): void {
/>
</v-col>
</v-row>
<v-row dense>
<v-row density="compact">
<v-col cols="12" class="py-1">
<v-text-field
v-model.number="zScale"
Expand Down
21 changes: 21 additions & 0 deletions tests/fail_on_vue_warnings.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { afterEach } from "vitest";
import { config } from "@vue/test-utils";

// Every Vue warning (Vuetify deprecations included) fails the test that emitted it, so they can't come back unnoticed
const vueWarnings: string[] = [];

config.global.config = {
...config.global.config,
warnHandler: (message, _instance, trace): void => {
vueWarnings.push(`[Vue warn]: ${message}\n${trace}`);
},
};

// Global on purpose (outside any describe block): it applies to every test
// oxlint-disable-next-line vitest/require-top-level-describe
afterEach(() => {
const warnings = vueWarnings.splice(0);
if (warnings.length > 0) {
throw new Error(`Vue warnings were emitted:\n${warnings.join("\n\n")}`);
}
});
2 changes: 1 addition & 1 deletion tests/unit/components/ExtensionSelector.nuxt.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe("extension selector", () => {
global: {
plugins: [vuetify, pinia],
},
props: { geode_object_type: "BRep", filenames: ["test.toto"] },
props: { geodeObjectType: "BRep", filenames: ["test.toto"] },
});
await nextTick();
expect(wrapper.exists()).toBe(true);
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/components/Step.nuxt.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ describe("step", () => {
const wrapper = mount(
{
components: { Step },
// ObjectSelector has an async setup: in the app, NuxtPage provides the Suspense boundary
template:
'<v-stepper-vertical><Step :stepIndex="0" :stepperTree="stepperTree" /></v-stepper-vertical>',
'<Suspense><v-stepper-vertical><Step :stepIndex="0" :stepperTree="stepperTree" /></v-stepper-vertical></Suspense>',
setup() {
return { stepperTree: stepper_tree };
},
Expand Down
15 changes: 12 additions & 3 deletions tests/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ const helpersDirnamePlugin = {
// oxlint-disable-next-line import/no-default-export
export default defineConfig({
test: {
setupFiles: [path.resolve(__dirname, "./setup_indexeddb.ts")],
setupFiles: [
path.resolve(__dirname, "./setup_indexeddb.ts"),
path.resolve(__dirname, "./fail_on_vue_warnings.ts"),
],
projects: [
// oxlint-disable-next-line no-top-level-await
await defineVitestProject({
Expand All @@ -82,7 +85,10 @@ export default defineConfig({
environment: "nuxt",
alias: aliases,
testTimeout: TIMEOUTS.unit,
setupFiles: [path.resolve(__dirname, "./setup_indexeddb.ts")],
setupFiles: [
path.resolve(__dirname, "./setup_indexeddb.ts"),
path.resolve(__dirname, "./fail_on_vue_warnings.ts"),
],
server: {
deps: {
inline: ["vuetify"],
Expand All @@ -101,7 +107,10 @@ export default defineConfig({
alias: aliases,
maxWorkers,
testTimeout: TIMEOUTS.integration,
setupFiles: [path.resolve(__dirname, "./setup_indexeddb.ts")],
setupFiles: [
path.resolve(__dirname, "./setup_indexeddb.ts"),
path.resolve(__dirname, "./fail_on_vue_warnings.ts"),
],
server: {
deps: {
inline: ["vuetify"],
Expand Down
Loading