lookit / lookit/lookit-api

Custom slugs for study detail URLs instead of UUIDs

Open
#624 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Researcher Small
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.