Skip to content

Fix/oxlint#299

Open
MaxNumerique wants to merge 26 commits intonextfrom
fix/oxlint
Open

Fix/oxlint#299
MaxNumerique wants to merge 26 commits intonextfrom
fix/oxlint

Conversation

@MaxNumerique
Copy link
Contributor

No description provided.

@MaxNumerique MaxNumerique requested a review from BotellaA February 5, 2026 14:10
@MaxNumerique MaxNumerique marked this pull request as ready for review February 5, 2026 14:10
const { id } = defineProps({
id: { type: String, required: true },
})

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simplification des expressions booléennes, ternaires non utiles

Comment on lines +32 to +35

await Promise.all(
removed.map((item) => dataStyleStore.setVisibility(item.id, false)),
)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Promise.all pour s'assurer que toutesles mises à jour de visibilité sont terminées avant de faire le rendu

const internal_files = ref(props.files)
const auto_upload = ref(props.auto_upload)
const internal_files = ref(files)
const internal_auto_upload = ref(auto_upload)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renommage de la ref interne pour éviter la confusion avec la prop

}
const promise_array = internal_files.value.map((file) =>
upload_file({ route: schema.$id, file }),
)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Supprime l'enrobagee des promesses redondantes puisque upload_file en retourne déjà une.
.map() et Promise.all rend le traitement des fichiers asynchrone et élimine la gestion manuelle des réussites/échecs dans une boucle

Comment on lines +25 to +36
await Promise.all(
stores.map(async (store) => {
if (!store.exportStores) return
const storeId = store.$id
try {
snapshot[storeId] = await store.exportStores(params)
exportCount += 1
} catch (error) {
console.error(`[AppStore] Error exporting store "${storeId}":`, error)
}
}),
)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Combinaison de Promise.all et map() pour se passer de la boucle

Comment on lines +53 to +68
await Promise.all(
stores.map(async (store) => {
if (!store.importStores) return
const storeId = store.$id
if (!snapshot[storeId]) {
notFoundStores.push(storeId)
return
}
try {
await store.importStores(snapshot[storeId])
importedCount += 1
} catch (error) {
console.error(`[AppStore] Error importing store "${storeId}":`, error)
}
}),
)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pareil

Comment on lines +72 to +75
const component = await database.model_components
.where({ id, geode_id })
.first()
return component?.type
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suppression des async/await pour utiliser .first pour utiliser https://dexie.org/docs/Collection/Collection.first() qui est plus efficace

Comment on lines +25 to +28
return meshStyleStore.setMeshVisibility(id, visibility)
}
if (viewer_type === "model") {
return modelStyleStore.setModelVisibility(id, visibility)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suppression de Promise.all sur des appels de fonctions uniques

async function initHybridViewer() {
if (status.value !== Status.NOT_CREATED) return
status.value = Status.CREATING
// oxlint-disable-next-line import/no-named-as-default-member
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flag oxlint pour les imports VTK non assignés. A vérifier si nécessaire parce que le chemin dans vtkjs n'est pas le même.
Quand je mets le bon chemin, j'ai des erreurs sur Vease.

const item = dataStore.getItem(id)
const value = await item.fetch()
console.log("hybridViewerStore.addItem", { value })
// oxlint-disable-next-line import/no-named-as-default-member
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pareil. A voir

remoteRender()
for (const key in params.camera_options) {
camera_options[key] = params.camera_options[key]
if (Object.hasOwn(params.camera_options, key)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +91 to +96
await Promise.all(
this.microservices.map(async (store) => {
await store.connect()
console.log("[INFRA] Microservice connected:", store.$id)
})
})

await Promise.all(connection_promises)
}),
)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

refacto

Comment on lines 118 to 131
// Connect
const { connectImageStream } =
await import("@kitware/vtk.js/Rendering/Misc/RemoteView")
try {
const validClient = await clientToConnect.connect(config)
connectImageStream(validClient.getConnection().getSession())
this.client = validClient
clientToConnect.endBusy()
await viewer_call(
this,
{
schema: schemas.opengeodeweb_viewer.viewer.reset_visualization,
},
{ timeout: undefined },
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Utilisation de viewer_call pour plus de robustesse

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant