Page MenuHomePhabricator

Add link custom field.
ClosedPublic

Authored by slester on Apr 24 2015, 5:59 PM.
Tags
None
Referenced Files
F14054952: D12543.diff
Sat, Nov 16, 6:43 AM
F14048468: D12543.diff
Thu, Nov 14, 7:51 AM
F14043250: D12543.diff
Tue, Nov 12, 8:45 AM
F14031020: D12543.diff
Sat, Nov 9, 8:57 AM
F14025506: D12543.diff
Thu, Nov 7, 6:41 PM
F14001950: D12543.id.diff
Fri, Oct 25, 1:32 PM
F14001875: D12543.diff
Fri, Oct 25, 12:48 PM
F13989709: D12543.id30120.diff
Mon, Oct 21, 10:28 PM
Subscribers

Details

Summary

Ref T3868. Adds a link custom field that verifies and links to the text provided.

Test Plan

Add a custom field with type "link", then enter a well-formed URL in the provided box in the edit task screen. Verify that the URL displays correctly on the task display page.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

slester retitled this revision from to Add link custom field..
slester updated this object.
slester edited the test plan for this revision. (Show Details)
epriestley added a reviewer: epriestley.

Fix lint, couple of inlines. Generally looks good.

src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldLink.php
24–26

I don't think we should imply a protocol. https:// is increasingly the right protocol, and is a safer default, but choosing either HTTP or HTTPS will break some links in a confusing way. Implying either protocol also means that the field won't faithfully reflect the value the user entered.

I think it would be better to just return the text as plain text, but without mutating it, if it's missing a protocol or isn't a valid link for some other reason.

28

If there's a value, but it's not a valid link, let's just return the value (as plain text) instead of returning null? Then users can at least see what was entered, even if they can't click it.

This revision now requires changes to proceed.Apr 24 2015, 6:22 PM
This comment was removed by slester.
slester edited edge metadata.

Remove HTTP opinions, fix lint

epriestley edited edge metadata.

Cool, thanks!

This revision is now accepted and ready to land.Apr 24 2015, 6:48 PM
Closed by commit rP1ab6ad3ee814: Add link custom field. (authored by root <root@slaopstest.aops.com>, committed by epriestley). · Explain WhyApr 24 2015, 6:49 PM
This revision was automatically updated to reflect the committed changes.