Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
66f7b27
fix(TestsE2e): ViewerOptionsSizeSlider
JulienChampagnol May 21, 2026
044cb18
save wip [skip ci]
JulienChampagnol May 22, 2026
b52819f
Merge branch 'next' of https://github.com/Geode-solutions/OpenGeodeWe…
JulienChampagnol May 22, 2026
3a0b248
fix path [skip ci]
JulienChampagnol May 25, 2026
33ec803
Merge branch 'next' of https://github.com/Geode-solutions/OpenGeodeWe…
JulienChampagnol May 28, 2026
1ce0eba
Merge branch 'next' of https://github.com/Geode-solutions/OpenGeodeWe…
SpliiT May 29, 2026
66ee797
Merge branch 'next' of https://github.com/Geode-solutions/OpenGeodeWe…
SpliiT Jun 9, 2026
ee7582f
datatestid
SpliiT Jun 9, 2026
48519ad
data-testid
SpliiT Jun 11, 2026
5ed0fb1
Apply prepare changes
SpliiT Jun 12, 2026
9f1368f
fix oxlint
SpliiT Jun 12, 2026
5f22e0c
Update app/utils/local/scripts.js
SpliiT Jun 12, 2026
0dc5305
Update app/components/Viewer/Generic/Model/ModelStyleCard.vue
SpliiT Jun 12, 2026
de5dd39
changes cleanup and datatestid
SpliiT Jun 12, 2026
9d7f2a9
Merge branch 'fix/tests_e2e_points_size' of https://github.com/Geode-…
SpliiT Jun 12, 2026
1f29c54
Merge branch 'next' of https://github.com/Geode-solutions/OpenGeodeWe…
SpliiT Jun 12, 2026
1792700
mesh
SpliiT Jun 12, 2026
1284543
merge conflicts
SpliiT Jun 12, 2026
57c7aad
duplicate datatestid
SpliiT Jun 15, 2026
1b10bb4
updates datatestid
SpliiT Jun 16, 2026
b6b940c
oxlint datatestid
SpliiT Jun 17, 2026
972288b
Merge branch 'next' of https://github.com/Geode-solutions/OpenGeodeWe…
SpliiT Jun 17, 2026
06a41f5
Apply prepare changes
SpliiT Jun 17, 2026
6f19a69
oxlint
SpliiT Jun 17, 2026
2755e27
Merge branch 'fix/tests_e2e_points_size' of https://github.com/Geode-…
SpliiT Jun 17, 2026
8cf3d5e
rm duplicated element
SpliiT Jun 17, 2026
cf6d9b2
rm one more time datatestids duplicated
SpliiT Jun 17, 2026
0548283
enforce texture
SpliiT Jun 18, 2026
abd21a1
Apply prepare changes
SpliiT Jun 18, 2026
3ae0bfe
hybrid
SpliiT Jun 19, 2026
c34a99f
Merge branch 'fix/tests_e2e_points_size' of https://github.com/Geode-…
SpliiT Jun 19, 2026
839775f
Apply prepare changes
SpliiT Jun 19, 2026
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 @@ -54,7 +54,7 @@ async function saveRename() {
color="success"
size="x-small"
class="mr-1"
:data-testid="'restoreCameraPosition' + position.name + 'Button'"
:data-testid="`restoreCameraPosition${position.name}Button`"
@click="restorePosition(position.id)"
>
<v-icon size="14">mdi-play</v-icon>
Expand Down
4 changes: 2 additions & 2 deletions app/components/CameraOrientation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ watch(hoveredFace, (newFace, oldFace) => {
size="32"
class="satellite-node position-absolute"
:style="orientation.position"
:data-testid="'cameraOrientation' + orientation.vtkKey + 'Button'"
:data-testid="`cameraOrientation${orientation.vtkKey}Button`"
@mouseenter="hoveredFace = orientation.face"
@mouseleave="hoveredFace = undefined"
@click.stop="emit('select', orientation.value)"
Expand Down Expand Up @@ -242,7 +242,7 @@ watch(hoveredFace, (newFace, oldFace) => {
size="32"
variant="text"
class="ma-1"
:data-testid="'cameraOrientation' + orientation.vtkKey + 'Button'"
:data-testid="`cameraOrientation${orientation.vtkKey}Button`"
@mouseenter="hoveredFace = orientation.face"
@mouseleave="hoveredFace = undefined"
@click.stop="emit('select', orientation.value)"
Expand Down
9 changes: 6 additions & 3 deletions app/components/HybridRenderingView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,13 @@ async function handleClick(event) {
</ClientOnly>
</template>

<style scoped>
:deep(img) {
pointer-events: none;
<style>
[data-testid="hybridViewer"] img {
pointer-events: none !important;
}
</style>

<style scoped>
.picking-cursor {
cursor: crosshair !important;
}
Expand Down
26 changes: 17 additions & 9 deletions app/components/HybridViewerTooltip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ const originalIndex = computed(() => {
}
return Math.floor(Number(originalId));
});
const RESERVED_ATTRIBUTE_KEYS = new Set([
"coordinates",
"vtkOriginalCellIds",
"vtkOriginalPointIds",
]);

const hasOtherAttributes = computed(() => {
const attributes = hybridViewerStore.hoverData?.attributes || {};
Expand All @@ -71,6 +76,16 @@ const hasOtherAttributes = computed(() => {
);
});

const sortedAttributes = computed(() => {
const attributes = hybridViewerStore.hoverData?.attributes || {};
return (
Object.entries(attributes)
.filter(([key]) => !RESERVED_ATTRIBUTE_KEYS.has(key))
// oxlint-disable-next-line unicorn/no-array-sort
.sort(([keyA], [keyB]) => keyA.localeCompare(keyB))
);
});

function capitalize(val) {
if (!val) {
return "";
Expand Down Expand Up @@ -156,15 +171,8 @@ function formatAttributeValue(val) {
{{ Number(hybridViewerStore.hoverData.attributes.coordinates[2]).toFixed(3) }} ]
</span>
</v-col>
<template v-for="(val, name) in hybridViewerStore.hoverData.attributes" :key="name">
<v-col
v-if="
name !== 'coordinates' &&
name !== 'vtkOriginalCellIds' &&
name !== 'vtkOriginalPointIds'
"
class="d-flex justify-space-between ga-3"
>
<template v-for="[name, val] in sortedAttributes" :key="name">
<v-col class="d-flex justify-space-between ga-3">
<span class="tooltip-label">{{ capitalize(name) }}:</span>
<span class="tooltip-value font-mono">
{{ formatAttributeValue(val) }}
Expand Down
8 changes: 4 additions & 4 deletions app/components/Screenshot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ watch(screenshot_type, (value) => {
File
</v-btn>
<v-btn
data-testid="screenshotClipboardButton"
value="clipboard"
prepend-icon="mdi-content-copy"
size="small"
data-testid="screenshotClipboardButton"
class="text-caption text-none"
>
Clipboard
Expand All @@ -117,11 +117,11 @@ watch(screenshot_type, (value) => {
<v-row dense v-if="screenshot_type === 'file'">
<v-col cols="12" class="py-1">
<v-text-field
data-testid="screenshotFileNameInput"
v-model="filename"
label="File name"
variant="outlined"
density="compact"
data-testid="screenshotFileNameInput"
hide-details
class="text-caption"
></v-text-field>
Expand All @@ -144,10 +144,10 @@ watch(screenshot_type, (value) => {
<v-row dense>
<v-col cols="12" class="py-1">
<v-switch
data-testid="screenshotIncludeBackgroundSwitch"
v-model="include_background"
:disabled="screenshot_type === 'file' && output_extension !== 'png'"
label="Include background"
data-testid="screenshotIncludeBackgroundSwitch"
density="compact"
hide-details
inset
Expand All @@ -170,10 +170,10 @@ watch(screenshot_type, (value) => {
Cancel
</v-btn>
<v-btn
data-testid="screenshotActionButton"
variant="outlined"
size="small"
class="text-caption text-none"
data-testid="screenshotActionButton"
:disabled="(screenshot_type === 'file' && !filename) || !output_extension"
color="white"
@click="takeScreenshot()"
Expand Down
6 changes: 3 additions & 3 deletions app/components/ViewToolbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ const camera_options = computed(() => [
menu: [
{
title: "Cells",
icon: "mdi-select-all",
testId: "highlightOnHoverCellsButton",
icon: "mdi-select-all",
action: () => {
if (
hybridViewerStore.is_hover_highlight &&
Expand All @@ -79,8 +79,8 @@ const camera_options = computed(() => [
},
{
title: "Points",
icon: "mdi-select-drag",
testId: "highlightOnHoverPointsButton",
icon: "mdi-select-drag",
action: () => {
if (
hybridViewerStore.is_hover_highlight &&
Expand Down Expand Up @@ -180,9 +180,9 @@ const camera_options = computed(() => [
<v-row dense>
<v-col v-for="item in camera_option.menu" :key="item.title">
<ActionButton
:data-testid="item.testId"
:icon="item.icon"
:tooltip="item.title"
:data-testid="item.testId"
:color="
hybridViewerStore.is_hover_highlight &&
hybridViewerStore.hover_highlight_field_type ===
Expand Down
2 changes: 1 addition & 1 deletion app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ const edge_attribute_color_map = computed({
<ViewerOptionsVisibilitySwitch data-testid="meshEdgesVisibilitySwitch" v-model="visibility" />
<template v-if="visibility">
<v-divider class="my-2" />
<ViewerOptionsWidthSlider v-model="width" />
<ViewerOptionsWidthSlider data-testid="meshEdgesWidthSlider" v-model="width" />
<ViewerOptionsColoringTypeSelector
:id="id"
v-model:coloring_style_key="coloring_style_key"
Expand Down
1 change: 1 addition & 0 deletions app/components/Viewer/Generic/Mesh/CellsOptions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ const cell_attribute_color_map = computed({
<template #options>
<ViewerOptionsVisibilitySwitch data-testid="meshCellsVisibilitySwitch" v-model="visibility" />
<template v-if="visibility">
<v-divider />
<ViewerOptionsColoringTypeSelector
:id="id"
v-model:coloring_style_key="coloring_style_key"
Expand Down
9 changes: 8 additions & 1 deletion app/components/Viewer/Generic/Mesh/EdgesOptions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,14 @@ const color = computed({
:btnImage="btnImage"
>
<template #options>
<ViewerOptionsVisibilitySwitch data-testid="meshEdgesVisibilitySwitch" v-model="visibility" />
<v-row>
<v-col>
<ViewerOptionsVisibilitySwitch
data-testid="meshEdgesVisibilitySwitch"
v-model="visibility"
/>
</v-col>
</v-row>
<template v-if="visibility">
<v-divider class="my-2" />
<ViewerOptionsWidthSlider data-testid="meshEdgesWidthSlider" v-model="size" />
Expand Down
12 changes: 8 additions & 4 deletions app/components/Viewer/Generic/Mesh/PointsOptions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,14 @@ const vertex_attribute_color_map = computed({
:btnImage="btnImage"
>
<template #options>
<ViewerOptionsVisibilitySwitch
data-testid="meshPointsVisibilitySwitch"
v-model="visibility"
/>
<v-row class="pa-1">
<v-col>
<ViewerOptionsVisibilitySwitch
data-testid="meshPointsVisibilitySwitch"
v-model="visibility"
/>
</v-col>
</v-row>
<template v-if="visibility">
<v-divider class="my-2" />
<ViewerOptionsSizeSlider data-testid="meshPointsSizeSlider" v-model="size" />
Expand Down
5 changes: 4 additions & 1 deletion app/components/Viewer/Generic/Mesh/PolygonsOptions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ const dataStyleStore = useDataStyleStore();
const hybridViewerStore = useHybridViewerStore();
const { applyBatchStyle } = useBatchStyle();

const { itemProps, btnImage, tooltip } = defineProps({
const { itemProps, btnImage, tooltip, capabilities } = defineProps({
itemProps: { type: Object, required: true },
btnImage: { type: String, required: true },
tooltip: { type: String, required: false, default: "Polygons options" },
capabilities: { type: Object, default: () => ({}) },
});

const id = toRef(() => itemProps.id);
Expand Down Expand Up @@ -70,11 +71,13 @@ const textures = computed({
v-model="visibility"
/>
<template v-if="visibility">
<v-divider />
<ViewerOptionsColoringTypeSelector
:id="id"
v-model:coloring_style_key="coloring_style_key"
v-model:color="color"
v-model:textures="textures"
:capabilities="capabilities"
/>
</template>
</template>
Expand Down
1 change: 1 addition & 0 deletions app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ const polyhedron_attribute_color_map = computed({
v-model="visibility"
/>
<template v-if="visibility">
<v-divider />
<ViewerOptionsColoringTypeSelector
:id="id"
v-model:coloring_style_key="coloring_style_key"
Expand Down
2 changes: 1 addition & 1 deletion app/components/Viewer/Generic/Model/BlocksOptions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ const polyhedronSchema = back_schemas.opengeodeweb_back.model_component_polyhedr

<template>
<OptionsSection title="Blocks Options" class="mt-4">
<VisibilitySwitch v-model="blocksVisibility" />
<VisibilitySwitch data-testid="modelBlocksVisibilitySwitch" v-model="blocksVisibility" />
<ViewerOptionsColoringTypeSelector
:id="modelId"
:componentId="targetBlockIds[0]"
Expand Down
3 changes: 2 additions & 1 deletion app/components/Viewer/Generic/Model/CornersOptions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const { modelId, cornerId, targetCornerIds } = defineProps({
});

const dataStyleStore = useDataStyleStore();
console.log("CornersOptions setup!");
const hybridViewerStore = useHybridViewerStore();

// Visibility
Expand Down Expand Up @@ -140,7 +141,7 @@ const vertexSchema = back_schemas.opengeodeweb_back.model_component_vertex_attri

<template>
<OptionsSection title="Corners Options" class="mt-4">
<VisibilitySwitch v-model="cornersVisibility" />
<VisibilitySwitch data-testid="modelCornersVisibilitySwitch" v-model="cornersVisibility" />
<ViewerOptionsColoringTypeSelector
:id="modelId"
:componentId="targetCornerIds[0]"
Expand Down
2 changes: 1 addition & 1 deletion app/components/Viewer/Generic/Model/LinesOptions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ const edgeSchema = back_schemas.opengeodeweb_back.model_component_edge_attribute

<template>
<OptionsSection title="Lines Options" class="mt-4">
<VisibilitySwitch v-model="linesVisibility" />
<VisibilitySwitch data-testid="modelLinesVisibilitySwitch" v-model="linesVisibility" />
<ViewerOptionsColoringTypeSelector
:id="modelId"
:componentId="targetLineIds[0]"
Expand Down
2 changes: 1 addition & 1 deletion app/components/Viewer/Generic/Model/ModelStyleCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const modelComponentsColor = computed({
<template>
<v-sheet class="model-style-card" color="transparent">
<OptionsSection title="Model Options">
<VisibilitySwitch v-model="modelVisibility" />
<VisibilitySwitch data-testid="modelStyleVisibilitySwitch" v-model="modelVisibility" />
</OptionsSection>

<OptionsSection v-if="!componentType && !componentId" title="Components Options" class="mt-4">
Expand Down
2 changes: 1 addition & 1 deletion app/components/Viewer/Generic/Model/SurfacesOptions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ const polygonSchema = back_schemas.opengeodeweb_back.model_component_polygon_att

<template>
<OptionsSection title="Surfaces Options" class="mt-4">
<VisibilitySwitch v-model="surfacesVisibility" />
<VisibilitySwitch data-testid="modelSurfacesVisibilitySwitch" v-model="surfacesVisibility" />
<ViewerOptionsColoringTypeSelector
:id="modelId"
:componentId="targetSurfaceIds[0]"
Expand Down
12 changes: 6 additions & 6 deletions app/components/Viewer/Options/TextureItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,19 +95,19 @@ watch(textureId, (value) => {
hide-details
/>
</v-col>
<v-badge :model-value="textureId != ''" color="white" floating dot offset-x="10" offset-y="10">
<v-col cols="1" class="ma-1" justify="center" align="center">
<v-col cols="1" class="ma-1 d-flex justify-center align-center">
<v-badge :model-value="textureId !== ''" color="white" floating dot offset-x="10" offset-y="10">
<FileUploader
@files_uploaded="files_uploaded_event($event, index)"
@files_uploaded="files_uploaded_event($event)"
:accept="['image/png', 'image/jpeg', 'image/bmp']"
:autoUpload="true"
:multiple="true"
:mini="true"
class="mt-2"
/>
</v-col>
</v-badge>
<v-col v-if="textureName == '' || textureId == ''" cols="1">
</v-badge>
</v-col>
<v-col v-if="textureName === '' || textureId === ''" cols="1">
<v-icon size="20" icon="mdi-close-circle" v-tooltip:bottom="'Invalid texture'" />
</v-col>
</template>
3 changes: 2 additions & 1 deletion app/components/Viewer/PointSet/SpecificPointsOptions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import PointSetPoints from "@ogw_front/assets/viewer_svgs/point_set_points.svg";
import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem";
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector";
import ViewerOptionsSizeSlider from "@ogw_front/components/Viewer/Options/Sliders/Size";
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch";

import { useBatchStyle } from "@ogw_front/composables/batch_style";
Expand Down Expand Up @@ -96,7 +97,7 @@ const vertex_attribute_color_map = computed({
/>
<template v-if="visibility">
<v-divider class="my-2" />
<ViewerOptionsSizeSlider v-model="size" />
<ViewerOptionsSizeSlider data-testid="meshPointsSizeSlider" v-model="size" />
<ViewerOptionsColoringTypeSelector
:id="id"
v-model:coloring_style_key="coloring_style_key"
Expand Down
6 changes: 5 additions & 1 deletion app/components/Viewer/Solid/PolygonsOptions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@ const { itemProps } = defineProps({
</script>

<template>
<ViewerGenericMeshPolygonsOptions :itemProps="itemProps" :btnImage="SolidFacets" />
<ViewerGenericMeshPolygonsOptions
:itemProps="itemProps"
:btnImage="SolidFacets"
:capabilities="{ textures: { available: false } }"
/>
</template>
2 changes: 1 addition & 1 deletion app/components/Viewer/Ui.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,12 @@ defineExpose({ get_viewer_id });
class="picking-message-container d-flex justify-center w-100 pa-4"
>
<v-chip
data-testid="hoverHighlightChip"
color="primary"
elevation="8"
size="large"
variant="flat"
class="pick-pulse"
data-testid="hoverHighlightChip"
style="pointer-events: auto"
@click="stopHoverHighlight"
>
Expand Down
1 change: 1 addition & 0 deletions app/utils/colormap.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// oxlint-disable unicorn/prefer-export-from
import colormaps from "@ogw_front/assets/colormaps.json";

import { newInstance as vtkColorTransferFunction } from "@kitware/vtk.js/Rendering/Core/ColorTransferFunction";
Expand Down
Loading
Loading