Custom slugs for study detail URLs instead of UUIDs
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 12
- Forks
- 21
- Avg merge
- 5d 19h
- Merged PRs (30d)
- 5
Description
TL;DR
Allow accessing the participant-facing study detail page using a study slug rather than the UUID.
Narrative
As a researcher I'd like my study detail page to be prettier for parent-facing materials and more conducive to SEO.
Acceptance Criteria
- Slug field added to study model
- Slug is editable on study create & study edit form with uniqueness enforced and a clear message if there's a collision
- Button to create slug from study name on study edit form (nice, not required)
- Slug-based URL is displayed on the researcher-facing study detail page as the link
- Slug-based URL is used everywhere we link to the study detail page (e.g., study list, announcement emails)
- Existing tests are adjusted to use this URL in addition to UUID-based URL, and pass
- Tests of study create and edit forms (allow setting/editing slug, error if collision)
Implementation Notes
We will need to continue to support the UUID-based URLs at least temporarily since links will have been sent out to families. This could be done via a migration that initially sets the study slug to a string representation of the UUID, or by having both URL paths for now.
Note that the actual participation/preview views will still need to use the UUID for compatibility with the experiment runner.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the study model, study create and edit forms, URL routes, researcher-facing study detail page, study list, announcement emails, and related tests. Trace every study-detail link and decide how UUID URLs remain compatible while adding unique editable slugs. Done means slug creation and collision errors work, links use slugs, existing UUID links still work, and the relevant tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100