Skip to content

Update URL structure#235

Open
XanderVertegaal wants to merge 9 commits intodevelopfrom
feature/form-url-change
Open

Update URL structure#235
XanderVertegaal wants to merge 9 commits intodevelopfrom
feature/form-url-change

Conversation

@XanderVertegaal
Copy link
Copy Markdown
Contributor

@XanderVertegaal XanderVertegaal commented Apr 21, 2026

Closes #228

Moves the start page to /start and the form pages to /studies/studyId/submissionId/slug.

@XanderVertegaal XanderVertegaal added the enhancement New feature or request label Apr 21, 2026
Comment thread frontend/components/study_detail/AvailableActions.vue Outdated
Comment thread frontend/composables/useRouteParams.ts
Comment thread frontend/pages/studies/[study_id]/index.vue
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the frontend routing to support the new form URL structure requested in #228, moving form navigation under /studies/[studyId]/[submissionId]/[slug] and introducing shared helpers for route params.

Changes:

  • Add /studies/[study_id]/[submission_id]/[slug] page and update form navigation URLs to include studyId.
  • Introduce useRouteParams composable for consistent route param coercion.
  • Add new /start page and update the navbar “New registration” link accordingly.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
frontend/pages/studies/[study_id]/index.vue Uses useStudyId() and updates the study query wiring for the new route param handling.
frontend/pages/studies/[study_id]/[submission_id]/[slug].vue Switches to useSubmissionId()/useStepSlug() and gates rendering on slug presence.
frontend/pages/start.vue Adds new “start new registration” page that creates a study and routes to /studies/:id.
frontend/composables/useRouteParams.ts Adds reusable helpers for route param normalization.
frontend/components/study_detail/AvailableActions.vue Updates “Continue editing” URL to the new studies-based route and switches tiles to NuxtLink.
frontend/components/shared/FormWrapper.vue Updates step navigation to the new studies-based URL format.
frontend/components/layout/NavBar.vue Updates “New registration” nav link to /start.
Comments suppressed due to low confidence (1)

frontend/pages/studies/[study_id]/index.vue:7

  • GetStudyQueryVariables is imported but never used. This will typically trip lint/typecheck in this repo; either remove the import or use it as the second generic for useQuery (e.g., useQuery<GetStudyQuery, GetStudyQueryVariables>(...)) so the variables function is type-checked.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread frontend/composables/useRouteParams.ts Outdated
Comment thread frontend/composables/useRouteParams.ts Outdated
Comment thread frontend/components/study_detail/AvailableActions.vue Outdated
Copy link
Copy Markdown
Contributor

@EdoStorm96 EdoStorm96 left a comment

Choose a reason for hiding this comment

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

While I think this is a good idea, I would prefer folder names to be camelCase i/o snake_case (even though I started doing it in snake_case ... It turns out this is not ideal ... Could you change it to this?

With AvailableActions, there will be some merge issues with #233, but we'll cross that bridge when we get there ...

Comment thread frontend/components/shared/FormWrapper.vue Outdated
Comment thread frontend/components/study_detail/AvailableActions.vue Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

change url for form

3 participants