stable

Clone or download

Read-only

feat: poll project creation

If platform allows project creation without site admin approval, then we can improve user experience by redirecting to the project dashboard as soon as the archive is imported into the project. In an ideal situation we would have some Mercure events emitted by the async worker, but for now we only poll the server to know if the project is created. If we receive a 404, we need to come back later. Since the import can fail, infinite polling would be wasteful, so there is a limited set of retries. Note: There is no polling if the platform requires administrators approval. Implementation details: since we are in the middle of vue3 conversion, we are forced to fetch the project id from the url. We cannot use `useRouter` yet, and pushing the project id as props from the router is not accepted by typecheck (use of `defineProps` break the definition of the router in `router/index.ts`). So for now we fallback on the old way of working: regexp :/ Part of story #36484 create a new project from an XML template Change-Id: I5ee7a6d403c61435f5c0aa3e0e2051ca712a9f74

Modified Files

Name
M src/common/Request/RouteCollector.php +1 −0 Go to diff View file
M src/scripts/project-registration/package.json +3 −0 Go to diff View file
M src/scripts/project-registration/pnpm-lock.yaml +13 −0 Go to diff View file
M src/scripts/project-registration/src/components/Template/Advanced/FromProjectArchive/ProjectOnGoingCreation/ProjectOngoingCreation.vue +51 −1 Go to diff View file
M src/scripts/project-registration/src/helpers/upload-file.ts +5 −1 Go to diff View file
M src/scripts/project-registration/src/router/index.ts +4 −1 Go to diff View file
M src/scripts/project-registration/src/stores/root.ts +1 −0 Go to diff View file