1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-21 17:58:47 +02:00
Commit graph

3156 commits

Author SHA1 Message Date
epriestley
bfb99043bf Minor, fix an issue with some older navs. 2012-12-07 15:38:31 -08:00
epriestley
2763d0fe61 Minor, unfatal the 404 page after new menu stuff. 2012-12-07 15:29:41 -08:00
epriestley
7b5dea94d2 Clean up some more sprite stuff
Summary:
  - Remove unused CSS rules and non-sprite images.
  - Sprite the logo.

Test Plan: Looked at site, looked good.

Reviewers: chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D4113
2012-12-07 14:29:09 -08:00
epriestley
6fc5208433 Minor, update package definitions to include all the new sprite CSS. 2012-12-07 13:54:12 -08:00
epriestley
c6ca409a03 Minor, fix more merge failures. 2012-12-07 13:49:39 -08:00
epriestley
54fe74d621 WIP 2012-12-07 13:43:11 -08:00
epriestley
abc79a2101 Update celerity map after many merges, etc. 2012-12-07 13:38:02 -08:00
epriestley
cd2e39025e Add crumbs to Differential
Summary: Adds very basic crumbs to Differential, to prevent regression when we drop the application menu. I'll do a more proper pass at this but want to unblock landing the commit sequence for all this stuff.

Test Plan: Looked at detail view and list view, saw crumbs, clicked them.

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T1960

Differential Revision: https://secure.phabricator.com/D4111
2012-12-07 13:37:45 -08:00
epriestley
f306cab653 Use application icons for "Eye" menu and Crumbs
Summary:
Issues here:

  - Need an application-sized "eye", or a "home" icon for "Phabricator Home".
  - Some of the "apps_lb_2x" sliced images are the "_dark_" versions, not the light versions.
  - If you slice an application-sized "logout" (power off) icon and application-sized "help" (questionmark in circle) icon I can replace the current menu icons and nearly get rid of "autosprite".
  - To replace the icons on /applications/, the non-retina size is "4x", so we'd need "8x" for retina. Alternatively I can reduce the icon sizes by 50%.
  - The "Help", "Settings" and "Logout" items currently have a "glowing" hover state, which needs a variant (or we can drop it).
  - The /applications/ icons have a white hover state (or we can drop it).
  - The 1x application (14x14) icons aren't used anywhere right now, should they be? Maybe in the feed in the future, etc?
  - The "apps-2x" and "apps-large" sheets are the same image, but getting them to actually use the same file is a bit tricky, so I just left them separate for now.

Test Plan:
{F26698}
{F26699}

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T1960

Differential Revision: https://secure.phabricator.com/D4108
2012-12-07 13:37:28 -08:00
epriestley
8bcdf42762 Simplify ".device-phone X, .device-tablet X { ... }" rules
Summary: Add a ".device" rule which means "phone or tablet". Simplify about 5000 rules which were written ".device-phone X, device-tablet X { ... }".

Test Plan: Browsed the site a bit without incident.

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T1960

Differential Revision: https://secure.phabricator.com/D4103
2012-12-07 13:37:10 -08:00
epriestley
8cff6ea9cb Add eye icon to left menu button
Summary: Do we have an icon with 2x for the right menu?

Test Plan: {F26590}

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T1960

Differential Revision: https://secure.phabricator.com/D4101
2012-12-07 13:36:35 -08:00
epriestley
1c9d1d6ad1 Add some textures/gradients to crumbs and menu
Summary:
This doesn't lay in everything, but:

  - Break the buttons gradient apart into components and rebuild it (along with other gradients) into a single gradient sprite (possible after {D4099}).
  - Use the sliced gradient for the crumbs background.
  - Use the sliced image for the crumb divider.
  - Adds the black/white app sheets, but I'm not generating them quite yet.

Test Plan: {F26537} {F26540}

Reviewers: chad, btrahan

Reviewed By: chad

CC: aran

Maniphest Tasks: T1960

Differential Revision: https://secure.phabricator.com/D4100
2012-12-07 13:35:49 -08:00
epriestley
1c9a6be979 Add a breadcrumbs element
Summary:
Add a basic breadcrumbs element, and implement it in Paste.

This needs some polish but is most of the way there.

Test Plan:
{F26443}
{F26444}
{F26445}

(This element is not visible on devices.)

Reviewers: chad

Reviewed By: chad

CC: aran, btrahan

Maniphest Tasks: T1960

Differential Revision: https://secure.phabricator.com/D4087
2012-12-07 13:35:17 -08:00
epriestley
f910e38ecc Provide a mobile application menu
Summary:
Adds a right-hand-side application menu, based roughly on `frame_v3.png`.

This has the same icon as the left menu until we get real design in, but is functionally reasonable.

Test Plan: {F26170} {F26169}

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T1960

Differential Revision: https://secure.phabricator.com/D4061
2012-12-07 13:34:44 -08:00
epriestley
e3f6bbfff8 Refactor the main menu in preparation for a mobile application menu
Summary:
As per discussion, this primes the existing mobile menu / menu button for "phabricator" and "application" menus.

Design here is very rough, I'm just trying to get everything laid in functionally first. It's based on `frame_v3.png` but missing a lot of touches.

Test Plan:
{F26143}
{F26144}

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T1960

