Skip to content

Conversation

@MaxNumerique
Copy link
Contributor

…persistence

create project manager plugin for import/export operations update tests for new functionality and async loading

…persistence

create project manager plugin for import/export operations
update tests for new functionality and async loading
Copy link
Member

Choose a reason for hiding this comment

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

Quel est l'objectif de ce plug-in, c'est pas déjà le rôle de l'app store?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pour moi l'app_store ne fait que de la gestion d'état sans créer de fichier ni réseau. Il permet de créer un snapshot avec le save() sous forme d'objet.
Le plugin utilise les méthode de l'appStore pour transformer le snapshot en JSON et créé un Blob, enfin lance un téléchargement pour le save.

Pour moi, le plugin utilise app_store comme moteur de snapshot et ne réimplémente pas le save & load

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Je crois que je comprends, dans l'idée il faudrait :
exporter : compresser l'état de Project_folder_path et lui passer aussi le snapshot pour restaurer le style, etc. et ziper le tout
importer : recoit le zip, remplace le project_folder actuel et utilise aussi le snapshot qui sera utilisé par les stores dans le Front

Copy link
Member

Choose a reason for hiding this comment

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

Un plug-in de pinia, c'est globalement l'idée d'ajouter une fonctionalité à tous les stores ou certains. Là, ce que tu veux ajouter ces pas vraiment en line avec pinia et les stores mais plutôt une action spécifique de l'app store. Qui en effet est un peu plus complexe que juste l'app store, ta question est pertinente.

Peut-être qu'il faut mettre la logique de ton plug-in dans un composable qui utiliserait l'app store et le geode store ? @JulienChampagnol qu'en penses tu ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Je vais voir pour porter project_manager en tant que composable et non en tant que plugin Pinia et en même temps utiliser le store geode.js

@MaxNumerique MaxNumerique changed the title feat(save_and_load): add save/load methods to all stores for project … feat(save_and_load): add import/export methods to all stores for project … Oct 30, 2025
@MaxNumerique MaxNumerique changed the title feat(save_and_load): add import/export methods to all stores for project … feat(save_and_load): add import/export methods Oct 30, 2025
@MaxNumerique MaxNumerique requested a review from BotellaA October 30, 2025 15:40
Copy link
Member

Choose a reason for hiding this comment

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

@JulienChampagnol que penses tu de cette proposition ?

const url = `${geode.base_url}${schema.$id}`
const method = schema.methods[0]

const response = await fetch(url, {
Copy link
Member

Choose a reason for hiding this comment

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

Pk ne pas utiliser api_fetch?

const filename = response.headers.get("new-file-name")
const urlObject = URL.createObjectURL(blob)
const a = document.createElement("a")
a.href = urlObject
Copy link
Member

Choose a reason for hiding this comment

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

@JulienChampagnol tu n'avais pas utilisé un truc pour faire ça simplement ?

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.

4 participants