Fixes T4022. Hooks up the project profile controller to understanding URIs like /project/hashtag/ Also, makes handles have the new /project/hashtag/ URI by default, thus upselling that feature super duper heavily.
Details
- Reviewers
epriestley - Maniphest Tasks
- T4022: Use shortname for Project in URI.
- Commits
- Restricted Diffusion Commit
rPc39f302c048a: Project - use hashtag as a way to access project profile in URI, e.g.
clicked some project links, noted pretty uri and page working nicely.
Diff Detail
- Repository
- rP Phabricator
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
I think we should namespace these URIs -- if you create a project called "History", it will collide with an existing URI, and if we add new controllers in the future they might break user projects. Some ideas:
- Maybe put them at top level under /tag/<slug>/? That might be confusing. We could use something like /proj/. We already use /p/ for profile. We can't use # since it's an anchor.
- Put them at /project/somethingsomething/<slug>/. This is unwieldy. I think 123 is a valid slug, so /view/<slug>/ collides between IDs and slugs.
I kind of favor just doing /tag/<slug>/? What do you think?
src/applications/project/controller/PhabricatorProjectProfileController.php | ||
---|---|---|
37–43 | Might be nice to canonicalize the slug here -- if you go to /tag/qa/, and it's not the primary slug, redirect to /tag/quality_assurance/. |
moved to /tag/
only other thought I had was 'pp' for "project profile". We could maybe have 'xp' in the future this way.
@chad - did you maybe have a uri prefix you like better? This behavior currently is URIs like
/tag/diffusion/
are the default for Projects from all handle-generated links, which is most places. If you type in or otherwise go to
/tag/diffusion-alternative-tag-configured-correctly/
you get redirected back to
/tag/diffusion/
Do you have a word you prefer to tag?
This looks good to me technically.
(/tag/ is the best prefix I can come up with offhand that doesn't collide with anything. I don't think it's perfect, but it's short, memorable, and a reasonably good match on meaning.)