Page MenuHomePhabricator

Make editing project images redirect to "Manage" more consistently
ClosedPublic

Authored by epriestley on May 19 2017, 8:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 14, 3:48 AM
Unknown Object (File)
Sat, Apr 13, 8:28 PM
Unknown Object (File)
Sat, Apr 13, 3:01 PM
Unknown Object (File)
Sat, Apr 13, 1:14 PM
Unknown Object (File)
Sat, Apr 13, 9:53 AM
Unknown Object (File)
Sat, Apr 13, 6:37 AM
Unknown Object (File)
Thu, Apr 11, 10:08 AM
Unknown Object (File)
Sun, Apr 7, 11:37 AM
Subscribers
None

Details

Summary

Ref T12732. Currently, different ways of setting a profile image can leave you in different places.

Instead, always send the user back to the "Manage" page.

Test Plan

Used "Current Picture", "use picture", "Build picture" and "upload picture", always ended up in the same spot.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

amckinley added inline comments.
src/applications/project/controller/PhabricatorProjectEditPictureController.php
27

I guess this variable was unused?

This revision is now accepted and ready to land.May 19 2017, 8:55 PM

Yeah, +F hits nothing.

We could probably detect this in lint, it just doesn't come up too terribly often.

Oh, I think we'd get false positives right now because the linter doesn't do a great job of "{$variable}" in strings until T8049, maybe?

Yeah, +F hits nothing.

We could probably detect this in lint, it just doesn't come up too terribly often.

I'd love a lint rule for this. I bet it would prevent typos more than anything else, but in PHP that seems extremely useful.

We can detect this version of things ("use of undeclared variable"), which I think gets most of the typos:

Error  (XHP5) Use of Undeclared Variable
 Declare variables prior to use (even if you are passing them as reference
 parameters). You may have misspelled this variable name.

           25 
           26     $manage_uri = $this->getApplicationURI('manage/'.$project->getID().'/');
           27 
 >>>       28     do_a_thing($maneg_yoori);
           29 
           30     $supported_formats = PhabricatorFile::getTransformableImageFormats();
           31     $e_file = true;

We just can't currently detect the opposite, "declared but unused variable".

epriestley marked an inline comment as done.

Filed as T12734.

(Also just playing around with the new sidebar thing.)

This revision was automatically updated to reflect the committed changes.