Page MenuHomePhabricator

Start actually showing the phurl urls to users
ClosedPublic

Authored by jcox on Aug 30 2016, 4:41 PM.
Tags
None
Referenced Files
F14058166: D16473.id.diff
Sun, Nov 17, 9:47 AM
F14018028: D16473.diff
Tue, Nov 5, 3:28 AM
F14005758: D16473.diff
Sun, Oct 27, 7:10 PM
F14000552: D16473.id.diff
Thu, Oct 24, 10:49 PM
F13957659: D16473.id39638.diff
Oct 14 2024, 10:31 AM
Unknown Object (File)
Oct 9 2024, 4:51 AM
Unknown Object (File)
Sep 8 2024, 7:32 PM
Unknown Object (File)
Sep 8 2024, 10:27 AM

Details

Summary

Fixes T10679. Added a 'short url' field to the phurl link page and changed the "view url" button to link to the shortened version

Test Plan

Create a phurl link (or navigate to an existing one) and note that there is now a field for "Short URL". Also verified that the "Visit URL" button in the top right still works as intended

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jcox retitled this revision from to Start actually showing the phurl urls to users.
jcox updated this object.
jcox edited the test plan for this revision. (Show Details)
epriestley added a reviewer: epriestley.

One meaningful inline about robustness in the face of trailing slashes.

src/applications/phurl/controller/PhabricatorPhurlURLViewController.php
144–146

Maybe put this first (above "Original URL")? Seems like the most likely field that users are interested in, probably.

src/applications/phurl/storage/PhabricatorPhurlURL.php
106–107

We should probably use PhutilURI() here and do setPath() to be robust against users specifying http://example.whatever (with no trailing slash) as their phurl.short-uri -- something like this?

if (!$short_domain) {
  return $path;
}

$uri = new PhutilURI($short_domain);
$uri->setPath($path);
return (string)$uri;

Then that should work properly whether users set http://x.com (no slash) or http://x.com/ (with slash).

This revision now requires changes to proceed.Aug 30 2016, 4:47 PM
jcox edited edge metadata.

Make short URL construction more robust with regard to trailing slashes in base URLs

uh oh I crossed streams with my diffs. One sec.

Phurl changes look good once the Paste stuff finds its way home.

jcox edited edge metadata.

PASTE CHANGES, RETURN FROM WHENCE YOU CAME!

epriestley edited edge metadata.
This revision is now accepted and ready to land.Aug 30 2016, 6:50 PM
This revision was automatically updated to reflect the committed changes.