Page MenuHomePhabricator

Project - use hashtag as a way to access project profile in URI, e.g. /project/hashtag/
ClosedPublic

Authored by btrahan on May 22 2014, 6:28 PM.
Tags
None
Referenced Files
F13998912: D9260.id21990.diff
Thu, Oct 24, 11:47 AM
F13998903: D9260.id21993.diff
Thu, Oct 24, 11:45 AM
F13998896: D9260.id21996.diff
Thu, Oct 24, 11:43 AM
F13986645: D9260.diff
Mon, Oct 21, 4:32 AM
F13986491: D9260.id21993.diff
Mon, Oct 21, 3:23 AM
F13980694: D9260.diff
Sat, Oct 19, 12:06 PM
Unknown Object (File)
Oct 8 2024, 5:24 AM
Unknown Object (File)
Aug 28 2024, 10:03 PM

Details

Summary

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.

Test Plan

clicked some project links, noted pretty uri and page working nicely.

Diff Detail

Repository
rP Phabricator
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

btrahan retitled this revision from to Project - use hashtag as a way to access project profile in URI, e.g. /project/hashtag/.
btrahan updated this object.
btrahan edited the test plan for this revision. (Show Details)
btrahan added a reviewer: epriestley.

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/.

btrahan edited edge metadata.

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?

epriestley edited edge metadata.

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.)

This revision is now accepted and ready to land.May 22 2014, 9:31 PM
btrahan updated this revision to Diff 21996.

Closed by commit rPc39f302c048a (authored by @btrahan).