Differential Revision: https://secure.phabricator.com/D4058
2012-12-07 13:33:03 -08:00
epriestley
dd94512837 Abstract and further merge filter menus
Summary:
  - Adds `PhabricatorMenuItemView` which is a non-hacky object representing a single menu item.
  - Adds `PhabricatorMenuView`, a collection of items.
  - Deletes some busted/old interfaces full of garbage nonsense.
  - Merges menu item styles from `aphront-side-nav-view-css` and `phabricator-nav-view-css`. These are old-style and new-style rules which got partially updated recently.
    - The new-style menus have a darker background (#ececec) than the old-style menus (#f7f7f7) so some of the highlight/hover colors weren't visible. I shuffled them around but something or other might need further adjustment.

Test Plan: looked at every menu I could

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T1960

Differential Revision: https://secure.phabricator.com/D4036
2012-12-07 13:32:14 -08:00
epriestley
7ebd9af013 Merge AphrontSideNavView into AphrontSideNavFilterView
Summary: After D4034 there are no AphrontSideNavView callsites outside of AphrontSideNavFilterView.

Test Plan: Looked at about a million side navs.

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T1960

Differential Revision: https://secure.phabricator.com/D4035
2012-12-07 13:31:13 -08:00
epriestley
20ee3003b5 Replace all instances of AphrontSideNavView with AphrontSideNavFilterView
Summary:
AphrontSideNavView is an old class which required you to do a lot of work; it was obsoleted by AphrontSideNavFilterView. Remove all direct callsites so I can clean it up.

This is a precursor to letting me render a filter menu as a dropdown menu for T1960.

Test Plan:
Examined each interface for correct filter construction and selection:

  - Browsed Diffusion
  - Browsed Differential
  - Browsed Files
  - Browsed Slowvote
  - Browsed Phriction
  - Browsed repo edit interface

Grepped for `AphrontSideNavView`. The only remaining instances are in `AphrontSideNavView` itself and `AphrontSideNavFilterView` (which currently uses it).

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T1960

Differential Revision: https://secure.phabricator.com/D4034
2012-12-07 13:30:31 -08:00
epriestley
6482876cf3 Remove the application menu
Summary:
Toss this completely as per discussion elsewhere. Basically it doesn't feel as useful as we imagined it would, and breadcrumbs from T1960 will replace the primary useful part (navigating up).

There's some more cleanup to do but I'll hit that in the next few diffs.

Closes T1828 as wontfix.

Test Plan: Viewed app + local, app-without-local interfaces. Saw no app menus.

Reviewers: chad

Reviewed By: chad

CC: aran, vrana

Maniphest Tasks: T1828, T1960

Differential Revision: https://secure.phabricator.com/D4033
2012-12-07 13:29:44 -08:00
Bob Trahan
8a6e82eba6 more fixes to fluid diff
Summary: always render "copy" column for text. this gives us consistent left alignment. also tweak css to be less wide for the copy and code coverage columns.

Test Plan: http://phabricator.dev/rP1a3bf098ae4ab4f8add4af744a6b93a257851fb0 looks even better

Reviewers: vrana, epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2005

Differential Revision: https://secure.phabricator.com/D4110
2012-12-07 12:37:11 -08:00
Bob Trahan
1922590f98 fix fluid diff change
Summary: when we had a change that had new data and uncommitted changes the colspan could get off. make sure to only decrement the colspan if we are actually on a new line

Test Plan: http://phabricator.dev/rP1a3bf098ae4ab4f8add4af744a6b93a257851fb0 now looks good on Firefox

Reviewers: vrana, epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2005

Differential Revision: https://secure.phabricator.com/D4109
2012-12-07 12:00:28 -08:00
vrana
b7e8c0a300 Specify content source for differential.close
Test Plan:
  $ arc close-revision 1

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4041
2012-12-07 11:35:42 -08:00
epriestley
210f8e0390 Fix leftover call to renderRightCode() from D4083
See T2165.

Auditors: btrahan
2012-12-07 08:16:47 -08:00
epriestley
1a3bf098ae Correctly parse author and committer identities again
Summary: See D3977, a terrible diff where I made a huge messs.

Test Plan: Ran `reparse.php --message --trace <revision>`, verified correct identification of author.

Reviewers: edward, vrana

Reviewed By: edward

CC: aran

Differential Revision: https://secure.phabricator.com/D4104
2012-12-07 07:06:29 -08:00
Bob Trahan
b4de56ef4b make differential use fluid width for code layout
Summary:
assume at least 360px for a given code pane. that's about when the comment box starts fighting back anyway. we'll use the yet-to-be-built one page render for the narrow viewport cases.

This address the cases as laid out in T2005. It fails the "MMMMM" case pretty horribly. However, if there is a space it works just fine and presumably folks are stretching out their windows on big glorious monitors at 160 characters wide or whatever.

Re-factored things just a tad but figure I'll take a nice big chunk of "renderer" to move forward T2009

Test Plan: looked at all sorts of funky diffs

Reviewers: epriestley

Reviewed By: epriestley

CC: chad, aran, Korvin

Maniphest Tasks: T2005

Differential Revision: https://secure.phabricator.com/D4083
2012-12-06 11:33:04 -08:00
vrana
cb45ad67a3 Revive essential commit details
Summary: Deleted by D3977.

Test Plan:
  ./reparse.php --message

Reviewers: epriestley, edward

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4090
2012-12-06 10:44:16 -08:00
vrana
86470e7a30 Handle empty lines in makeChangesWithContext()
Summary: Happens on the end of hunk.

Test Plan:
  $ ./reparse.php

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4091
2012-12-06 10:43:45 -08:00
Suman Karumuri
2852b4f5d3 Track path moves in Owner's packages
Summary:
Currently, if a package is moved from one location to another those package paths become stale in Owner's packages.
This diff fixes that by tracking the path moves in diffusion commit messages and updating the owners package paths accordingly.

Test Plan:
Tested the script by running the reparse.php script on the following test commits:
https://phabricator.fb.com/rPHGITd7271a2de212e0b2de33d485b2ff806e75f73d36
https://phabricator.fb.com/rPHGIT0192fb41e7bd3e0faeeb14facdc7f7bea1b716d0

on the following packages:
https://phabricator.fb.com/owners/package/1167/
https://phabricator.fb.com/owners/package/1168/

Reviewers: nh

Reviewed By: nh

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D3985
2012-12-05 17:21:45 -08:00
epriestley
fd5beffb99 Remove PhabricatorRepositoryDefaultCommitMessageDetailParser
Summary: See discussion in T1544. This has been obsoleted by simpler/better mechanisms.

Test Plan: Edited a repository; ran a parse task.

Reviewers: edward

Reviewed By: edward

CC: aran

Maniphest Tasks: T1544

Differential Revision: https://secure.phabricator.com/D3977
2012-12-05 15:34:28 -08:00
vrana
c3dbbc5fbe Hide disabled Maniphest from e-mail preferences
Test Plan: Disabled Maniphest, didn't see it, saved, enabled, saw it.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4081
2012-12-05 11:36:53 -08:00
epriestley
fb289a2c77 Remove some more copyright headers that survived in branches, etc., through the great header purge. See D3886.
Auditors: vrana
2012-12-05 09:27:27 -08:00
epriestley
2cc0d1042a Add documentation about troubleshooting HTTPS problems
Summary:
I got to learn a lot about SSL/TLS today.

Try to make it easier to troubleshoot SSL issues.

Test Plan: Read document.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2132

Differential Revision: https://secure.phabricator.com/D4079
2012-12-05 08:22:31 -08:00
vrana
1536b8a19c Bump Conduit server version number
Summary: See D4076.

Test Plan:
  $ arc diff

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4077
2012-12-03 18:06:39 -08:00
epriestley
aa4ac462c3 Provide a little documentation about multiple editors
Summary: In retrospect this is probably mostly obvious from the UI.

Test Plan: {F26314}

Reviewers: vrana

Reviewed By: vrana

CC: aran

Maniphest Tasks: T2095

Differential Revision: https://secure.phabricator.com/D4075
2012-12-03 17:14:09 -08:00
epriestley
02e8a322dc Defuse XSS in Calendar
Summary: `addDetail()` takes HTML because we have links there fairly often. :/ This design is iffy.

Test Plan: Reloaded `/calendar/status/`, verified no XSS.

Reviewers: btrahan, vrana

Reviewed By: vrana

CC: aran

Maniphest Tasks: T139

Differential Revision: https://secure.phabricator.com/D4074
2012-12-03 16:46:56 -08:00
vrana
27785c4f75 Don't delete tasks attached by freeform fields in Maniphest Tasks field
Summary: I didn't catch this issue at D3986 because we don't have `DifferentialManiphestTasksFieldSpecification` in field selector.

Test Plan:
Added `DifferentialManiphestTasksFieldSpecification` too field selector.
Wrote `Refs T4` and not filled `T4` to Maniphest Tasks field.

Reviewers: epriestley, 20after4

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T945

Differential Revision: https://secure.phabricator.com/D4073
2012-12-03 16:28:19 -08:00
vrana
bff795d848 Allow disabling editing multiple files at once
Summary: Resolves T2095.

Test Plan:
Saved it, button disappeared.
Saved it back, button appeared.

Reviewers: epriestley, aran

Reviewed By: epriestley

CC: Korvin

Maniphest Tasks: T2095

Differential Revision: https://secure.phabricator.com/D4071
2012-12-03 16:02:52 -08:00
vrana
3645dc2dd9 Filter all lint messages by owner
Summary: Also add link to this page.

Test Plan:
/diffusion/lint/
/diffusion/lint/?owner[0]=a (zero lint messages)
/diffusion/lint/?owner[0]=b (nonzero lint messages)
Clicked the link.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4069
2012-12-03 14:25:07 -08:00
vrana
8584b87df4 Display lint results for all repos
Summary:
I want to add search per owner, this is a prerequisity for it.
There's no link to this page yet, I didn't find a good place for it.

Test Plan: Displayed it, clicked around.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, scottmac

Maniphest Tasks: T2038

Differential Revision: https://secure.phabricator.com/D4067
2012-12-03 14:12:25 -08:00
Bob Trahan
d2568ac463 fix getAvailableIcons so uiexample works
Summary: D4027 introduced this along with associated awesomeness.

Test Plan: viewed uiexample and saw some actions. also no more errors.

Reviewers: epriestley

Reviewed By: epriestley

CC: chad, aran, Korvin

Differential Revision: https://secure.phabricator.com/D4066
2012-12-03 10:22:57 -08:00
Bob Trahan
7154bea03c fixes two small diffusion bugs
Summary: make sure we only print the fancy tool tip thing if we have all the data we need. (fixes T2136). additionally, default $branches to array() to prevent errors from reset on null.

Test Plan: made a checkin for a mercurial repo with user "foo@bar" with no branch. verified name showed up in all views. also noted on commit detail view there was no more error about reset() on null for $branches.

Reviewers: epriestley

Reviewed By: epriestley

CC: chad, aran, Korvin

Maniphest Tasks: T2136

Differential Revision: https://secure.phabricator.com/D4065
2012-12-03 09:27:47 -08:00
epriestley
2b69353519 Fix a bug with T1643
Summary: The construct `count(x == 0)` should be `count(x) == 0`. This causes a concrete problem because `count(0)` is 1.

Test Plan: eyeballed it~

Reviewers: btrahan, vrana, klimek

Reviewed By: klimek

CC: aran

Maniphest Tasks: T1643

Differential Revision: https://secure.phabricator.com/D4060
2012-11-30 12:09:37 -08:00
vrana
b37b725f4f Use Git SVN revision in save_lint.php
Test Plan: Will run it.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4055
2012-11-30 11:06:50 -08:00
epriestley
2de879e613 Minor, extend the lease time of Herald task leases. 2012-11-30 11:02:42 -08:00
Hangjun Ye
3b977e3b00 Support to bind to an anonymous LDAP user before searching.
Test Plan: N/A

Reviewers: codeblock, epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2133

Differential Revision: https://secure.phabricator.com/D4051
2012-11-30 04:22:13 -08:00
vrana
fc8d8b6f8c CC users mentioned in revision fields
Summary:
Users are used to this feature from comments.
Provide it also in title, summary and test plan.
It adds the users to CC only on creating the revision to avoid cases like:
"I mentioned this user but now I want to remove him from CC" or he unsubscribes.

Test Plan: Wrote `@epriestley` to summary.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4050
2012-11-29 10:14:30 -08:00
epriestley
150f711cc8 Make drydock case sensitive in attribute parsing
Summary: See D4047. Get rid of this strtolower() junk.

Test Plan:
```
$ /bin/drydock lease --type working-copy --attributes repositoryID=12
Acquired Lease 66
```

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D4048
2012-11-29 06:05:35 -08:00
Elvan Hidayat
9c76964aa7 Make webpage response final 2012-11-29 05:39:55 -08:00
epriestley
b4473d5998 Remove "min-width" from buttons
Summary:
This breaks Herald pretty badly too. We could restore it selectively; which buttons was it intended to affect?

{F26039}

Test Plan: Herald looks more reasonable now.

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2090

Differential Revision: https://secure.phabricator.com/D4046
2012-11-28 06:35:27 -08:00
vrana
493196e16a Add Conduit method for getting Diffusion lint messages
Test Plan: /conduit/method/diffusion.getlintmessages/, ran it, saw results.

Reviewers: epriestley, wez

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2038

Differential Revision: https://secure.phabricator.com/D3932
2012-11-27 17:57:57 -08:00
Ricky Elrod
416d26b621 Allow users to set whether or not textareas are monospaced.
Summary:
Some users like monospaced textareas and others don't.
This introduces an option to set this as a user preference.

Test Plan: Enabled and saw monospaced textareas, disabled and saw non-monospaced textareas.

Reviewers: epriestley

CC: aran, Korvin

Maniphest Tasks: T2114

Differential Revision: https://secure.phabricator.com/D4037
2012-11-27 14:06:42 -08:00
epriestley
71c170661b Use "flame" notification icon and bubble instead of lightning bolt
Summary: Switch to the final versions of these

Test Plan: Will add screenshots...

Reviewers: chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D4032
2012-11-27 14:03:25 -08:00
epriestley
b04114f95c Allow Drydock to allocate (very basic) working copy resources
Summary: This is missing a lot of features, but technically allows working copy allocation.

Test Plan: Ran `drydock lease --type working-copy --attributes repositoryID=12`, got a working copy of Phabricator allocated on disk.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D3999
2012-11-27 12:48:14 -08:00
epriestley
5cbc31644b Add a "close" action to Drydock resources
Summary: This does nothing fancy, just closes the resource and releases/breaks leases. They'll get cleaned up in some to-be-written GC process.

Test Plan: Closed resources from web UI and CLI.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D3998
2012-11-27 12:48:03 -08:00
epriestley
1bbdfa60c7 Build PhabricatorTagView
Summary:
Builds out most of the non-hover-stuff from `overview-hovercards.png`. Things I didn't build:

  - Tokens (I like them a lot but don't want to scope creep)
  - Functions (backend mess / future work)
  - Icons for tags.
  - Tags with pointy ends and holes in them (an earlier mock had this I think but they're gone on final)
  - The cyaney color for "Sporadic" since I just noticed it while typing this up.

Test Plan: Looked at UIExample page.

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2089

Differential Revision: https://secure.phabricator.com/D4029
2012-11-24 06:47:06 -08:00
epriestley
9913804932 Remove some unused images
Summary:
 - Remove `app_audit.png`, which is now part of the sprite (it was held back transitionally to make sure things worked).
 - Remove `sprite.png`, which is the old button sprite. The only remaining use was on the home page, which I replaced with box shadows to achieve a similar effect. These buttons should probably go away at some point anyway.

Test Plan: {F25768}

Reviewers: chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D4028
2012-11-24 06:46:57 -08:00
epriestley
6c88c76cac Generate an icon sprite map with new sprites and 2x retina graphics
Summary:
  - The filesystem is now the authority for which sprites are available. If you add new icons, the generation process will pick them up.
  - I broke out icon generation and added retina support. App icon generation still uses the old method.
  - Update ActionList and RemarkupControl to use the new sheet.
  - Use white icons on hover.
  - Also fixed a couple of minor issues with some stuff in Firefox/Chrome.

Test Plan:
{F25750}

{F25751}

{F25752}

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2013

Differential Revision: https://secure.phabricator.com/D4027
2012-11-23 16:35:39 -08:00
epriestley
f8e6240b9d Move sprite sources from webroot/ to resources/
Summary:
  - Since we'll never serve these directly, move them to resources/. This makes generating the Celerity map faster and reduces the size of the result map, since we don't need to analyze resources we'll never serve.
  - Also Rename the 2x `subscribe-remove` to `subscribe-delete` since they were named inconsistently. Everything else is in good shape.

Test Plan: Generated sprites as per D4025

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2013

Differential Revision: https://secure.phabricator.com/D4026
2012-11-23 16:19:06 -08:00
epriestley
d9fd43704f Improve Lightbox behavior for nonstandard clicks
Summary:
When users middle click or command-click an image, we should open it in a new tab, not open a lightbox.

See https://github.com/facebook/phabricator/issues/234

Test Plan: Left, middle, and command-clicked a lightbox image.

Reviewers: vrana, chad, btrahan

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D4020
2012-11-22 08:25:13 -08:00
epriestley
3ceaad1aa8 Add basic email support to Pholio
Summary: These emails aren't yet useful, but thread/multiplex/etc correctly.

Test Plan: Got some Pholio emails.

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2097

Differential Revision: https://secure.phabricator.com/D3842
2012-11-21 17:39:46 -08:00
epriestley
029cfcfc19 Add subscriber/mention support to Pholio
Summary:
  - Show subscribers.
  - When a user is mentioned in the description or a comment, subscribe them explicitly.

Test Plan: {F22370}

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2097

Differential Revision: https://secure.phabricator.com/D3838
2012-11-21 17:38:57 -08:00
epriestley
1f873572a4 Make Pholio mock edits (mostly) transaction-oriented
Summary:
  - Use transactions to apply edits.
  - Use Editor to apply transactions.
  - Some special casing for tricky stuff I don't want to deal with yet (mock images).

Test Plan: {F22368}

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2097

Differential Revision: https://secure.phabricator.com/D3837
2012-11-21 17:27:44 -08:00
epriestley
e389fc70fa Allow users to add comments in Pholio
Summary: Basic support for adding comments. Missing a lot of frills. Uses new comment/transaction UI.

Test Plan:
Added some comments. Tried to add an empty comment.

Some comments:

{F22361}

No text provided:

{F22362}

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2097

Differential Revision: https://secure.phabricator.com/D3834
2012-11-21 17:27:20 -08:00
epriestley
1d5551789d Add basic transaction/timeline view
Summary:
This is still rough and not completely accurate to the mocks (and the mobile view is quite crude and mostly just "hey this technically works"), but I want to build Pholio on top of it rather than building it on something else and then swapping it out later and the API is reasonable enough.

This should probably be called `PhabricatorTransactionView` but we already have one of those. I might juggle the names in a future diff.

Test Plan:
Desktop

{F22352}

Mobile

{F22351}

Reviewers: chad, btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2097

Differential Revision: https://secure.phabricator.com/D3833
2012-11-21 17:24:56 -08:00
epriestley
6f913b7124 Add Pholio mock view basics
Summary:
Just laying more groundwork out of ready-made UI.

{F22349}

Test Plan: Looked at a mock.

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2097

Differential Revision: https://secure.phabricator.com/D3832
2012-11-21 17:24:01 -08:00
epriestley
a6cd41ff7d Add very basic create interface for Pholio
Summary:
Nothing app-specific yet, just stitching groundwork together from readymade components.

{F22347}

Test Plan: Created some mocks via web UI.

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2097

Differential Revision: https://secure.phabricator.com/D3830
2012-11-21 17:23:28 -08:00
epriestley
fc9ad37b26 Add very basic scaffolding for Pholio
Summary:
I'm not going to land this until it's a bit more fleshed out since it would just confuse users, but this is probably more reviewable as a few diffs adding a couple features than one ULTRA-diff adding everything. Implement application basics for Pholio. This does more or less nothing, but adds storage, subscribe, flag, markup, indexing, query basics, PHIDs, handle loads, a couple of realy really basic controllers, etc.
Basic hierarchy is:

  - **Moleskine**: Top-level object like a Differential Revision, like "Ponder Feed Ideas".
  - **Image**: Each Moleskine has one or more images, like the unexpanded / expanded / mobile / empty states of feed.
  - **Transaction**: Comment or edit, like Maniphest. I generally want to move most apps to a transaction model so we can log edits.
  - **PixelComment**: Equivalent of an inline comment.

Test Plan: Created a fake object and viewed it.

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran, davidreuss

Maniphest Tasks: T2097

Differential Revision: https://secure.phabricator.com/D3817
2012-11-21 17:22:36 -08:00
epriestley
f4fa968770 Fix an issue with browsing repositories that have README, etc
Summary: D3533 changed the path for files at root from, e.g., "README" to "/README", which fatals when we try to `git cat-file` it.

Test Plan:
This no longer happens:

{F24874}

Viewed a directory in browse without a trailing slash in the URL.

Reviewers: vrana, nh

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D4016
2012-11-21 16:56:05 -08:00
vrana
4d7b441834 Don't skip even lines in copied code detector
Summary: PHP 3 basics: `each()` advances internal pointer so calling `next()` is wrong.

Test Plan: New test.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4011
2012-11-21 16:34:53 -08:00
vrana
254678d41d Delete dead code handling README
Summary: Since D2336.

Test Plan: Looked at README in Diffusion.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4015
2012-11-21 16:34:30 -08:00
epriestley
66c648cc56 Fix a redirect-on-login issue by allowing logged-out users to view 404 pages
Summary:
See T2102 and inline for discussion. This seems like the least-bad approach until we have something better.

The utility of next_uri seems much greater than the minor exposure of routable URIs.

Note that attackers can //not// detect if routable URIs are //valid// (e.g., "/D999" will always hit the login page whether it exists or not), just that they're routable. So you can only really tell if apps are installed or not.

Test Plan: Hit `/alsdknlkasnbla` while logged out, got 404 instead of login.

Reviewers: vrana, codeblock, btrahan

Reviewed By: codeblock

CC: aran

Maniphest Tasks: T2102

Differential Revision: https://secure.phabricator.com/D4012
2012-11-21 14:43:35 -08:00
Nick Harper
b5c7896b10 Fix diffusion browse queries in git
Summary:
If you try to load a directory in diffusion in a git repo that has a readme
file and you don't include a trailing slash in the path, you get an error
because we don't assemble the full paths of files correctly. This fixes that.

Test Plan: load such a directory in diffusion and see no fatal

Reviewers: epriestley, vrana

Reviewed By: vrana

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3533
2012-11-21 13:48:27 -08:00
vrana
abd880e30f Display correct size of binary files in Diffusion
Test Plan: https://secure.phabricator.com/diffusion/P/browse/master/webroot/rsrc/image/header_logo.png

Reviewers: btrahan, epriestley

Reviewed By: btrahan

CC: aran, Korvin

Maniphest Tasks: T1139

Differential Revision: https://secure.phabricator.com/D3961
2012-11-21 13:09:45 -08:00
vrana
97a97f5376 Attach mentioned Maniphest task also to revision
Summary: Also disable this feature without 'maniphest.enabled'.

Test Plan:
Wrote "fixes T..." in `arc diff`, verified that the task is attached.
Add another "fixes T..." in edit revision on web, verified that it was added.
Deleted "fixes T..." in edit revision, verified that the attached task wasn't deleted.

Reviewers: 20after4, epriestley

Reviewed By: 20after4

CC: aran, Korvin

Maniphest Tasks: T945

Differential Revision: https://secure.phabricator.com/D3986
2012-11-21 11:23:47 -08:00
vrana
58716521bd Disable Maniphest Remarkup rule with disabled Maniphest
Test Plan: Disabled Maniphest, wrote T1000, enabled, wrote T1000.

Reviewers: pieter, epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4010
2012-11-21 11:22:19 -08:00
vrana
03aca35cce Create new paths in Differential
Summary: It is used by 'Pending Differential Revisions'.

Test Plan: Created a new file, `arc diff`, looked at this path in Diffusion, saw Pending Differential Revisions.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3991
2012-11-21 11:08:49 -08:00
vrana
3732f14740 Document that arc diff is able to commit
Test Plan: Read it.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2025

Differential Revision: https://secure.phabricator.com/D4008
2012-11-21 11:05:09 -08:00
vrana
3d6e4280d1 Fix markup in docs
Summary: We highligh ##``## only on the same line.

Test Plan: Looked at it.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4007
2012-11-21 11:04:32 -08:00
epriestley
7138427a05 Modify Celerity to emit required resources on Ajax responses
Summary: Companion diff to D4003.

Test Plan: Rigged up a response which loaded a CSS file with `body { background: red; }`, verified page turned red after I clicked the button.

Reviewers: vrana, chad, btrahan

Reviewed By: chad

CC: aran

Maniphest Tasks: T2086

Differential Revision: https://secure.phabricator.com/D4004
2012-11-21 08:37:01 -08:00
epriestley
2dcc4cfb53 Update static resource packages
Summary: These are a bit out of date; bundle things together better.

Test Plan: Viewed page source for home, differential list, differential diff, maniphest list, maniphest task. Verified reasonable resource packaging.

Reviewers: chad, vrana, btrahan

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D4002
2012-11-20 18:01:25 -08:00
epriestley
10a9f2a15f Improve PhabricatorPropertyListView and add section headers
Summary:
  - For Drydock, I want to add section headers to separate user-defined attributes from global attributes.
  - Some day for Differential, I want to add "Summary" and "Test Plan" section headers.
  - Clean up some stuff a bit; drop the multiple APIs for setting text content. Explicitly disallow appendChild().
  - Build out the UIExample a bit.

Test Plan:
{F24821}

{F24822}

Reviewers: chad, btrahan

Reviewed By: chad

CC: aran

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D4000
2012-11-20 18:01:18 -08:00
Wez Furlong
df76ed9545 be careful of received mail object in error cases too
Summary:
we're tracking down a fatal caused by the mandatory
attachments array parameter change in the reply handler and
yo dawg, heard you like to fatal in your fatal.

Test Plan:
internal test scenario with xmail -> phabricator
triggered manually.

Reviewers: nh, vrana, epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D4005
2012-11-20 17:19:26 -08:00
epriestley
b2bf634795 Add a detail view for resources in Drydock
Summary: Nothing fancy here, just add a detail page.

Test Plan:
Looked at detail page.

{F24808}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, vrana

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D3995
2012-11-20 13:25:22 -08:00
epriestley
27626e6d47 Document a policy about fishing expeditions
Summary:
Tighten the Phabricator support policy from "we will help with literally anything for free" to "we will help with anything for free, except unreproducible fishing expeditions".

This is not the right policy in the long term (in some form, I expect the level of free support will decrease, and, e.g., I won't be offering to drive to your place and fix your stuff), but this class of issue is by far the worst and most pressing and I want to stop dealing with fishing expeditions like this one right now, since I hate supporting them and they're a disproportionately huge waste of time:

  https://github.com/facebook/phabricator/issues/233

We had a similar case over the weekend on Facebook:

  (... snip many messages ...)
  Adam Aahil
  :(
  need your help bro i have to also setup on live server as well
  still trying ...
  not success
  after doing this my local apache is not restarting ..

  Adam Aahil
  when u get time plz let me know

Write a friendly explanation of why these support cases aren't a priority and how to build repro cases.

If this looks good, I plan to respond to anything that I can't reproduce in a few minutes with a link to this.

Test Plan: {F24759}

Reviewers: btrahan, chad

Reviewed By: chad

CC: vrana, aran

Differential Revision: https://secure.phabricator.com/D3981
2012-11-19 17:39:44 -08:00
Bob Trahan
b4758c765c fix feed story publishing for audit comments
Summary: we need to make sure we should publish to the auditor in a given audit request. write some custom logic for this as it is subtly different than other things like CC.

Test Plan: repro from T2087 produced expected results. further, former auditors who resigned did not get feed stories published.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2087

Differential Revision: https://secure.phabricator.com/D3987
2012-11-19 17:25:45 -08:00
Bob Trahan
1e743c9138 fix lightbox for when we have no $user or $request
Summary: defensive program wins all battles

Test Plan: lightbox still worked

Reviewers: vrana, epriestley

Reviewed By: vrana

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3975
2012-11-19 17:05:10 -08:00
Bob Trahan
1578986590 fix unit test data showing up in diff view
Summary: I am an idiot. :(  D3962 added the full set of properties and I derp'ed this part of the diff up

Test Plan: ask lesliepc16 to take a look

Reviewers: epriestley, vrana

Reviewed By: vrana

CC: lesliepc16, aran, Korvin

Maniphest Tasks: T2091

Differential Revision: https://secure.phabricator.com/D3984
2012-11-19 14:52:01 -08:00
vrana
b29dfe436e Fix fatal in browse file if lintCommit is invalid
Test Plan: Set `lintCommit` to 'x' and browsed a file.

Reviewers: nh, epriestley

Reviewed By: nh

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3976
2012-11-19 12:06:58 -08:00
Espen Volden
874fb9b6d9 <LDAP: If available use DN from previously retrieved user>
Summary:
When searching for a user before logging in use the DN from the retrived user.
This allows you to use a less fine grained DN when searching for a user. For example dc=domain,dc=domain instead of ou=unit,dc=domain,dc=com.

Test Plan: Tested on local install with ldap.search-first disabled and enabled.

Reviewers: epriestley, yunake

Reviewed By: epriestley

CC: auduny, briancline, aran, Korvin, vsuba

Differential Revision: https://secure.phabricator.com/D3549
2012-11-17 04:47:17 -08:00
vrana
f47c0a3a06 Fix Diffusion lint counts under SVN
Summary: Also remove some columns.

Test Plan: Looked at SVN dir in Diffusion.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, vsuba

Maniphest Tasks: T2038

Differential Revision: https://secure.phabricator.com/D3949
2012-11-16 16:02:05 -08:00
vrana
ef8c43ac2a Simplify and optimize save_lint.php
Test Plan: Ran it.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2038

Differential Revision: https://secure.phabricator.com/D3933
2012-11-16 15:58:09 -08:00
Bob Trahan
5a58d168ed Differential - add unit and lint information to diff view
Summary:
see title. Note that fields that use customs storage don't work because I didn't think it made sense to load a revision object to get that data. Further, we don't have a revision id at some points, so its not clear what does / does not work...?

Also added a link to upsell this diff view as I had trouble finding it.

Test Plan: viewed some diffs

Reviewers: epriestley, vrana

Reviewed By: epriestley

CC: chad, aran, Korvin

Maniphest Tasks: T2026

Differential Revision: https://secure.phabricator.com/D3962
2012-11-16 11:48:17 -08:00
Chad Little
d4a022be6f Make default button text size 13px.
Summary: Makes buttons look 13px by default, 11 px small.

Test Plan: http://phab1.pushlabs.net/uiexample/view/PhabricatorButtonsExample/

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2078

Differential Revision: https://secure.phabricator.com/D3972
2012-11-16 11:19:12 -08:00
epriestley
ee2e85a0bb Fix several migration issues with the Task/Counter patch
Summary:
People hit three issues with D3914:

  - As per T2059, we applied a schema change from a `.php` patch, which currently does not work if you use a different user to make schema changes than for normal use.
    - Since the change in question is idempotent, just move it to a `.sql` patch. We'll follow up in T2059 and fix it properly.
  - Rogue daemons at several installs used old code (expecting autoincrement) to insert into the new table (no autoincrement), thereby creating tasks with ID 0.
    - Rename the table so they'll fail.
    - This also makes the code a little more consistent.
  - Some installs now have tasks with ID 0.
    - Use checks against null rather than against 0 so we can process these tasks.

The major issues this fixes are the schema upgrade failure in T2059, and the infinite loops in T2072 and elsewhere.

This isn't really a fully statisfactory fix. I'll discuss some next steps in T2072.

Test Plan: Created new tasks via MetaMTA/Differential. Ran tasks with `phd debug taskmaster`. Inserted a task 0 and verified it ran and archived correctly.

Reviewers: btrahan, vrana, nh

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2072, T2059

Differential Revision: https://secure.phabricator.com/D3973
2012-11-16 10:19:22 -08:00
Bob Trahan
e40bcc8d2b update documentation for storage changes w/ .php files
Summary: no schema changes allowed in the .php files

Test Plan: viewed doc -- looked good.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2059

Differential Revision: https://secure.phabricator.com/D3966
2012-11-16 07:22:31 -08:00
Bob Trahan
06384f5f87 fix mail handling error -- return empty array if we have no $addresses
Test Plan: pushing it live to test
2012-11-16 06:57:15 -08:00
Julius Seporaitis
2b00f5e8b6 Add support for S3 endpoint regions.
Summary:
Allows to use file storage in different Amazon S3 regions as well as it
should support different file storage services with S3 compliant API
(eg.: Bashos' Riak CS).

Test Plan:
1. Create S3 bucket in non-default AWS Region (e.g. EU/Ireland).
2. Set appropriate bucket policy to allow upload & download objects for the specified access credentials.
3. Set `amazon-s3.endpoint` in your configuration file to an appropriate value (e.g. `s3-eu-west-1.amazonaws.com` for EU region).

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3965
2012-11-16 04:08:14 -08:00
Ricky Elrod
bf4f74dbb3 Don't show deleted pages from the 'All Documents' panel.
Summary:
If a user is asking for a list of documents stored in Phriction, it's pretty
safe to assume that they mean documents that actually exist.

Test Plan:
Made a document, saw it listed in /phriction/list/all. Deleted it, and no longer
saw it.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3951
2012-11-15 16:34:48 -08:00
Ricky Elrod
7fac80cb9a Don't show the delete button on a deleted document
Summary:
This doesn't actually contain any logic to prevent a user from deleting a
document twice, but it makes it significantly harder to do so.

Test Plan:
Went to edit a document, saw the delete button. Clicked it, then went back to
the edit view, and no longer saw the delete button.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3952
2012-11-15 15:56:34 -08:00
Nick Harper
90dedc16a0 Fix CSS for textareas in windows
Summary:
Windows browsers default to monospace textareas, which look bad. Let's
use the same font we're using everywhere else.

Test Plan:
load differential in firefox on windows and see that the comment box in
differential is no longer Courier New.

Reviewers: chad, epriestley

Reviewed By: epriestley

CC: btrahan, vrana, aran, Korvin

Differential Revision: https://secure.phabricator.com/D3968
2012-11-15 15:18:59 -08:00
epriestley
39d476286f Minor, update Celerity map. 2012-11-15 14:27:50 -08:00
vrana
040fac06d4 Refactor freeform field specification
Summary:
I want to attach the task also to revision, not only to commit by mentioning it in summary.
This is a preparation for it, useful by itself:

* One query instead of N.
* Lower CRAP score, yay!

Refs T945.

Test Plan:
My Test Plan is really //plan// this time.
I want to update Phabricator in the minute when I commit this.

Reviewers: 20after4, epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T945

Differential Revision: https://secure.phabricator.com/D3873
2012-11-13 11:41:15 -08:00
Bob Trahan
cd8a9c603e fix Maniphest search for null-like values edge case
Summary: wishlist has priority value of 0 which was messing things up. also fix search text so we can search for "0".

Test Plan: searched for stuff, got results

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1878

Differential Revision: https://secure.phabricator.com/D3948
2012-11-12 13:53:33 -08:00
Bob Trahan
f8737d15ca Differential - special-case "no reviewers" warning to show only for revions that need review
Summary: 'cuz who cares unless you need review?

Test Plan: noted the UI showed up appropriately to my new business logix

Reviewers: epriestley, chad

Reviewed By: chad

CC: aran, Korvin

Maniphest Tasks: T2010

Differential Revision: https://secure.phabricator.com/D3958
2012-11-12 13:35:44 -08:00
Bob Trahan
3c11bf320f improve calendar status editing
Summary: make it so a given user can click to edit status from calendar view. also fix bug so when editing status existing "type" is selected

Test Plan: edited status from calendar view and observed "sporadic" status sticky

Reviewers: epriestley, chad

Reviewed By: chad

CC: aran, Korvin

Maniphest Tasks: T2060, T2061

Differential Revision: https://secure.phabricator.com/D3957
2012-11-12 13:28:45 -08:00
Chad Little
7bdd0e7a3d More icons, black grey and white.
Summary: Added Celerity, Retina

Test Plan: Mostly Photoshop, need to test for realz.

Reviewers: epriestley, btrahan

Reviewed By: btrahan

CC: aran, Korvin

Maniphest Tasks: T2013

Differential Revision: https://secure.phabricator.com/D3954
2012-11-12 13:20:15 -08:00
Chad Little
e529005004 Update icons for 14px and 28px transparent layout.
Summary: Used photoshop to produce 14 and 28 pixel icons.

Test Plan: View in photoshop, compress via ImageOptim

Reviewers: vrana, epriestley, btrahan

Reviewed By: btrahan

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3947
2012-11-09 16:13:41 -08:00
vrana
3017a1f077 Order Diffusion lint details 2012-11-09 15:40:18 -08:00
Bob Trahan
4a8ce1699b Create a "New Document" button in phriction
Summary: gives user a dialogue and they can fill out what comes after /w/

Test Plan: made some new wiki docs. played with garbage data and edit scenarios as well as vanilla create -- good ish

Reviewers: epriestley, chad

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1360

Differential Revision: https://secure.phabricator.com/D3946
2012-11-09 15:08:37 -08:00
Bob Trahan
8ee6cbe1d4 add "author" information to conduit call
Summary: 'cuz we need it in arcanist for T479 to commit as author

Test Plan: verified the return value was correct in conduit

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T479

Differential Revision: https://secure.phabricator.com/D3917
2012-11-09 13:33:58 -08:00
vrana
a316a0bbb3 Define DiffusionRequest::setPath()
Summary: Resolves T2056.

Test Plan: Browsed SVN repo.

Reviewers: epriestley

Reviewed By: epriestley

CC: ced, aran, Korvin

Maniphest Tasks: T2056

Differential Revision: https://secure.phabricator.com/D3943
2012-11-09 11:17:56 -08:00
vrana
4f65d4f344 Display list of lint problems in Diffusion
Test Plan:
/diffusion/ARC/lint/master/, saw links.
/diffusion/ARC/lint/master/?lint=SPELL0, saw two links.
/diffusion/ARC/lint/master/src/lint/linter/ArcanistFilenameLinter.php?lint=SPELL0, saw link.
Clicked on everything.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2038

Differential Revision: https://secure.phabricator.com/D3931
2012-11-09 11:09:03 -08:00
vrana
1b70324815 Improve docs for changing schema
Test Plan:
  $ diviner .

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3937
2012-11-09 10:55:05 -08:00
epriestley
b942c35872 Minor, update Celerity map. 2012-11-09 10:04:57 -08:00
Chad Little
ead96f467b Rework buttons with new gradients, rounded corners.
Summary:
This adds a green/blue/grey gradient and new button CSS.

Updated.

Test Plan: Clicked through various pages in my install, but would like more feedback.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

CC: vrana, aran, Korvin

Differential Revision: https://secure.phabricator.com/D3919
2012-11-08 15:47:11 -08:00
vrana
726a4912bd Allow filtering by lint code in Diffusion
Test Plan:
/diffusion/ARC/lint/master/src/, clicked on count link.
/diffusion/ARC/browse/master/src/difference/?lint=XHP9, clicked on file name.
/diffusion/ARC/browse/master/src/difference/ArcanistDiffUtils.php?lint=, verified that all messages are displayed.
/diffusion/ARC/browse/master/src/difference/ArcanistDiffUtils.php?lint=XHP9.
/diffusion/ARC/browse/master/src/difference/ArcanistDiffUtils.php?lint=TXT3, verified that 0 messages are displayed.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3929
2012-11-08 15:44:37 -08:00
vrana
168bdaa872 Display lint overview in Diffusion
Summary: I will add links from /diffusion/ARC/lint/ in future diff.

Test Plan:
/diffusion/ - clicked on lint messages link.
/diffusion/ARC/ - clicked on lint messages link.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3926
2012-11-08 15:41:54 -08:00
vrana
846a359d9a Display number of lint messages in Diffusion dir
Test Plan:
Went to https://secure.phabricator.com/diffusion/ARC/browse/.
Saw number of lint messages per dir, not terribly slow.
Went to https://secure.phabricator.com/diffusion/ARC/browse/master/src/difference/.
Saw number of lint messages per file.
Disabled lint, didn't see it.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3921
2012-11-08 15:40:48 -08:00
vrana
47a184e2a5 Display saved lint messages in Diffusion browse file
Test Plan:
Looked at https://secure.phabricator.com/diffusion/ARC/browse/master/src/difference/ArcanistDiffUtils.php.
Saw "Show 16 Lint Messages".
Clicked on it, saw the messages.
Clicked on "Hide Lint Messages".
Went to https://secure.phabricator.com/diffusion/ARC/browse/master/src/difference/ArcanistDiffUtils.php;5be54e.
Saw "Switch Commit to See Lint".
Clicked on it, saw the messages.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3920
2012-11-08 15:39:44 -08:00
vrana
23a046b3cd Allow saving lint errors to database
Summary: This saves lint errors to the path change of current commit. It requires pushed revision. It doesn't save difference from previous commit mentioned in T2038#comment-4 - I don't plan doing it after all, everything would be much more complicated and the amount of data saved with this approach isn't that bad.

Test Plan: Applied patch, ran script, verified DB.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2038

Differential Revision: https://secure.phabricator.com/D3899
2012-11-08 15:39:43 -08:00
vrana
d91305e518 Add external arrow to Search Owners
Test Plan: Displayed it.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3930
2012-11-08 15:36:59 -08:00
vrana
2137b49d16 Link repo history from repo overview commits
Test Plan: Clicked on it.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3928
2012-11-08 15:36:35 -08:00
Bob Trahan
bd1bc6d71a fix error where blank email addresses were sneaking in the stack
Summary: array_filter to the rescue

Test Plan: mostly lots of reasoning (as opposed to making a fake user with a blank email address to reproduce)

Reviewers: epriestley, chad

Reviewed By: chad

CC: aran, Korvin

Maniphest Tasks: T2052

Differential Revision: https://secure.phabricator.com/D3927
2012-11-08 12:21:50 -08:00
Chad Little
c5508c214e Merge branch 'master' of git://github.com/facebook/phabricator 2012-11-08 09:52:58 -08:00
epriestley
2e993f7561 Fix an issue where projects queried in "Any Projects" in Maniphest did not have their handles loaded
Summary:
See https://github.com/facebook/phabricator/issues/230.

If you searched for a project with the "Any Projects" field, we didn't explicitly include it in the list of handles to fetch. Usually this works fine because something else fetches the handle, but if you, e.g., search for a project that has no tasks, you get a fatal.

Test Plan:
Reproduced fatal described in report by performing a custom query for "Any Projects" using a project with no tasks; applied patch; query worked correctly.

Verified `$xproject_phids` and `$project_phids` are already queried.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3923
2012-11-08 09:05:38 -08:00
epriestley
c812d7d686 Add a simple button UIExample
Summary: For visualizing D3919.

Test Plan: {F22921}

Reviewers: chad, btrahan

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D3922
2012-11-08 08:22:08 -08:00
Bob Trahan
9966af50dd Delete PhabricatorRemarkupRuleProxyImage
Summary: don't need it now that uploading files is so easy. Plus it made for some buggy jonx if / when there were bad image links coupled with caching. In theory this is a lot less pretty though if folks linked to a bunch of files served elsewhere using images.

Test Plan: http://does-not-exist.com/imaginary.jpg rendered as a link!

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2000

Differential Revision: https://secure.phabricator.com/D3908
2012-11-07 14:31:43 -08:00
Chad Little
26b7d57d7f Updates. 2012-11-07 13:49:15 -08:00
epriestley
7332599e03 Provide an IDS_COUNTER mechanism for ID assignment
Summary: See D3912 for discussion. InnoDB may reuse autoincrement IDs after restart; provide a way to avoid it.

Test Plan: Unit tests. Scheduled and executed tasks through `drydock lease --type host` and `phd debug taskmaster`.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3914
2012-11-07 13:33:07 -08:00
Bob Trahan
73bc34b26d Add support for differential field specifications to be indexed in search
Summary: ...and do so for a few fields -- summary, test plan, and revert plan.

Test Plan: added NATASHA and BULLWINKLE to summary and test plan of existing diff. Diff showed up in search!

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T654

Differential Revision: https://secure.phabricator.com/D3915
2012-11-07 13:31:52 -08:00
Bob Trahan
e53ca45fd8 rebuild libary map 2012-11-06 15:43:44 -08:00
Bob Trahan
730cf80a36 Expose subscribers in search and some polish
Summary: was poking at T654 and noticed subscribers weren't exposed in search UI so I did so. Also make ponder a little less silly on the double handles load. Finally, stopped showing the "Examine Index" link to non admins since they can't click it. Note this introduces a UI oddity in that you Users and Phriction Documents don't currently have the subscribe functionality.

Test Plan: searched for subscribers in all applications - it worked!

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3907
2012-11-06 15:35:26 -08:00
Bob Trahan
fabf36a819 add arc unit data to table of contents in diff view
Summary: title

Test Plan: viewed a diff and verified nothing barfed.

Reviewers: vrana, epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2026

Differential Revision: https://secure.phabricator.com/D3906
2012-11-06 15:33:56 -08:00
epriestley
c5e64166da Minor, older version of the linter went crazy. 2012-11-06 15:31:00 -08:00
epriestley
7e0ce08154 Make various Drydock CLI/Allocator improvements
Summary:
  - Remove EC2, RemoteHost, Application, etc., blueprints for now. They're very proof-of-concept and Blueprints are getting API changes I don't want to bother propagating for now. Leave the abstract base class and the LocalHost blueprint. I'll restore the more complicated ones once better foundations are in place.
  - Remove the Allocate controller from the web UI. The original vision here was that you'd manually allocate resources in some cases, but it no longer makes sense to do so as all allocations come from leases now. This simplifies allocations and makes the rule for when we can clean up resources clear-cut (if a resource has no more active leases, it can be cleaned up). Instead, we'll build resources like the localhost and remote hosts lazily, when leases come in for them.
  - Add some configuration to manage the localhost blueprint.
  - Refactor `canAllocateResources()` into `isEnabled()` (for config checks) and `canAllocateMoreResources()` (for quota checks, e.g. too many resources are allocated already).
  - Juggle some signatures to align better with a world where blueprints generally do allocate.
  - Add some more logging and error handling.
  - Fix an issue with log ordering.

Test Plan: Allocated some localhost leases.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D3902
2012-11-06 15:30:11 -08:00
epriestley
0e774dac93 Make minor improvements to Drydock web interface
Summary: Consolidate some code and start on lease detail pages.

Test Plan: {F22783}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D3901
2012-11-06 15:28:33 -08:00
vrana
19c840edf2 Better explain 'h' keyboard shortcut in Differential
Summary: Also move 'f' outside this group of commands.

Test Plan: Pressed '?'.

Reviewers: epriestley, alanh, frantic

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3903
2012-11-06 11:50:31 -08:00
vrana
10cf2bb4e2 Mark PhabricatorRepositorySvnCommitChangeParserWorker as final
Test Plan:
  $ git grep PhabricatorRepositorySvnCommitChangeParserWorker

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3897
2012-11-05 23:27:40 -08:00
Bob Trahan
5b1d73e5dd make remarkup savvier about fragments in phriction links
Summary:
use PhutilURI class to get the slug and the fragment, normalize the slug, and then glue it back together with another PhutilURI

fixes https://github.com/facebook/phabricator/issues/228

Test Plan: had a few links like [[ example/doc#title | wiki fun ]] and verified links generated were correct

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3894
2012-11-05 15:47:51 -08:00
Bob Trahan
4d79d462fb make is to when a user resigns from an audit they are no longer cc'd
Summary: do this by making sure to filter out those who've "resigned" from the email CC list

Test Plan: resigned from an audit and no longer got emails on updates

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2033

Differential Revision: https://secure.phabricator.com/D3890
2012-11-05 11:18:32 -08:00
vrana
ef85f49adc Delete license headers from files
Summary:
This commit doesn't change license of any file. It just makes the license implicit (inherited from LICENSE file in the root directory).

We are removing the headers for these reasons:

- It wastes space in editors, less code is visible in editor upon opening a file.
- It brings noise to diff of the first change of any file every year.
- It confuses Git file copy detection when creating small files.
- We don't have an explicit license header in other files (JS, CSS, images, documentation).
- Using license header in every file is not obligatory: http://www.apache.org/dev/apply-license.html#new.

This change is approved by Alma Chao (Lead Open Source and IP Counsel at Facebook).

Test Plan: Verified that the license survived only in LICENSE file and that it didn't modify externals.

Reviewers: epriestley, davidrecordon

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2035

Differential Revision: https://secure.phabricator.com/D3886
2012-11-05 11:16:51 -08:00
20after4
d7f6bd42d6 Use getProductionURI instead of getURI for emails.
Summary: 'TASK DETAIL' links point to the non-production uri.  Our daemons run in an environment that uses different baseUrl because we can't use https locally (https is provided by our load balancers)

Test Plan: check emails generated with a non-production environment. See that the TASK DETAIL link points to production url.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3877
2012-11-02 13:43:38 -07:00
Bob Trahan
041040c422 post feed stories to arbitrary uris via a new Worker
Summary: so folks can write applications and whatnot.

Test Plan: set feed.http-hooks to local dev instance (200) and localhost (500) in my conf. Verified succcess and retrying respectively.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T305

Differential Revision: https://secure.phabricator.com/D3874
2012-11-02 13:34:18 -07:00
vrana
f34246a723 Hide Edit Maniphest Tasks in commit with disabled Maniphest
Test Plan: Viewed commit with enabled/disabled Maniphest.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3871
2012-11-01 17:38:26 -07:00
epriestley
89b37f0357 Make various Drydock improvements
Summary:
Tightens up a bunch of stuff:

  - In `drydock lease`, pull and print logs so the user can see what's happening.
  - Remove `DrydockAllocator`, which was a dumb class that did nothing. Move the tiny amount of logic it held directly to `DrydockLease`.
  - Move `resourceType` from worker task metadata directly to `DrydockLease`. Other things (like the web UI) can be more informative with this information available.
  - Pass leases to `allocateResource()`. We always allocate in response to a lease activation request, and the lease often has vital information. This also allows us to associate logs with leases correctly.

Test Plan: Ran `drydock lease --type host` and saw it perform a host allocation in EC2.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D3870
2012-11-01 16:53:17 -07:00
epriestley
3844be3f83 Minor, fix an MTA issue introduced in D3859.
Prior to D3859, getRequiredLeaseTime() was called before doWork(), which had the critical but subtle side effect of populating `$this->message`. Instead, make the population explicit. This restores email functionality.

Test Plan: ran `phd debug taskmaster` and verified email was delivered

Auditors: btrahan
2012-11-01 16:38:47 -07:00
epriestley
07dc943215 Modernize the drydock script
Summary: Add a bin/drydock symlink and break it into workflows. Nothing too special here.

Test Plan: Ran `bin/drydock wait-for-lease`, `bin/drydock lease`, `bin/drydock help`, etc.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D3867
2012-11-01 15:30:14 -07:00
Bob Trahan
afae26ad94 robustify Differential and Maniphest mailhandlers wrt attachments
Summary:
a few things

- make the parent mailhandler class not send "blank body" error if you have attachments
- make both differential and maniphest append a list of attachments to the body if any exist
- BONUS - made the cc stuff work in Maniphest

Test Plan: I haven't actually tested this yet. :(  i need to figure out how to send a mail with an attachment from the command-line and figured I'd serve this up first.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2012

Differential Revision: https://secure.phabricator.com/D3868
2012-11-01 15:18:06 -07:00
Bob Trahan
e0b9a63388 make Differential comment panel flexible width and nip a bit at other flexible width issues
Summary:
all sorts of stuff

 - made comment form width flexible
 - made margins element specific rather than part of differential-primary-pane
 - made box elements all veritically align left and right until code stuff
 - re-factored width calculaton stuff a bunch so only the code section has to suffer from max-width calculations; everything else can flex
 - made colspan 3 for rightmost table header element. this is so the "View Options" UI element ends up lining up correctly with the "Show All Lines" element just below

Test Plan: looked at revision view and changeset view and it all looked hot. note I did not test what things looked like with different word wrap values; that should still work given the re-factoring and not re-design here. also toggled haunted panel mode and it looked good.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2006

Differential Revision: https://secure.phabricator.com/D3866
2012-11-01 13:30:37 -07:00
epriestley
0364ccdd5f Fix an issue where PhabricatorWorkerLeaseQuery may lease different tasks than it selects
Summary:
We lock tasks by setting `leaseOwner` to a unique value, but the value is currently unique-to-the-process rather than unique-to-the-query. This means that if a process leases a task, then leases another task, both tasks will have the same `leaseOwner`. This can cause an issue where we go to select the task we just leased and get the other task instead, if we aren't careful about the select construction.

We can avoid this by being clever and making sure the select is constructed correctly, but making the `leaseOwner` unique to the query is much simpler and more foolproof. This guarantees we always select only the rows we just leased.

Also remove `PhabricatorGoodForNothingWorker` since `PhabricatorTestWorker` fills its role of allowing things to be tested, and simplify the unit tests since we don't need to be clever about avoiding this issue any more.

Test Plan: Ran unit tests.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D3862
2012-11-01 11:30:49 -07:00
epriestley
f0fdcf1a51 Undumb the Drydock resource allocator pipeline
Summary:
This was the major goal of D3859/D3855, and to a lesser degree D3854/D3852.

As Drydock is allocating a resource, it may need to allocate other resources first. For example, if it's allocating a working copy, it may need to allocate a host first.

Currently, we have the process basically queue up the allocation (insert a task into the queue) and sleep() until it finishes. This is problematic for a bunch of reasons, but the major one is that if allocation takes more resources (host, port, machine, DNS) than you have daemons, they could all end up sleeping and waiting for some other daemon to do their work. This is really stupid. Even if you only take up some of them, you're spending slots sleeping when you could be doing useful work.

To partially get around this and make the CLI experience less dumb, there's this goofy `synchronous` flag that gets passed around everywhere and pushes the workflow through a pile of special cases. Basically the `synchronous` flag causes us to do everything in-process. But this is dumb too because we'd rather do things in parallel if we can, and we have to have a lot of special case code to make it work at all.

Get rid of all of this. Instead of sleep()ing, try to work on the tasks that need to be worked on. If another daemon grabbed them already that's fine, but in the worst case we just gracefully degrade and do everything in process. So we get the best of both worlds: if we have parallelizable tasks and free daemons, things will execute in parallel. If we have nonparallelizable tasks or no free daemons, things will execute in process.

Test Plan: Ran `drydock_control.php --trace` and saw it perform cascading allocations without sleeping or special casing.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D3861
2012-11-01 11:30:42 -07:00
epriestley
84ee4cd9f6 Factor out task execution and formalize permanent failures
Summary:
  - Clean up a TODO about permanent failures.
  - Clean up a TODO about failing tasks after too many retries.
  - Clean up a TODO about testing for bad leases.
  - Make the lease/retry implementation more flexible and natural.
  - Make completely bogus tasks fail permanently.
  - Make PhabricatorMetaMTAWorker use new `getWaitBeforeRetry()` (as intended), not hackily implement logic in `getRequiredLeaseTime()`.
  - Document worker hooks for failures and retries.
  - Provide coverage on everything.

Test Plan: Ran unit tests. Ran `bin/phd debug taskmaster`.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D3859
2012-11-01 11:30:23 -07:00
epriestley
88fad90c1c Move task leasing to a dedicated query
Summary: This simplifies the fairly thorny logic of leasing tasks a bit. I'm planning to introduce another callsite shortly for Drydock.

Test Plan: Ran `bin/phd debug taskmaster`, observed sensible queries and correct operation.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D3855
2012-11-01 11:30:16 -07:00
Bob Trahan
a977b49e33 add ids and phids to maniphest.query
Summary: requires add withTaskPHIDs to maniphest query class.

Test Plan: queried via conduit by task id and task phid -- respective success!

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2017

Differential Revision: https://secure.phabricator.com/D3863
2012-11-01 10:47:45 -07:00
Edward Speyer
fe8351c930 Delete stale fixtures with bin/storage destroy
Summary:
When a PhabricatorTestCase dies after creating storage fixtures, it leaves
those storage fixtures around.  This doesn't happen often, but when it does
happen it's a pain to cleanup.  The --unittest-fixtures option helps automate
that cleanup.

Test Plan:
Ran it with --dryrun, then for real.  Became overwhelmed with a Zen like peace
after regarding the tidiness and beauty of SHOW DATABASES.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3858
2012-10-31 18:36:38 -07:00
Bob Trahan
ae616e82d3 add a few more email preferences for differential and maniphest
Summary: this makes notifications work better for folks who choose to handle things in Phabricator and not over email

Test Plan: had my test account and "real" account battle each other on a few tasks and divs. Noted that I received emails appropos to the respective settings.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1977

Differential Revision: https://secure.phabricator.com/D3856
2012-10-31 17:11:04 -07:00
epriestley
fe329b9738 Modernize worker task detail view
Summary: Make mobile-friendly and provide UI to cancel/retry tasks. Remove display of task data to arbitrary users, as it may be sensitive.

Test Plan:
{F22502}
{F22503}
{F22504}
{F22505}
{F22506}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D3854
2012-10-31 15:22:32 -07:00
epriestley
5903ed650c Move completed tasks to an "archive" table and delete them in the GC
Summary:
Currently, when taskmasters complete a task it is immediately deleted. This prevents us from doing some general things, like:

  - Supporting the idea of permanent failure (e.g., after N failures just stop trying).
  - Showing the user how fast taskmasters are completing tasks.
  - Showing the user how long tasks took to complete.

Having better visibility into this is important to Drydock, which builds on the task system. Also, generally buff debug output for task execution.

Test Plan: Ran `bin/phd debug taskmaster`. Ran `bin/phd debug garbage`. Queued some tasks via various systems.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D3852
2012-10-31 15:22:16 -07:00
Bob Trahan
4edf8ae2fc make "browse in diffusion" action work for commits in branches other than master
Summary: we do this by passing the "seenOnBranches" commit data detail through the stack

Test Plan: browse in diffusion link worked for non-master checkins under git

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1949

Differential Revision: https://secure.phabricator.com/D3853
2012-10-31 14:07:25 -07:00
epriestley
6c36efed72 Minor, update celerity map. 2012-10-31 12:25:53 -07:00
epriestley
8e65a04d98 Add "download" icon to action list view icon list
Summary: See D3849.

Test Plan: {F22492}

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1997

Differential Revision: https://secure.phabricator.com/D3850
2012-10-31 12:12:03 -07:00
Bob Trahan
9f51f1933f Bug fix for diffusion browse views for images and binary files
Summary: D3499 introduced some new hotness but broke these less common cases. add slightly updated ui for this.  Note we need a 'download' icon for this UI to not be horrendous.

Test Plan: viewed a binary file and an image in diffusion browse view

Reviewers: epriestley

Reviewed By: epriestley

CC: nh, aran, Korvin

Maniphest Tasks: T1997

Differential Revision: https://secure.phabricator.com/D3849
2012-10-31 11:43:17 -07:00
epriestley
a7da4fad88 Add Drydock Application
Summary: Add an Application class for Drydock and move routing rules there.

Test Plan: Looked at /applications/, clicked around drydock.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3847
2012-10-31 09:57:57 -07:00
epriestley
1154447d06 Add PhabricatorFileQuery
Summary: This doesn't do anything useful yet but Pholio needs to access Files and I wanted to get the groundwork in place for eventual policy-awareness.

Test Plan: Will use in Pholio.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3829
2012-10-31 09:57:46 -07:00
epriestley
7b3f7ea8f7 Don't send the address verification email "From" the user in question
Summary: Sending these as the user doesn't make a ton of sense, and LLVM reports some issues with these emails getting caught in spam filters. Users expect these emails, so just send them from "noreply@example.com" or whatever is configured.

Test Plan: Sent myself a verification email, verified it came from a noreply@ address.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: klimek, aran

Maniphest Tasks: T1994

Differential Revision: https://secure.phabricator.com/D3843
2012-10-31 09:57:40 -07:00
Bob Trahan
7c99d52548 filter_phids => filterPHIDs
Summary: typo of sorts. should probably be philterPHIDs. :P

Test Plan: verified i spelled "filterPHIDs" correctly.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1993

Differential Revision: https://secure.phabricator.com/D3846
2012-10-30 18:21:35 -07:00
Ricky Elrod
bf3f091896 Remove an erroneous 'd'
Reviewed by: epriestley
2012-10-29 16:30:56 -07:00
vrana
3688ac7479 Fix caching for synthetic inline comments
Test Plan: Looked at diff with several different lint errors, saw correct messages in their inline comments.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3827
2012-10-29 09:38:37 -07:00
epriestley
1163598acd Provide some guidance on creating backups
Summary: A user asked for some instructions, so I wrote up some documentation.

Test Plan: Read document. This is more or less how secure.phabricator.com backups work and the one time we had a data loss issue restoration worked reasonably well.

Reviewers: btrahan, vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3825
2012-10-26 12:01:58 -07:00
Bob Trahan
5d5f8a7a91 whoops - forgot to remove the third slash on this comment from D3822 2012-10-25 16:38:14 -07:00
epriestley
846f01e221 Correct self-review check in Differential
Summary: This check is currently wrong -- the actor is only //coincidentally// the owner (and only most of the time). It also raises at parse time, preventing any user from parsing a message with their own name in the "Reviewers" field. Instead, check against the right owner PHID and raise it only if a revision is available. See https://github.com/facebook/arcanist/issues/54 and next diff.

Test Plan: Tried to add myself as a reviewer to revisions I own via web and Conduit, got rejected. Parsed a message with myself in the "Reviewers:" field, it worked correctly.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3820
2012-10-25 16:27:49 -07:00
Bob Trahan
731a6900bd upgrade repository delete function to full-blown workflow
Summary: fancy title. really just make the delete() method aware of related objects and build a quick workflow which calls delete(). also make commit delete savvy about audit requests.

Test Plan: deleted a repository per the instructions given to me in the web UI

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1416, T1958, T1372

Differential Revision: https://secure.phabricator.com/D3822
2012-10-25 16:23:41 -07:00
epriestley
da7940b0a8 Minor, fix a typo: "beteeen" -> "between"
Auditors: vrana
2012-10-25 11:49:03 -07:00
epriestley
5d1bd51627 Add a script to migrate files between storage engines
Summary: Quora requested this (moving to S3) but it's also clearly a good idea.

Test Plan:
Ran with various valid/invalid options to test options. Error/sanity checking seemed OK.

Migrated individual local files.

Migrated all my local files back and forth between engines several times.

Uploaded some new files.

Reviewers: btrahan, vrana

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1950

Differential Revision: https://secure.phabricator.com/D3808
2012-10-25 11:36:38 -07:00
vrana
92a2866fb2 Increase double click target in blame
Summary:
I need to select author or revision quite often.
It's currently almost impossible because double click opens the link and drag-and-dropping tries to move the link.

Test Plan: Double clicked in blame.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3816
2012-10-24 15:42:08 -07:00
Jakub Vrana
d506ffbd30 Add regression test for LiskDAO::__call()
Summary: D3606

Test Plan: Deleted `call()`, ran the test.

Reviewers: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3814
2012-10-24 14:00:43 -07:00
Jakub Vrana
01de3dff81 Allow using StorageFixtureScopeGuard on Windows 2012-10-24 13:59:22 -07:00
Bob Trahan
60466d3bcc Create a status tool by giving /calendar/ some teeth
Summary: you can now add, edit, and delete status events. also added a "description" to status events and surface it in the big calendar view on mouse hover. some refactoring changes as well to make validation logic centralized within the storage class.

Test Plan: added, edited, deleted. yay.

Reviewers: epriestley, vrana

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T407

Differential Revision: https://secure.phabricator.com/D3810
2012-10-24 13:22:24 -07:00
epriestley
244b1302a0 Implement PhabricatorMarkupInterface in Diffusion/Audit comments
Summary: Followup to D3804. Makes Diffusion main comments (not just inlines) render properly with the modern markup pipeline.

Test Plan: Created previews and inline previews. Edited inlines. Saved comment, viewed comment. Verified caches were read and written using "Services" tab.

Reviewers: btrahan, vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3805
2012-10-23 17:46:44 -07:00
epriestley
ddb1f181c1 Simplify lightboxing and fix a few things
Summary:
Minor tweaks to lightboxes.

  - With "position: fixed;", we don't need to do any of the scroll/resize stuff. Just remove it.
  - Make the lightbox go over the menu bar -- was it intentional that it wasn't?
  - Make 'jx-mask' use "position: fixed;" too.
  - Add a loading indicator.
  - In Differential/Maniphest/etc, a preview may bring in an image but won't bring in the CSS we need. The "real" fix is to ship CSS/JS with ajax, but that's really hard -- fake it by pulling in the right CSS any time we render a remarkup area.

I'm going to do a couple of other tweaks here but need to update JX.Mask.

Test Plan: Verified behavior is reasonable in Safari, Firefox, Chrome with multiple images / scroll / previews / resize.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1896

Differential Revision: https://secure.phabricator.com/D3795
2012-10-23 17:34:43 -07:00
epriestley
fdf90b46eb Use modern two-stage markup cache (PhabricatorMarkupInterface) in Differential
Summary:
See T1963 for discussion of the Facebook-specific hack.

Differential currently uses a one-stage cache (render -> postprocess -> save in cache) rather than the two-stage cache (render -> save in cache -> postprocess) offered by `PhabricatorMarkupInteface`. This breaks Differential comments coming out of cache for the lightbox, and makes various other things suboptimal (status of handles like @mentions and embeds are not displayed accurately).

Instead, use the modern stuff.

Test Plan:
  - Created preview comments and inlines in Differential.
  - Edited a Differential inline.
  - Submitted main and inline Differential comments.
  - Viewed and edited Differential summary and test plan.
  - Created preview comments and inlines in Diffusion.
  - Submitted comments and inlines in Diffusion.
  - Verified Differential now loads and saves to the generalized markup cache (Diffusion is close, but main comments still hold a single-stage cache).
  - Verified old Differential comments work correctly with the lightbox.

Reviewers: vrana, btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1963

Differential Revision: https://secure.phabricator.com/D3804
2012-10-23 17:33:58 -07:00
epriestley
9dd9189283 Minor, move dialogs above masks. 2012-10-23 12:07:08 -07:00
epriestley
7749c5abf3 Mark notifications as read in Differential if we also sent an email
Summary: See D3789. Same thing for Differential.

Test Plan: Created a new revision and made a comment. Verified reviewer got popup notifications but the in-app notifications were delivered already marked as read.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1403

Differential Revision: https://secure.phabricator.com/D3790
2012-10-23 12:03:11 -07:00
epriestley
6b39af4022 Mark Maniphest notifications read if we send the user an email
Summary:
See D3784, T1403. When we send a user an email and a notification from Maniphest, mark the notification as read.

(It would be nice to do the thing with `multiplexMail()` a little less hackily, but it gets very complicated to do correctly because we require handles but sometimes do not have an actor/user so I'm punting for now.)

Test Plan: Acted on a task, verified notification was marked read because I received an email.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1403

Differential Revision: https://secure.phabricator.com/D3789
2012-10-23 12:02:40 -07:00
epriestley
696a1b22ba Make feed stories properly respect object policies
Summary:
  - When a feed story's primary object is a Policy object, use its visibility policy to control story visibility. Leave an exception for
  - Augment PhabricatorPolicyAwareQuery so queries may do pre-policy filtering without the need to handle their own buffering/cursor code. (We could slightly improve this: if a query returns less than a page of pre-filtered results we could keep getting pre-filtered results until we had at least a page's worth and then filter them all at once.)
  - Load and attach "required objects" to feed stories. We need this for policies anyway, and it will let us simplify story implementations by sourcing data directly from the object when we don't have some need to denormalize it (e.g., "title was changed from X to Y" needs to save the values of X and Y from when we published the story, but "user asked question X" can reflect the current version of the question).

Test Plan: Loaded main feed, project feed, notification menu / dropdown, notificaiton list, paginated things.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3783
2012-10-23 12:01:59 -07:00
epriestley
951864d388 Allow notifications to be published as read if the user also is getting an email
Summary: See discussion in T1403. Possibly we'll add a preference for this or something?

Test Plan: Not yet in use. See future diff.

Reviewers: btrahan, vrana

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1403

Differential Revision: https://secure.phabricator.com/D3784
2012-10-23 12:01:40 -07:00
epriestley
51c4b199d0 Allow policy-aware queries to prefilter results
Summary:
Provides a simple way for policy-aware queries to pre-filter results without needing to maintain separate cursors, and fixes a bunch of filter-related edge cases.

  - For reverse-paged cursor queries, we previously reversed each individual set of results. If the final result set is built out of multiple pages, it's in the wrong order overall, with each page in the correct order in sequence. Instead, reverse everything at the end. This also simplifies construction of queries.
  - `AphrontCursorPagerView` would always render a "<< First" link when paging backward, even if we were on the first page of results.
  - Add a filtering hook to let queries perform in-application pre-policy filtering as simply as possible (i.e., without maintaing their own cursors over the result sets).

Test Plan: Made feed randomly prefilter half the results, and paged forward and backward. Observed correct result ordering, pagination, and next/previous links.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3787
2012-10-23 12:01:11 -07:00
epriestley
0b9101f3c5 Make lightbox close when the background is clicked
Summary: When you click the dark background, close the lightbox.

Test Plan: Clicked arrows, image, etc., to make sure it didn't close. Clicked background to close.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3801
2012-10-23 12:00:45 -07:00
epriestley
4596e3876b Improve scrolling behavior for lightboxes in Safari
Summary: Our "html { overflow-y: scroll; }" makes Safari flip out when we put "hidden" on body. Instead, put the scroll on `body` and then replace it with `hidden` when the lightbox is visible.

Test Plan: In Safari, the body scrollbar vanishes when the lightbox is active and scrolling no longer causes spasms.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3800
2012-10-23 12:00:37 -07:00
epriestley
70dc3f5004 Show all available action list icons in UIExamples
Summary:
Make the example page a little more useful by showing available icons.

Also replace the "new" image, it had a little arrow which I thought was a "+". Use the one with a "+".

Test Plan: {F21966}

Reviewers: btrahan, vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3794
2012-10-23 12:00:28 -07:00
epriestley
0c48c1f487 Make date control include times
Summary:
See discussion in T404. Basically, the problem with date-only controls is that they may behave unpredictably in the presence of timezones. When you say "This needs to be done by Oct 23", you probably mean "Oct 23 5PM PST" or something like that, but someone in China may see the "Oct 24" and hit the deadline in good faith but be 10 hours too late. T404 has more discussion and examples. There are ways to fake this, but they get more complicated if the guy in China needs to move the date forward 24 hours.

I think the best solution to this is to not have date-only controls, and always display the time. This makes it absolutley unambiguous what something means, because the guy in the US will set "Oct 23 5PM" and the guy in China will see that accurately in local time.

The downside is that it's slightly more visual clutter and work for the user to specify things precisely, but I added some hints (start/end of day, start/end of business) that will hopefully let us pick the right default in most cases.

Test Plan:
Set some dates.

{F21956}

This has a couple of edge case issues on resize and some not-so-edge-case issues on mobile, but should be good to build T407 on without API changes.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T404, T407

Differential Revision: https://secure.phabricator.com/D3793
2012-10-23 12:00:20 -07:00
epriestley
e0cc277d5f Fix mask positioning and use mask classes in lightbox
Summary: See D3795 / D3797. Also made the mask darker.

Test Plan: Mask now sizes properly on window resize in all browsers / mask uses.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3798
2012-10-23 11:39:33 -07:00
epriestley
1a8232f4c9 Fix an issue where excluded recipients are not respected
Summary: I broke this in D3778. We modify `$parameters` and then ignore it in favor of `$params` for the rest of the method. Unit tests work great since they're one level below this.

Test Plan: Verified "Send email about my own actions" behaved correctly.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3796
2012-10-23 10:48:03 -07:00
Bob Trahan
3ffc764141 Introduce lightbox view for images
Summary:
images attached to maniphest tasks and mentioned in remarkup anywhere now invoke a lightbox control that lets the user page through all the images.

lightbox includes a download button, next / prev buttons, and if we're not at the tippy toppy of hte page an "X" or close button.

we also respond to left, right, and esc for navigating.

next time we should get non-images working in here...!

Test Plan:
played with maniphest - looks good
made comments with images. looks good.
made sure multiple image comments worked.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, chad

Maniphest Tasks: T1896

Differential Revision: https://secure.phabricator.com/D3705
2012-10-22 19:06:56 -07:00
epriestley
31ac1cbf6e Prevent typos in feed publishing
Summary: See D3789. Moving away from constants means less safety; provide a runtime check at least.

Test Plan: Took some actions which caused feed stories to publish, verified they showed up.

Reviewers: vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3792
2012-10-22 17:18:15 -07:00
epriestley
90ccfe4da1 Clean up and expose filtered recipient lists for PhabricatorMetaMTAMail
Summary: Provide a public interface to get all the filtered recipients of an email. The intent is to pass this along to Notifications so it can mark notifications as read if the user is also receiving an email, possibly based on some preference (see T1403). This also simplifies the enormous sendNow() method a little bit.

Test Plan: Added unit tests, and sent a few mails that should cover most/all of these cases. They appeared to produce the correct recipients.

Reviewers: btrahan, vrana, nh

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1403

Differential Revision: https://secure.phabricator.com/D3778
2012-10-22 16:25:43 -07:00
epriestley
c679b78270 Fix some Editor issues
Summary: The property is called 'actor', not 'user'. Extend from Phobject to catch this class of error automatically. Upgrade a couple of getActor() to requireActor().

Test Plan: Created new users.

Reviewers: btrahan, vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3776
2012-10-22 16:25:31 -07:00
epriestley
cef6605b75 Add a generateNewTestUser() method to PhabricatorTestCase
Summary: I need this shortly and it seems like something we're likely to need more of in the future now that fixtures work.

Test Plan: Ran unit tests. Used this productively in an upcoming diff.

Reviewers: btrahan, vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3775
2012-10-22 16:25:00 -07:00
epriestley
c0b9b6db54 Don't count "\r" or "\n" for purposes of linewrapping text in Differential
Summary: This should all go away at some point when we move to fluid layout, but don't be more annoying than necessary in the meantime.

Test Plan: Meta.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3788
2012-10-22 16:24:22 -07:00
vrana
89b9d56cbe Unlink Q1 - Q4
Summary:
Q1 to Q4 is used for parts of the year.

Also unlink all `[A-Z]0.*`, we don't route them anymore.

Test Plan:
Q0
Q1
Q10

Reviewers: epriestley, pieter

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3781
2012-10-22 13:00:16 -07:00