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

5360 commits

Author SHA1 Message Date
epriestley
b91508c045 Fix a second minor merge issue
Auditors: chad, btrahan
2013-09-10 15:42:37 -07:00
epriestley
a4c076ac79 Fix a minor merge issue with a class rename
Auditors: chad, btrahan
2013-09-10 15:41:39 -07:00
epriestley
a8171889bd Add "IDs" and "Priority" to pro search
Summary: Ref T2625. Restore these, too.

Test Plan: Executed queries using these fields.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2625

Differential Revision: https://secure.phabricator.com/D6937
2013-09-10 15:34:13 -07:00
epriestley
f386099735 Add support for "status" and "order" to pro search
Summary: Ref T2625. Further expands the "pro" search.

Test Plan: Used new options to query tasks.

Reviewers: btrahan, garoevans

Reviewed By: garoevans

CC: aran

Maniphest Tasks: T2625

Differential Revision: https://secure.phabricator.com/D6935
2013-09-10 15:34:11 -07:00
epriestley
8c9d61bedc Add "assigned" and "authors" to Maniphest pro search
Summary: Ref T2625. Moves this a step toward being able to replace the current search.

Test Plan: Used search interface.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2625

Differential Revision: https://secure.phabricator.com/D6934
2013-09-10 15:34:10 -07:00
epriestley
e814291526 Introduce ManiphestTaskSearchEngine plus ManiphestTaskListControllerPro
Summary:
Ref T603. Ref T2625. Cutting this over is tricky because of Maniphest's existing saved queries. Plan here is:

  - Build out the "pro" controller at `/maniphest/query/`.
  - Once it's at parity, migrate custom queries.
  - Nuke the old UI.

This provides a minimal implementation with no filter support.

Test Plan: Looked at `/maniphest/query/`, saw results technically available.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T603, T2625

Differential Revision: https://secure.phabricator.com/D6933
2013-09-10 15:34:08 -07:00
epriestley
1f86c73428 Simplify policy filtering for projects and ObjectQuery
Summary:
Ref T603. Moves to detangle and optimize how we apply policies to filtering objects. Notably:

  - Add a short circuit for omnipotent users.
  - When performing project filtering, do a stricter check for user membership. We don't actually care if the user can see the project or not according to other policy constraints, and checking if they can may be complicated.
  - When performing project filtering, do a local check to see if we're filtering the project itself. This is a common case (a project editable by members of itself, for example) and we can skip queries when it is satisfied.
  - Don't perform policy filtering in ObjectQuery. All the data it aggregates is already filtered correctly.
  - Clean up a little bit of stuff in Feed.

Test Plan: Pages like the Maniphest task list and Project profile pages now issue dramatically fewer queries.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D6931
2013-09-10 15:34:07 -07:00
epriestley
1e42c62b8f Make ManiphestTaskQuery a (mostly) policy-aware query
Summary: Ref T603.

Test Plan: Viewed home and maniphest, fiddled all the knobs.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D6930
2013-09-10 15:34:06 -07:00
epriestley
a2571de575 Remove obsolete/deprecated withTaskIDs() / withTaskPHIDs()
Summary: Ref T603. These were deprecated some time ago in favor of the more standard withIDs() / withPHIDs().

Test Plan: `grep`, loaded some interfaces.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D6929
2013-09-10 15:34:04 -07:00
epriestley
e625c91867 Pass viewer to all ManiphestTaskQuery objects
Summary: Ref T603. Prepare for conversion to a policy-aware query.

Test Plan: Browsed various interfaces which use this stuff.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D6928
2013-09-10 15:34:03 -07:00
epriestley
5651141520 Make Maniphest custom fields extend PhabricatorCustomField
Summary:
Ref T418. These implementations share no method names, so we can safely just move Maniphest fields into the `PhabricatorCustomField` hierarchy.

Replaces two Maniphest-specific custom field exceptions which nothing catches.

Test Plan: Viewed Maniphest, edited/altered custom fields.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T418

Differential Revision: https://secure.phabricator.com/D6927
2013-09-10 15:31:48 -07:00
epriestley
e8126fa958 Don't mangle inline comments with tables in them in Differential
Summary:
Fixes T3814. Broadly, remarkup tables in inline comments did not work properly. I ran into several messes here and cleaned up some of them:

  - Some of this code is doing `JX.$N('div', {}, JX.$H(response.markup))`, to turn an HTML response into a node, passing that around, and then doing junk with it. This is super old and gross.
    - The slightly more modern pattern is `JX.$H(response.markup).getFragment().firstChild`, but this is kind of yuck too and not as safe as it could be.
    - Introduce `JX.$H(response.markup).getNode()`, which actually expresses intent here. We have a bunch of `getFragment().firstChild` callsites which should switch to this, but I didn't clean those up yet because I don't want to test them all.
    - Switch the `JX.$N('div', {}, JX.$H(response.markup))`-style callsites to `JX.$H(response.markup).getNode()`.
  - `copyRows()` is too aggressive in finding `<tr />` tags. This actually causes the bug in T3814. We only want to find these tags at top level, not all tags. Don't copy `<tr />` tags which belong to some deeper table.
  - Once this is fixed, there's another bug with mousing over the cells in tables in inline comments. We select the nearest `<td />`, but that's the cell in the remarkup table. Instead, select the correct `<td />`.
  - At this point, these last two callsites were looking ugly. I provided `findAbove()` to clean them up.

Test Plan: Created, edited, deleted, moused over, and reloaded a revision with inline comments including remarkup tables. Used "Show more context" links.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3814

Differential Revision: https://secure.phabricator.com/D6924
2013-09-10 15:31:32 -07:00
epriestley
51eb8a301a Clean up Diffusion repository list
Summary: Simplify rendering of the repository list. For inactive repositories, mark them disabled.

Test Plan: {F57615}

Reviewers: btrahan, rockybean

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6921
2013-09-10 15:29:46 -07:00
epriestley
c74ebf9ce0 Restore repository shortcuts, for now
Summary:
These need to die soon since they're not structurally policy-aware, but keep them around for the moment until we can replace them.

There is no UI to create these, and only Facebook has them.

Test Plan: {F57614}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6920
2013-09-10 15:29:42 -07:00
epriestley
0da6321b2c Provide ordering options in Diffusion application search
Summary: Fixes T2298. Allows repositories to be ordered by name, callsign, commit, or date created. Slightly messy because of cursor paging.

Test Plan: Sorted commits.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2298

Differential Revision: https://secure.phabricator.com/D6919
2013-09-10 15:29:37 -07:00
epriestley
9872d57f87 Allow Diffusion repostories to be filtered by active/inactive status
Summary: Adds a status filter and makes the default query "active" repositories.

Test Plan: Used new filter to execute queries.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6918
2013-09-10 15:26:23 -07:00
epriestley
904add9f44 Use ApplicationSearch in Diffusion
Summary:
Ref T2625. Switches Diffusion to ApplicationSearch. Notes:

  - Rendering is a bit rough, I'll clean that up next.
  - Ordering is a bit arbitrary, also coming shortly.

Test Plan: Used `/diffusion/` to execute various searches.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2625

Differential Revision: https://secure.phabricator.com/D6917
2013-09-10 15:26:08 -07:00
epriestley
b4728104f8 Rename DiffusionHomeController to DiffusionRepositoryListController
Summary: Improves consistency across applications.

Test Plan: Loaded `/diffusion/`.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6916
2013-09-10 15:24:44 -07:00
epriestley
19eeafa303 Remove lint message counts from Diffusion repository list
Summary: We should bring these back some day, but they should be denormalized, inside the query, and there should be a better pipeline to build them in the first place. Just get rid of them for now; this essentially impacts only us.

Test Plan: Loaded `/diffusion/`, same page minus lint counts.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, vrana

Differential Revision: https://secure.phabricator.com/D6915
2013-09-10 15:24:28 -07:00
epriestley
93c6704059 Move "most recent commit" and "commit count" into DiffusionRepositoryQuery
Summary: Ref T2625. `DiffusionHomeController` currently runs these queries inline. Move them into `DiffusionRepositoryQuery`. Prepareds for ApplicationSearch.

Test Plan: Loaded `/diffusion/`, saw the same content as before.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2625

Differential Revision: https://secure.phabricator.com/D6914
2013-09-10 15:22:41 -07:00
epriestley
8e45b466da Improve voicing in text published to JIRA issues
Summary:
Ref T3687. JIRA is able to piggyback on a fair amount of Asana infrastructure, but the voicing we use on Asana tasks (which are always about one object) isn't very good for JIRA issues (which may have many linked objects). Specifically, we publish stories like this to Asana:

  alincoln accepted this revision.

This is meaningless in JIRA since you have no idea what it's talking about. Instead, publish like this:

  alincoln accepted D999: Put a bird on it

Additionally, supplement it with a URI, so the total story text we publish is:

  alincoln accepted D999: Put a bird on it

  https://phabricator.whitehouse.gov/D999

Signifcantly less useless!

Test Plan: {F57523} {F57524}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3687

Differential Revision: https://secure.phabricator.com/D6907
2013-09-10 15:22:24 -07:00
epriestley
3a28f86a6e Refactor shared code between JIRA + Asana publishers into a base class
Summary:
Ref T3687. See some discussion in D6892. The JIRA doorkeeper publisher shares a reasonable amount of code with the Asana publisher. Remedy this:

  - Create `DoorkeeperFeedWorker`, where shared functionality lives (mostly related to building story context objects).
  - Push responsibility for enabling/disabling a worker into this new layer, via `isEnabled()`. This allows `FeedPublisherWorker` to dynamically find and schedule doorkeeper publishers, so third parties can add additional doorkeeper publishers.
  - Some general cleanup/documentation.

Test Plan: Used `bin/feed republish` to republish stories about objects with JIRA and Asana links. Verified that doorkeeper publishers activated properly, made calls, and published events into the remote systems.

Reviewers: btrahan, akopanev22

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3687

Differential Revision: https://secure.phabricator.com/D6906
2013-09-10 15:22:01 -07:00
Chad Little
c5298004ce Color atom-class-name
Summary: Making these purple.

Test Plan: Reload a few class pages, looks nice.

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6938
2013-09-10 14:43:42 -07:00
Bob Trahan
11fd4c60f2 Phortune - fix fatal from initial load
Summary: the attachX upgrade means we need to blank this out formally when creating a new object. Fixes https://github.com/facebook/phabricator/issues/383

Test Plan: loaded phortune for the first time - no fatal and it worked!

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6939
2013-09-10 14:39:40 -07:00
Chad Little
93f735ed2f Diviner Book Index styles
Summary: Slightly more readable, less space than current index. LMK if you hate it though.

Test Plan: Look at user and dev book indexes.

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6932
2013-09-10 09:39:50 -07:00
Chad Little
ab1f8fa7a4 Diviner CSS, layout updates
Summary: Moves book view to use PHUIDocument, fix some other spacing issues.

Test Plan: Review a number of pages in Diviner.

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6925
2013-09-10 07:26:00 -07:00
Chad Little
3fcd8429f5 Merge branch 'master' of github.com:facebook/phabricator 2013-09-10 07:25:32 -07:00
Chad Little
b4424ec53a Update look of Diviner docs index 2013-09-09 15:13:39 -07:00
Eric Stern
16895e1099 Add "diffusion.createcomment" conduit endpoint
Summary:
Adds most of Diffusion's commenting options available in the web UI

Mark method as deprecated immediately per @epriestley's request

Test Plan:
Used the Conduit web console to check:
* Lookup by PHID works
* Error is raised if commit by PHID is not found
* "action" validation works and raises appropriate error
* "message" raises error if empty
* Actions to raise concern or accept commit work
* Method is marked as deprecated from the start

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6923
2013-09-09 14:25:18 -07:00
Chad Little
5ba20b8924 Move PhabricatorObjectItem to PHUIObjectItem, add 'plain' setting for lists.
Summary: Adds plain support for object lists that just look like lists

Test Plan: review UIexamples and a number of other applications

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6922
2013-09-09 14:14:34 -07:00
epriestley
d1225e782b Don't try to load user profile images in PhabricatorPeopleQuery if no users have any
Summary:
Fixes T3810. In PhabricatorPeopleQuery, we issue an unnecessary query like this:

  SELECT f.* FROM file f WHERE (f.phid IN ('')) ORDER BY f.id DESC

...if we're loading a user without a profile picture. Filter the file PHIDs before loading them to prevent this.

This doesn't change anything, but saves us a spurious/silly query.

Also makes `PhabricatorPeopleProfileController` use `needProfileImage()`, moving us closer to getting rid of `loadProfileImageURI()` eventually.

Test Plan: Looked at profiles of users with and without profile pictures. Checked query log in DarkConsole.

Reviewers: chad, btrahan

Reviewed By: chad

CC: aran

Maniphest Tasks: T3810

Differential Revision: https://secure.phabricator.com/D6913
2013-09-08 09:43:27 -07:00
epriestley
194245ed62 Clean up some more Diviner stuff
Summary:
Ref T988.

  - Render "Implements:" as tags, too.
  - Minor CSS tweak to tags in property lists.
  - Add a bunch of group patterns to the Phabricator book.
  - Fix some stuff with how hashes are computed and cached.
  - Minor tweak to reuse the Diviner engine for slightly improved performance.

Test Plan: Regenerated and looked at documentation.

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T3811, T988

Differential Revision: https://secure.phabricator.com/D6912
2013-09-08 09:16:55 -07:00
epriestley
f1dc56a687 Muck around with Diviner method documentation display
Summary:
Ref T988. Not sure about this, feel free to push back or tweak it or whatever, but I want to reduce the amount of meta-text in the method documentation. Primarily this:

  - Shortens "From parent implementation in ClassName:" to "ClassName".
  - Tries to tweak the styles a bit so that it's relatively obvious what that means (hopefully?).
  - Fixes an issue with tasks where some methods could be ignored.

Test Plan: {F57565}

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T988

Differential Revision: https://secure.phabricator.com/D6911
2013-09-08 09:15:22 -07:00
epriestley
0c95c6c4b8 Use tags/links to show extended classes in Diviner, and fix a minor empty state thing
Summary: Ref T988. Show "Extends:" as linked tags. Fix the style of "This <top-level thing, like a class or function>" is not documented so it's the same as "This method is not documented.".

Test Plan:
Tags thing before:

{F57557}

Tags thing after:

{F57558}

Undoc before:

{F57559}

Undoc after:

{F57560}

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T988

Differential Revision: https://secure.phabricator.com/D6910
2013-09-08 09:13:46 -07:00
epriestley
c280634a7a Link and summarize methods in the "Tasks" view of a Diviner class
Summary: Ref T988. Make this more useful, and link it to the methods it describes.

Test Plan:
Before:

{F57553}

After:

{F57554}

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T988

Differential Revision: https://secure.phabricator.com/D6909
2013-09-08 09:12:33 -07:00
epriestley
2367b64229 Render Diviner atom signatures on one line
Summary:
Ref T988. Instead of rendering this:

  ClassName
  final class ClassName

  methodName
  final public function methodName(...)

...just render this:

  final class ClassName

  final public function methodName(...)

Also link and anchor the method names.

Test Plan:
Before:

{F57536}
{F57537}

After:

{F57538}
{F57539}

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T988

Differential Revision: https://secure.phabricator.com/D6908
2013-09-08 09:11:59 -07:00
Chad Little
4cc40933c4 Color consolidation
Summary: Another pass at consolidating colors

Test Plan: Test various pages and UI elements

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6905
2013-09-07 09:13:55 -07:00
Chad Little
d06788c1e5 Move Workboards to PHUI
Summary: This is just renaming to PHUI (I like shorter text :)

Test Plan: reload workboard examples page, seems to not fatal and looks very appealing

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6904
2013-09-06 14:06:12 -07:00
epriestley
b4d9a8d547 Add a "before" parameter to feed.query
Summary: See IRC. We already have "after", add the corresponding "before". This makes polling for updates much easier.

Test Plan: Ran queries with "before" and "after".

Reviewers: chad, btrahan

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D6903
2013-09-06 10:45:08 -07:00
Chad Little
78cbfc3a02 Fix extra divs in PHUIBoxView
Summary: This moves the outer classes to the outmost div

Test Plan: Reviewed a few PHUIBox pages

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6902
2013-09-06 10:42:44 -07:00
Guy Warner
03783c4f63 Alert user that projects/ is protected in Phriction
Summary: Fixes T3447 - adds check if slug is projects/ alerts user

Test Plan: Create new doc in Phriction. Type projects/whatever and get error

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Maniphest Tasks: T3447

Differential Revision: https://secure.phabricator.com/D6901
2013-09-06 10:42:02 -07:00
epriestley
95dc69a30e Fix "Show All Changes" button in Diffusion
Summary: See IRC. We currently render a "show all changes" button for commits which have more than 100 but fewer than 1000 changes, but it doesn't actually do anything. Make it do what it's supposed to.

Test Plan: Set the limit to 2; clicked the button.

Reviewers: chad, staticshock, btrahan

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D6900
2013-09-06 10:05:24 -07:00
epriestley
a40861e5c6 Publish Doorkeeper object stories to JIRA
Summary:
Ref T3687. Publish stories into JIRA.

These need some voicing fixes, which maybe involves straightening out the feed code. For example, they're voiced in-context ("updated this revision") when they should be voiced out-of-context ("updated D123").

Generally, this is similar to the Asana stuff but a lot simpler since we don't need to do any state management.

Test Plan: {F57366}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3687

Differential Revision: https://secure.phabricator.com/D6892
2013-09-05 16:51:20 -07:00
epriestley
470bb4931b Fix a warning in the JIRA field
Summary: Ref T3687. The `value` property may be `null`.

Test Plan: Loaded a revision with the JIRA field enabled but no issues attached, no longer saw a warning about a bad argument to `foreach()`.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3687

Differential Revision: https://secure.phabricator.com/D6890
2013-09-05 16:51:13 -07:00
Bob Trahan
228496cdbe File - add transactions and editor
Summary: this ends up being a little weird since you can't actually edit files. Also, since we create files all sorts of ways, sometimes without even having a user, we don't  bother logging transactions for those events. Fixes T3651. Turns out this work is important for T3612, which is a priority of mine to help get Pholio out the door.

Test Plan: left a comment on a file. it worked! use bin/mail to verify mail content looked correct.

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran, wez

Maniphest Tasks: T3651, T3612

Differential Revision: https://secure.phabricator.com/D6789
2013-09-05 13:11:02 -07:00
Chad Little
4b061a766a More Diviner style updates
Summary: This adds a number of new styles for Diviner documentation. Not sure I've covered all the bases or wrote this in the most efficient manner, but passing it along now for early review before tightening everything up.

Test Plan: Review various class pages.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6888
2013-09-05 12:29:07 -07:00
epriestley
a3d4f4c457 Fix an issue with darkconsole.always-on and logged-out users
Summary:
Fixes T3796. When this got split out into tabs, the data endpoints were accidentally locked down. Open them up again if the setting is on.

Also, when you open/close the console we try to save the preference. Just no-op if you're logged out. Previously, you'd see the requests in DarkConsole since they failed.

Test Plan: Enabled `darkconsole.always-on` and toggled the console on and off as a logged-out user. Disabled the preference and verified it was no longer accessible.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3796

Differential Revision: https://secure.phabricator.com/D6886
2013-09-05 11:16:32 -07:00
Guy Warner
fc82e81fe2 Add isExplicitUpload to true on macro uploads
Summary: Fixes T3798. Macros now show up as manually uploaded

Test Plan: Upload a macro, go to file, new macro is visiable

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Maniphest Tasks: T3798

Differential Revision: https://secure.phabricator.com/D6887
2013-09-05 10:22:07 -07:00
epriestley
0ae7335316 Add missing (int) casts to Herald rule editing
Summary: Fixes T3792. These raise errors if the database is in strict mode and you try to create an "any" rule.

Test Plan: Created a rule with "any".

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T3792

Differential Revision: https://secure.phabricator.com/D6883
2013-09-04 12:07:26 -07:00
Chad Little
589f1c7696 Diviner CSS tweaks
Summary: Update Diviner table layouts, make it purty.

Test Plan: test many diviner pages

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6880
2013-09-04 11:50:57 -07:00
epriestley
4252c93c8a Remove block of commented-out code
Summary: I left a clamp in the patient.

Test Plan: derp-a-derpderp

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D6882
2013-09-04 11:02:12 -07:00
Andrew Gallagher
8bba3f280d Only associate branch with task if maniphest is enabled
Summary:
Previously, maniphest tasks would get upated by diffs on branches
with tasky names, even if maniphest was disabled.

Test Plan:
Tested createing a diff in sandbox with maniphest disabled, on a
git branch named using the format "t###".  Without this change,
if there happened to be a task in the maniphest DB which matched,
it was updated an email was sent to users.

Reviewers: epriestley

Reviewed By: epriestley

CC: wez, slawekbiel, whhone, Korvin, aran

Differential Revision: https://secure.phabricator.com/D6881
2013-09-03 18:22:01 -07:00
epriestley
853544b54a Add "JIRA Issues" field to Differential
Summary:
Ref T3687. This adds a field which allows you to link Differential Revisions to JIRA issues.

This is just about as basic as it can get, but gets the job done. The field enables itself if you have a JIRA auth provide. You enter JIRA issues in a comma-delimited format and it generates appropriate edges.

Nothing is pushed to the issues yet.

The only real rough part here is that if you commandeer a revision which is linked to issues you can't see, editing it is difficult via the CLI. This seems pretty much like a non-issue, but at some point we can let the field throw some kind of "RecoverableInvalidFieldException" which just warns the user. The "no reviewers, continue anyway?" prompt could then use that too.

Test Plan:
  - Edited via web UI, tried valid/invalid edits, checked that edges showed up in the database, added/removed issues, clicked issue links.
  - Edited via CLI, tried valid/invalid edits.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3687

Differential Revision: https://secure.phabricator.com/D6879
2013-09-03 17:27:51 -07:00
epriestley
825fb9c85a Add JIRA doorkeeper and remarkup support
Summary:
Ref T3687. Adds a Doorkeeper bridge for JIRA issues, plus remarkup support. In particular:

  - The Asana and JIRA remarkup rules shared most of their implementation, so I refactored what I could into a base class.
  - Actual bridge implementation is straightforward and similar to Asana, although probably not similar enough to really justify refactoring.

Test Plan:
  - When logged in as a JIRA-connected user, pasted a JIRA issue link and saw it enriched at rendering time.
  - Logged in and out with JIRA.
  - Tested an Asana link, too (seems I haven't broken anything).

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3687

Differential Revision: https://secure.phabricator.com/D6878
2013-09-03 17:27:38 -07:00
epriestley
e5b4ce5525 Reduce the amount of OAuth1/OAuth2 code duplication for rendering login buttons
Summary: Ref T3687. These buttons don't work quite the same way, but are similar enough that the code seems worth consolidating.

Test Plan: Viewed and clicked both OAuth1 (Twitter, JIRA) and OAuth2 (Facebook) login buttons. Got logins.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3687

Differential Revision: https://secure.phabricator.com/D6874
2013-09-03 10:30:53 -07:00
epriestley
25eb401e18 Handle user aborts during auth workflows in Phabricator
Summary: Depends on D6872. Ref T3687. Give the user a nice dialog instead of a bare exception.

Test Plan: Cancelled out of Twitter and JIRA workflows. We should probably do this for the OAuth2 workflows too, but they're a bit of a pain to de-auth and I am lazy.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3687

Differential Revision: https://secure.phabricator.com/D6873
2013-09-03 10:30:39 -07:00
Chad Little
6e63adaf54 Standard colors on config-tables
Summary: Moving standard colors in some new places, going well so far.

Test Plan: reload page

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6876
2013-09-03 10:18:43 -07:00
Chad Little
4bb920f396 Tighten up ObjectItemList icons
Summary: Pulls the icon flush right in the objectlistview.

Test Plan: Review my stale diffs, and UIExamples page.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6875
2013-09-03 08:24:41 -07:00
Chad Little
7d8367a552 Color tweaks for action list, headers
Summary: Starting to roll out the standard colors and spacing to action list, headers, and property views. Also softened the grey borders a hex.

Test Plan: Review Maniphest and Differential on desktop and mobile. Felt the flow of standardization waft over me.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6869
2013-09-03 07:00:06 -07:00
Gareth Evans
fcba0c74d9 Replace all "attach first..." exceptions with assertAttached()
Summary:
Ref T3599
Go through everything, grep a bit, replace some bits.

Test Plan: Navigate around a bit

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Maniphest Tasks: T3599

Differential Revision: https://secure.phabricator.com/D6871
2013-09-03 06:02:14 -07:00
epriestley
4e12a375f3 Add JIRA as an authentication provider
Summary:
Ref T3687. Depends on D6867. This allows login/registration through JIRA.

The notable difference between this and other providers is that we need to do configuration in two stages, since we need to generate and save a public/private keypair before we can give the user configuration instructions, which takes several seconds and can't change once we've told them to do it.

To this effect, the edit form renders two separate stages, a "setup" stage and a "configure" stage. In the setup stage the user identifies the install and provides the URL. They hit save, we generate a keypair, and take them to the configure stage. In the configure stage, they're walked through setting up all the keys. This ends up feeling a touch rough, but overall pretty reasonable, and we haven't lost much generality.

Test Plan: {F57059}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3687

Differential Revision: https://secure.phabricator.com/D6868
2013-09-03 05:53:21 -07:00
epriestley
25e43e872b Add Twitter as an authentication provider
Summary: Ref T3687. Depends on D6864. Implements the `OAuth1` provider in Phabricator (which is mostly similar to the OAuth2 provider, but doesn't share quite enough code to actually extend a common base class, I think) and Twitter as a concrete subclass.

Test Plan:
Created a Twitter provider. Registered, logged in, linked, refreshed account link.

{F57054}

{F57056}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3687

Differential Revision: https://secure.phabricator.com/D6865
2013-09-03 05:53:08 -07:00
Chad Little
63d2b11cab More grey text updates
Summary: More grey tweaks, breaking these up so I can test and tweak each as needed.

Test Plan: Review pages.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6866
2013-09-02 13:57:48 -07:00
Bob Trahan
83e0380046 Maniphest - fix fatal in custom query for users with no projects
Summary: See https://github.com/facebook/phabricator/issues/380 for report.

Test Plan: Maniphest -> Custom Query -> Put user with no project in "Any User Projects" field -> Search : observe no fatal

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6862
2013-09-02 13:24:41 -07:00
Aviv Eyal
cf13885736 User preference for time format
Summary: Also, don't try to load prefs for non-users.

Test Plan: toggle, save, look at something with a time. arc unit.

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6796
2013-09-02 12:55:11 -07:00
Chad Little
35b209c464 Fix spacing, color in Conpherence Pontificate button
Summary: Spacing got broken during forms update.

Test Plan: View Conpherence

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6863
2013-09-02 12:51:21 -07:00
epriestley
b7f6956ec9 Allow Diviner groups to be configured in .book files
Summary:
Ref T988. Currently, every class/function needs to be annotated with `@group`, but 99% of this data can be inferred from file structure, at least in this project. Allow group specifications like:

  "paste" : {
    "name" : "Paste",
    "include" : "(^src/applications/paste/)"
  }

..to automatically put everything defined there in the "paste" group. A list of regexps is also supported. Depends on D6855.

Test Plan: Regenerated documentation with `bin/diviner generate --book src/docs/book/phabricator.book --clean`, observed all Paste stuff go in the paste group.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T988

Differential Revision: https://secure.phabricator.com/D6856
2013-09-02 11:33:02 -07:00
Chad Little
fef3e074d8 Move #888 and #999 to $lightgreytext
Summary: Moves lighter grey text to a common color.

Test Plan: sandbox, review diff

Reviewers: epriestley, btrahan, mutech.aka

Reviewed By: mutech.aka

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6859
2013-09-02 08:12:18 -07:00
Chad Little
dd995984eb UIColor Blues and common color integration
Summary: This adds standard 'blues' and start integration of standard colors for text, backgrounds, and borders.

Test Plan: sb

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6857
2013-09-02 08:10:47 -07:00
Chad Little
921bc32928 Move #666 to $greytext in UIColor
Summary: Split some of these up for safe regexes.

Test Plan: reload celerity

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6858
2013-09-02 08:08:54 -07:00
epriestley
eb3690f8c6 Add "Authored" as a default filter to Differential
Summary: Fixes T3786. Not 100% sold on this (I don't want to restore all of the original filters, since users can and should just build the weird ones if they use them), but this is almost certainly the most useful of the defaults which ApplicationSearch removed.

Test Plan: Viewed `/differential/`, executed the query.

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T3786

Differential Revision: https://secure.phabricator.com/D6860
2013-09-01 19:15:52 -07:00
Chad Little
fb7c7de519 Add Base Grey set of colors
Summary: This adds a set of standard grey colors for use in shading objects and importance. I'll follow up and start implementing in another diff.

Test Plan: Color UI Examples, Adobe Kuler

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6853
2013-08-30 14:40:46 -07:00
epriestley
480a17f6e0 Restore white background to Paste
Summary: I think we lost this recently (maybe with the line highlighting change), but it's more readable if we put these on a white background.

Test Plan: Looked at a Paste (like `/P123`), saw white background.

Reviewers: chad, btrahan, asherkin

Reviewed By: asherkin

CC: aran

Differential Revision: https://secure.phabricator.com/D6852
2013-08-30 09:29:31 -07:00
epriestley
1b6f71dec1 In Diviner, parse "abstract" and "final" in PHP classes, interfaces and methods
Summary: Ref T988. Adds support for the "abstract" and "final" keywords in the atomizer.

Test Plan: Looked at abstract/final stuff.

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T988

Differential Revision: https://secure.phabricator.com/D6850
2013-08-30 09:19:18 -07:00
epriestley
bf50e0f870 Compose and display method information in Diviner
Summary:
Ref T988. As mentioned elsewhere, one broad goal of this iteration is to reduce the amount of boilerplate documentation we need to write. For example:

  - I want to set `@group` by default in most cases.
  - I want to inherit things like `@param` and `@return` by default.
  - I want to inherit method documentation by default.
  - I want to inherit `@task` information.

This implements most of the method inheritance stuff.

This //looks// super gross, but I believe we now compose all of the information of interest at display time and can work on rendering it sensibly in the near future.

Test Plan: {F56790}

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran, sascha-egerer

Maniphest Tasks: T988

Differential Revision: https://secure.phabricator.com/D6849
2013-08-30 09:17:27 -07:00
epriestley
cf0bf34255 Allow MetaMTA adapters to indicate that a mail is permanently undeliverable
Summary: Currently, adapters can only fail mail temporarily. Allow them to indicate a permanent failure by throwing a special exception.

Test Plan: Added and ran unit tests.

Reviewers: wez, btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6847
2013-08-30 08:21:50 -07:00
Wez Furlong
11f1268e99 don't throw BadMethodCallException on diffs that add images
Summary:
I don't know if there is something more sinister going on
under the covers, but we have a couple of diffs that trigger:

Unhandled Exception ("BadMethodCallException")
Call to a member function getMetadata() on a non-object

when the diff page is handling its async render calls.  One diff
in particular has multiple image adds and thus has a stack of of these
error dialogs to close.

This isn't a new regression, we just haven't gotten around to debugging
it until now (reported on 6/12)

One revision that triggers it has two diffs.  If I show Base -> Diff 1
I don't hit the error.  When I select Base -> Diff 2, or Diff 1 -> Diff
2, the error triggers.

I don't understand what this means, but this diff avoids the null object
reference that causes the exception.

Test Plan:
Load the offending diff, don't hit the error. The diff loads
the images that were added

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6851
2013-08-30 08:15:10 -07:00
epriestley
34356c7154 Fix outdated link to MetaMTA web UI in MetaMTA tasks
Summary: Missed this when moving most MetaMTA responsibilities to the CLI. Show the correct command to get data rather than linking to a 404.

Test Plan: {F56733}

Reviewers: wez, btrahan, chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D6846
2013-08-29 17:37:17 -07:00
epriestley
b932c606cb Implement "Add to CC" rule for Audits
Summary:
D6660 accidentally allowed you to build Herald rules for commits that take action "Add to CC", but provided no implementation.

Someone at Facebook then wrote such a rule.

Fix forward since there's no real reason not to allow this.

Test Plan: Used `./scripts/repository/reparse.php --herald rXnnnn` to trigger rules. Observed rule trigger and subsequent subscription.

Reviewers: wez, btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6845
2013-08-29 17:03:40 -07:00
epriestley
b16d5b9ba4 Fix one more rule with remarkup fullscreen mode
Fixes T3782. After D6844, the menu bar would still float on top of this.

Auditors: chad
2013-08-29 16:03:13 -07:00
epriestley
2b6271d02c Remove "Chaos" mode and fix fullscreen in Conpherence
Summary:
Fixes T3782. Two changes:

  - Remove the "Chaos" mode, which wasn't as funny as I'd hoped and has had a good run.
  - Fix "Order" (now "Fullscreen") mode in Conpherence. Best fix I could come up with is dropping the "position: fixed" on all parents while in the mode.

Test Plan: Used Fullscreen mode in Conpherence in Chrome.

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T3782

Differential Revision: https://secure.phabricator.com/D6844
2013-08-29 15:59:15 -07:00
epriestley
63dbccb8a1 Fix default order for Differential queries
Summary:
Fixes T3781. The UI defaults to "Created" but the query defaults to "Modified". Make the two consistent.

In particular, an issue this fixes is that previously a `/differential/?authors=duck` page would show "Order: Created" but actually order by "Modified".

Test Plan: Visited `/differential/?authors=duck` and verified the revisions were ordered by creation date.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3781

Differential Revision: https://secure.phabricator.com/D6843
2013-08-29 15:07:30 -07:00
epriestley
eb32b5c812 Show host information on setup issue screen
Summary: Ref T3780. Facebook has some environmental / itermittent stuff which would be easier to debug with host information on the setup issue screen.

Test Plan:
Checked both in-chrome and out-of-chrome versions of this screen, both looked reasonable.

{F56694}

Reviewers: wez, btrahan

Reviewed By: btrahan

CC: chad, aran

Maniphest Tasks: T3780

Differential Revision: https://secure.phabricator.com/D6842
2013-08-29 14:22:05 -07:00
epriestley
f1c75a6382 Allow construction of ApplicationSearch queries with GET
Summary:
Ref T3775 (discussion here). Ref T2625.

T3775 presents two problems:

  # Existing tools which linked to `/differential/active/epriestley/` (that is, put a username in the URL) can't generate search links now.
  # Humans can't edit the URL anymore, either.

I think (1) is an actual issue, and this fixes it. I think (2) is pretty fluff, and this doesn't really try to fix it, although it probably improves it.

The fix for (1) is:

  - Provide a helper to read a parameter containing either a list of user PHIDs or a list of usernames, so `/?users[]=PHID-USER-xyz` (from a tokenizer) and `/?users=alincoln,htaft` (from an external program) are equivalent inputs.
  - Rename all the form parameters to be more digestable (`authorPHIDs` -> `authors`). Almost all of them were in this form already anyway. This just gives us `?users=alincoln` instead of `userPHIDs=alincoln`.
  - Inside ApplicationSearch, if a request has no query associated with it but does have query parameters, build a query from the request instead of issuing the user's default query. Basically, this means that `/differential/` runs the default query, while `/differential/?users=x` runs a custom query.

Test Plan: {F56612}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2625, T3775

Differential Revision: https://secure.phabricator.com/D6840
2013-08-29 11:52:29 -07:00
epriestley
5a11f08ba4 Use bar colors to show revision status in revision lists
Summary:
Ref T3772. The original version of D5451 had a very colorful version of this which felt a bit arbitrary, and we moved away from it after discussion, particularly [[ https://secure.phabricator.com/D5451#comment-8 | here (chad) ]] and [[ https://secure.phabricator.com/D5451#comment-14 | here (me) ]] and [[ https://secure.phabricator.com/D5451#comment-19 | here (chad again) ]].

The core of my objection was that status and priority to the viewer aren't the same: a "needs revision" revision that you authored is high priority (you need to revise it), but a "needs revision" revision that someone else authored is low priority (you're waiting on them to revise it). If we color by status, revisions in both high priority and low priority states will be colored red. We can instead color by viewer priority (blocking others = red, needs attention = orange, waiting on others = blue; or something), but that would be redundant (we already group by it, so you'd get big chunks of stuff with the same color and color would have no utility), confusing (in ungrouped views, the colors would not be self-explanatory) and weirdly inconsistent (different users would see objects having different colors).

I still think all this holds, but I also thought that "viewer priority" was enormously more important than "state", since I use the former frequently and the latter very rarely. From T3772, it sounds like some users use "state" a lot more than I do (i.e., they want to find "accepted" revisions within a "viewer priority" group like "Action Required"). This is a possible approach to that.

I think another issue was the heavy use of the color in the original; this restores a more conservative version of it which doesn't have as much weight. In particular:

  - Revisions in the "Needs Review" state retain the default color, rather than orange.
  - Revisions in the "Closed" state have the disabled effect.

Test Plan: See screenshot.

Reviewers: chad, btrahan

Reviewed By: chad

CC: aran

Maniphest Tasks: T3772

Differential Revision: https://secure.phabricator.com/D6839
2013-08-29 09:16:51 -07:00
Eric Stern
9a95b1e7d1 add committer as supported field for herald rules
Summary: Allows building Herald rules against committer, similar to author. Useful for monitoring cherry-picked commits.

Test Plan: Applied patch, restarted php-fpm and phd daemons to ensure code changes took effect. Added a new herald rule to trigger audit when committer was me. Cherry-picked someone else's commit (author=them, committer=me) and pushed to origin. Audit was triggered.

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6838
2013-08-29 06:07:53 -07:00
epriestley
d06129b81e Add setEpoch() and onboard staleness to ObjectItemListView
Summary: Fixes T3486. I don't love how this looks -- maybe we could try different icons? Like white icons on a brighter red/yellow background?

Test Plan: {F56299}

Reviewers: chad, btrahan

Reviewed By: chad

CC: aran

Maniphest Tasks: T3486

Differential Revision: https://secure.phabricator.com/D6833
2013-08-28 16:48:42 -07:00
epriestley
9eb36db1d7 Hack-patch for missing highlights in Audit
Summary: When I swapped the views, I accidentally removed some controller -> view -> controller logic which is used to figure out which packages are highlighted. This code is a mess, but fix the feature for now and we can clean it up later.

Test Plan: {F56335}

Reviewers: wez, btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6835
2013-08-28 16:32:40 -07:00
Chad Little
bd729119fc Color time icons
Summary: Color time icons

Test Plan: Photoshop

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6836
2013-08-28 16:06:01 -07:00
epriestley
86455b8591 Allow disabled users to be typeaheaded in Differential
Summary: Fixes T3773. By default, the `/users/` datasource excludes disabled users (since it doesn't make sense to assign them tasks or make them reviewers, for example). However, for ApplicationSearch it does make sense to look for objects, e.g., authored by a disabled user.

Test Plan: Searched for disabled users in Differential.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3773

Differential Revision: https://secure.phabricator.com/D6834
2013-08-28 15:37:53 -07:00
Wez Furlong
7b5471b1ae fix perf regression when using 'owned' query
Summary:
D6335 has some unexpected side effects.  This adds back the
where clause for the owned query.  There may be other problems.

Test Plan:
Ran:

```
echo '{"query":"owned","guids":["myphid"]}' | arc --conduit-uri=https://myhost call-conduit differential.find
```

Reviewers: epriestley, dschleimer

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6832
2013-08-28 13:29:36 -07:00
epriestley
5138bf8bff Restore fields to Releeph from prior to CustomField patch
Summary: See notes / inlines.

Test Plan: See inlines.

Reviewers: wez, btrahan

Reviewed By: btrahan

CC: btrahan, aran

Differential Revision: https://secure.phabricator.com/D6831
2013-08-28 13:06:29 -07:00
Chad Little
55e2efc6fc Update PHUIDocument to use new header gradients
Summary: Adds the new gradient to document views

Test Plan: Tested multiple pages in my sandbox in Phriction, UIExamples.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6827
2013-08-28 10:29:02 -07:00
epriestley
730fe53dfa Move child loading into DivinerAtomQuery and collect/organize more data on class Atoms
Summary:
Ref T988. This is //extremely// rough looking in the UI, but gets most of the information we need into the right places.

The controller rendering code is super rough too, I'm going to break that up shortly.

  - Add `needChildren()` to `DivinerAtomQuery`.
  - Compose and organize class methods when rendering classes. The old Diviner was not smart enough to do this, so a class would only document methods which the class itself implemented, not methods inherited from parents. I'd like to show those too to provide a more complete understanding of how to use a class (but they'll be marked with "inherited" or somesuch). This code walks the "extends" list and builds all of the class methods, annotating them with where they are defined and where they are implemented.
  - Coompose and organize "tasks". The old Diviner was not smart enough to do this, but I want to reduce the amount of duplicate/busy work involved in documenting subclasses. In particular, I want them to inherit "@task" declarations from parents so that class trees are more cohesive. They now do so.

Test Plan: See screenshots.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T988

Differential Revision: https://secure.phabricator.com/D6823
2013-08-28 09:57:20 -07:00
epriestley
536b0867de Reorganize Diviner articles into user/ and tech/
Summary: Ref T988. I'm splitting the Phabricator documentation into two separate documentation books, one less technical and one more technical. Move all the `.diviner` article files around into `src/docs/user/` or `src/docs/tech/`, accordingly. The only actual changes here are a couple of config changes in the `.book` files.

Test Plan: Regenerated user and technical documentation and saw stuff in the right places.

Reviewers: btrahan

Reviewed By: btrahan

CC: chad, aran

Maniphest Tasks: T988

Differential Revision: https://secure.phabricator.com/D6822
2013-08-28 09:57:00 -07:00
epriestley
a96582c788 Standardize rendering of atom type names like "Article" and "Class"
Summary: Ref T988. This was sort of hard-coded in one place and not done properly in another. Do it consistently.

Test Plan: Looked at atom list; looked at atom view. Saw "Article", "Class" rendered correctly.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T988

Differential Revision: https://secure.phabricator.com/D6821
2013-08-28 09:55:05 -07:00
epriestley
a799a05b6c Add source links and a little documentation about Diviner
Summary: Ref T988. Links up the "Declared:" property to point at a repository browser, if one exists.

Test Plan: Viewed a class document, saw a link, clicked it, got the definition.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T988

Differential Revision: https://secure.phabricator.com/D6820
2013-08-28 09:54:54 -07:00
epriestley
41ac06959e Generate some amount of PHP class documentation
Summary:
Ref T988. This brings the class/interface atomizer over. A lot of parts of this are still varying degrees of very-rough, but most of the data ends up in approximatley the right place.

ALSO: PROGRESS BARS

Test Plan: See screenshots.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T988

Differential Revision: https://secure.phabricator.com/D6817
2013-08-28 09:54:39 -07:00
Chad Little
9acddd7722 Update pinboard view
Summary: Updates the pinboard layout with less shadow and more standard border colors.

Test Plan: Reload pinboard

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6829
2013-08-28 08:55:43 -07:00
Chad Little
2ce3c5235b Flatten Object List items and lighten up grey buttons
Summary: Moving towards a flatter, crisper layout with some minor tweaks here. The button styles and object item styles now have consistent colors and depth. Will continue to repeat this pattern and build out a standard 'grey' palette.

Test Plan: Test homepage and maniphest home.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6828
2013-08-28 07:36:22 -07:00
Chad Little
205e66189f Update XHPast forms
Summary: Forms look like others, they do

Test Plan: Page reload, I see

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6826
2013-08-27 09:43:45 -07:00
epriestley
b64b0f9d23 Fix Phriction feed stories text rendering
Summary: Fixes T3763. All this junk needs some actual fixing at some point, but stop it from fataling.

Test Plan: Used `feed.query` with `view=text`. Before this patch, Phriction stories fataled. Now they render reasonably.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3763

Differential Revision: https://secure.phabricator.com/D6819
2013-08-27 09:34:13 -07:00
Chad Little
6f721fb437 Tighten form spacing on checkboxes and radios
Summary: Some longer forms get really long here, this seems easier to read.

Test Plan: Check Flags and admining users.

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6825
2013-08-27 09:08:01 -07:00
Chad Little
4e67102d8f Fix Macro Edit form
Summary: Updated to use formbox

Test Plan: reload edit macro

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6824
2013-08-27 09:05:40 -07:00
epriestley
7ca3f066f4 Generate PHP function documentation in Diviner
Summary:
Ref T988. Various improvements:

  - Generate function documentation, mostly correctly.
  - Raise some warnings about bad documentation.
  - Allow `.book` files to exclude paths from generation.
  - Add a book for technical docs.
  - Exclude "ghosts" from common queries (atoms which used to exist, but no longer do, but which we want to keep the PHIDs around for in case they come back later).

This is a bit rough still, but puts us much closer to being able to get rid of the old Diviner.

Test Plan: See screenshots.

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T988

Differential Revision: https://secure.phabricator.com/D6812
2013-08-27 03:14:00 -07:00
epriestley
caf4a086d4 Add missing $port property
Summary: See rPd27e7c52b21865563bd56f37d5d422515aa40bb7.

Test Plan: eyeballed it

Reviewers: wez

Reviewed By: wez

CC: aran

Differential Revision: https://secure.phabricator.com/D6818
2013-08-26 17:14:57 -07:00
Wez Furlong
ec8162bcfc fix broken DatabaseConfigurationProvider interface
Summary: broken by rPd27e7c52b21865563bd56f37d5d422515aa40bb7

Test Plan: sigh

Reviewers: epriestley, edward, levijackson

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6816
2013-08-26 17:04:56 -07:00
Chad Little
bb9be01d55 Update forms to use PHUIFormBoxView
Summary: Some more callsites, let me know if you see others, I think think is 98% of them now.

Test Plan: tested each page

Reviewers: epriestley, btrahan

Reviewed By: btrahan

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6814
2013-08-26 15:45:58 -07:00
Chad Little
fe2a96e37f Update Form Layouts
Summary:
This attempts some consistency in form layouts. Notably, they all now contain headers and are 16px off the sides and tops of pages. Also updated dialogs to the same look and feel. I think I got 98% of forms with this pass, but it's likely I missed some buried somewhere.

TODO: will take another pass as consolidating these colors and new gradients in another diff.

Test Plan: Played in my sandbox all week. Please play with it too and let me know how they feel.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6806
2013-08-26 11:53:11 -07:00
Bob Trahan
320498d3d0 Transactions - make the details stuff generic and ajaxy
Summary: Fixes T2213

Test Plan: Updated a pholio mock description. Observed that when I first showed details there was a round trip made. Toggled show / hide noting no more trips made to server.

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Maniphest Tasks: T2213

Differential Revision: https://secure.phabricator.com/D6801
2013-08-22 16:45:14 -07:00
epriestley
099695ab61 Fix unacceptably light-hearted string in serious business mode
Summary: A serious business lost a bunch of serious business partners today because of this string, I assume.

Test Plan: Enabled serious mode, clicked button, was relieved to see no jokes.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6799
2013-08-22 15:01:22 -07:00
epriestley
ca6f13d90c Fix Releeph project creation crumb generation
Summary: Ref T3657. We currently try to generate a project crumb on the "Create Project" page, but fail. Paper that over until I can sort out T3657.

Test Plan: Loaded project create page.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3657

Differential Revision: https://secure.phabricator.com/D6793
2013-08-22 14:56:50 -07:00
epriestley
7a24548a3c Provide a history controller for Releeph branches
Summary: Ref T3663. Same as D6785, but for branches. No writes to this table yet.

Test Plan: Clicked "View History", got a blank but non-broken page.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3663

Differential Revision: https://secure.phabricator.com/D6787
2013-08-21 12:32:07 -07:00
epriestley
f034fd80db Remove getApplicationObjectTypeName from ApplicationTransactions
Summary:
We can get this out of PHIDType reasonably in all cases and simplify implementation here.

None of these translate correctly anyway so they're basically debugging/development strings.

Test Plan: `grep`, browsed some transactions

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6786
2013-08-21 12:32:06 -07:00
epriestley
8769759c15 Add a project history controller to Releeph
Summary: Ref T3663. There's no data recorded in this table yet, but add the UI and controller for it. Edits and such will eventually go here.

Test Plan: Clicked "View History" on a project, got an empty but non-broken page.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3663

Differential Revision: https://secure.phabricator.com/D6785
2013-08-21 12:32:05 -07:00
epriestley
596a531ed6 Remove ReleephEvent
Summary:
Ref T3663. This is a proto-transaction record which is obsoleted by real transactions. It has no UI, so I'm not bothering to retain/migrate the data since there's no regression.

Just get rid of it and all its writers. I'm keeping the table for now in case something crazy uses this somehow, so no data is actually destroyed.

Test Plan: `grep`

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3663

Differential Revision: https://secure.phabricator.com/D6784
2013-08-21 12:32:04 -07:00
epriestley
d243c30190 Remove ReleephRequestException
Summary: This has two use sites and no special logic.

Test Plan: `grep`

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6783
2013-08-21 12:32:02 -07:00
epriestley
7b2ab80c66 Replace ReleephFieldSpecificationIncompleteException with the CustomField version
Summary: Ref T3718. Releeph has a custom implementation of this exception; a more general version exists in CustomField. Use the more general one. Nothing catches the specific one.

Test Plan: `grep`

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3718

Differential Revision: https://secure.phabricator.com/D6782
2013-08-21 12:32:01 -07:00
epriestley
686d2f87af Remove ReleephPHIDConstants
Summary: Ref T2715. This isn't used anywhere anymore.

Test Plan: `grep`

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2715

Differential Revision: https://secure.phabricator.com/D6781
2013-08-21 12:32:00 -07:00
epriestley
a91771801d Remove ReleephBranchBoxView
Summary: Ref T3092. This was obsoleted recently and has no more call/use sites.

Test Plan: `grep`

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3092

Differential Revision: https://secure.phabricator.com/D6779
2013-08-21 12:31:52 -07:00
epriestley
49e0aa203c Add storage for Releeph project and branch transactions
Summary: Ref T3663. Does what it says on the tin.

Test Plan: Ran `storage upgrade`.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3663

Differential Revision: https://secure.phabricator.com/D6778
2013-08-21 12:31:51 -07:00
epriestley
973bb0c76e Remove ReleephRequestEvent
Summary: Ref T3663. This is obsolete code which is used only in this migration, which Facebook has already performed and which isn't relevant for any other installs.

Test Plan: `grep`

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3663

Differential Revision: https://secure.phabricator.com/D6777
2013-08-21 12:31:50 -07:00
epriestley
43b35a02ce Use hybrid properties + search for Releeph branches, too
Summary: Ref T3092. Same deal as D6771, but for branches rather than projects.

Test Plan: {F54855}

Reviewers: btrahan, chad

Reviewed By: chad

CC: chad, aran

Maniphest Tasks: T3092

Differential Revision: https://secure.phabricator.com/D6775
2013-08-21 12:31:48 -07:00
epriestley
dcec8e60cc Move edit/deactivate operations onto project view page in Releeph
Summary:
Ref T3092.

Releeph's objects basically go like this:

  - At the top level, we have Projects (like "www" or "libphutil")
  - Each project has Branches (like "LATEST" or "v1.1.3")
  - Each branch has Requests (like pull requests, e.g. "please merge commit X into branch Y (in project Z)")

Currently, there's no real "project detail" or "branch detail" page. Instead, we have a search results page for their contained objects. That is, the "project detail" page shows a list of branches in the project, using ApplicationSearch.

This means that operations like "edit" and "deactivate" are one level up, on the respective list pages.

Instead, move details onto the detail pages. This gives us more room for actions and information, and simplifies the list views.

Basically, these are "detail pages" where the object content is a search interface. We do something simliar to this in Phame right now, although it's messier there (no ApplicationSearch yet).

@chad, you might have some ideas here. Roughly, the design question is "How should we present an object's detail view when its content is really a search interface (Phame Blog for Posts, Releeph Project for Branches)?"

I think the simple approach I've taken here (see screenshot) gives us reasonable results, but overall it's something we haven't done much or done too much thinking about, I think.

Test Plan: {F54774}

Reviewers: btrahan

Reviewed By: btrahan

CC: chad, aran

Maniphest Tasks: T3092

Differential Revision: https://secure.phabricator.com/D6771
2013-08-19 18:30:30 -07:00
Chad Little
9ef0ea91c4 Remove dust pattern for common bg color.
Summary: Depends on D6769, removes 'dust' and uses a similar color background.

Test Plan: Review colors in sandbox.

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6772
2013-08-19 18:15:52 -07:00
epriestley
751cd547c2 Remove dust from page construction
Summary:
  ^\s+(['"])dust\1\s*=>\s*true,?\s*$\n

Test Plan: Looked through the diff.

Reviewers: chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D6769
2013-08-19 18:09:35 -07:00
Bob Trahan
e1d2523efe make commit message worker savvier around revision ids
Summary: Fixes T2836

Test Plan: make a diff, get it approved, arc land, verify things okay. ask users on T2836 to try.

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Maniphest Tasks: T2836

Differential Revision: https://secure.phabricator.com/D6770
2013-08-19 12:39:20 -07:00
Bob Trahan
3f0ffaa9eb Pholio - make create stories include the mock description, if there is one.
Summary:
This diff accomplishes this task by adding an arbitrary metadata store to PhabricatorObjectHandle. This seemed like it would be "necessary eventually"; for example if / when we decide we want to show images in these stories we'd need to add some more arbitrary data. A point of debate is this technique will yield the _current_ data and not the data at the time the transaction was originally made. I can see this being both desirable and non-desirable.

Otherwise, the best way to do this is to make a new transaction type specifically for create and store exactly what data we think we would need.

(and there's probably many other ways but they require much more work...)

Test Plan: viewed some pholio create stories and yes, they had the description showing.

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Maniphest Tasks: T3685

Differential Revision: https://secure.phabricator.com/D6767
2013-08-19 11:51:22 -07:00
epriestley
e8c2b2c3b5 Add followers to Asana diff tasks silently
Summary: Ref T2852. Asana is launching some kind of silent follow thing today; I don't know what the API is but it's probably something like this. I'll update this to actually make the right call once the call exists, this is mostly just a placeholder so I don't forget about it.

Test Plan: None yet, this API isn't documented or live and doesn't work yet so it can't be tested.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, moskov

Maniphest Tasks: T2852

Differential Revision: https://secure.phabricator.com/D6740
2013-08-19 08:52:53 -07:00
epriestley
bd17fac935 Modernize Releeph branch edit and create interfaces
Summary: Ref T3092. Fixes T3724. Use modern/flexible UI for these interfaces. Removes the ability to retarget an existing branch (you can just close it and open a new one if you made a mistake).

Test Plan: {F54437} {F54438}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3092, T3724

Differential Revision: https://secure.phabricator.com/D6765
2013-08-16 18:58:26 -07:00
epriestley
210e30c257 Use ApplicationSearch for Releeph branch lists
Summary:
Releeph branch lists in project views have a bunch of custom UI right now; give them more standard UI and ApplicationSearch.

This drops a small piece of functionality: we now show only a total open request count instead of a detailed enumeration of each request status. I assume this is reasonable (that is, the important piece is "is there something to do on this branch?"), but we can muck with it if the more detailed status is important.

Test Plan: {F54344}

Reviewers: btrahan

Reviewed By: btrahan

CC: LegNeato, aran

Maniphest Tasks: T3656

Differential Revision: https://secure.phabricator.com/D6764
2013-08-16 18:55:35 -07:00
Bob Trahan
f909a295f7 Integrate Pholio with Herald
Summary: Ref T2766. Does the integration via ApplicationTransactionsEditor. Only did addCC and Flag for proof of concept.

Test Plan: Made a rule to cc, made a rule to flag. They worked!  (will attach screens to diff)

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Maniphest Tasks: T2766

Differential Revision: https://secure.phabricator.com/D6766
2013-08-15 13:10:45 -07:00
epriestley
13d18376c1 Log and continue when trying to register an invalid event listener
Summary: We currently die if an event listener throws when registering (e.g., because it is misconfigured), but this prevents you from running `bin/config` to fix it, which is a bit silly.

Test Plan: Created this revision with an invalid listener in config.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6761
2013-08-14 19:14:16 -07:00
Bob Trahan
3d8eb641ea Conpherence - fix conpherence create
Summary: somewhere along the line this broke. Before this patch we fail the visibility check since its based on Conpherence Participants which don't get created and attached until applyExternalEffects. Believe it or not, this was the least gross fix I could come up with; since the permission check is done SO early most other ideas I had involved creating a dummy participant object to pass the check then handling things for real later on...  Ref T3723.

Test Plan: created a conpherence with myself - great success

Reviewers: epriestley

Reviewed By: epriestley

CC: chad, Korvin, aran

Maniphest Tasks: T3723

Differential Revision: https://secure.phabricator.com/D6762
2013-08-14 17:32:16 -07:00
epriestley
23e68ee8cb Use ApplicationSearch in ReleephBranchView
Summary:
Ref T3721. Releeph currently attempts to implement a flexible, field-driven search for branches, but it's building all of its own infrastructure and it ends up heading down some weird paths. In particular, it loads **every** request and then makes calls into fields to filter them. It also tries to be very very general, which isn't really necessary (for example, I think it's reasonable for us to assume that we won't let you disable the "requestor" field).

ApplicationSearch and CustomField provide more scalable approaches to this problem; move search on top of them. The query still ends up doing some filtering in-process, but it's now far more limited in scope and can be denormalized later.

Test Plan: {F54304}

Reviewers: btrahan

Reviewed By: btrahan

CC: chad, aran

Maniphest Tasks: T3721

Differential Revision: https://secure.phabricator.com/D6758
2013-08-14 15:38:52 -07:00
epriestley
42a81554ac Add src/extensions/ to Phabricator
Summary: I added this easier-extension mechanism a while ago but only added the actual directories to libphutil and arcanist. This one should work, it just wasn't checked into the repository.

Test Plan: Added a file with an exception in it to the directory, verified the exception was thrown at runtime.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6759
2013-08-14 15:38:06 -07:00
epriestley
7821c98053 Use PhabricatorCustomField infrastructure to render Releeph custom fields on the edit screen
Summary:
Ref T3718. This moves custom field rendering on the edit screen to PhabricatorCustomField and makes all the APIs conformant.

We still run through edit with both old-school and new-school sets of fields, because the actual editing isn't on the new stuff yet. That will happen in a diff or two.

Test Plan: Edited a request; intentionally introduced errors and verified the form behaved as expected.

Reviewers: btrahan, testuser1122344

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3718

Differential Revision: https://secure.phabricator.com/D6756
2013-08-14 15:36:13 -07:00
Chad Little
d02eb46ad6 Add hovercard on/off option to PhabricatorFeedStory
Summary: Defaults hovercards off everywhere feed stories are shown. I tried to find where to put this in so /feed/ could display them, but got horribly lost and confused in SearchQueryLandView

Test Plan: turn hovercards on and off, inspect elements.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6757
2013-08-14 13:20:25 -07:00
epriestley
e3f3017b20 Delete "Risk" field specification from Releeph
Summary: Ref T3718. This is not used and does not seem particularly useful.

Test Plan: Grep.

Reviewers: btrahan

Reviewed By: btrahan

CC: LegNeato, aran

Maniphest Tasks: T3718

Differential Revision: https://secure.phabricator.com/D6755
2013-08-14 12:34:12 -07:00
epriestley
8c3d1af627 Partially fix a policy issue with ApplicationTransactions
Summary: Currently, we check that the user can view and edit their own transaction, which is always true. Instead, check that they can view the object. I'll fix this with a more tailored check against the EDIT capability that's per-transaction later.

Test Plan: Applying no transactions no longer fatals with undefined `$xaction`.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6754
2013-08-14 12:34:11 -07:00
epriestley
f7b289e3a4 Make ReleephRequest implement PhabricatorCustomFieldInterface
Summary: Ref T3718. Doesn't do anything yet.

Test Plan: Viewed and edited a request.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3718

Differential Revision: https://secure.phabricator.com/D6753
2013-08-14 12:34:10 -07:00
epriestley
026137f92f Further simplify PhabricatorCustomFieldInterface
Summary:
Ref T1703. Ref T3718. This introduces `PhabricatorCustomFieldAttachment`, which is just a fancy `array()`. The goal here is to simplify `PhabricatorCustomFieldInterface` as much as possible.

In particular, it can now use common infrastructure (`assertAttached()`) and is more difficult to get wrong.

Test Plan: Edited custom fields on profile.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1703, T3718

Differential Revision: https://secure.phabricator.com/D6752
2013-08-14 12:34:09 -07:00
epriestley
938b63aaa9 Simplify and improve PhabricatorCustomField APIs
Summary:
Ref T1703. Ref T3718. The `PhabricatorCustomFieldList` seems like a pretty good idea. Move more code into it to make it harder to get wrong.

Also the sequencing on old/new values for these transactions was a bit off; fix that up.

Test Plan: Edited standard and custom profile fields.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1703, T3718

Differential Revision: https://secure.phabricator.com/D6751
2013-08-14 12:34:08 -07:00
epriestley
74de24909b Partially move Releeph custom fields to PhabricatorCustomField
Summary:
Fixes T3661. Ref T3718. This makes Releeph custom fields extend PhabricatorCustomField so we can start moving over other pieces of infrastructure (rendering, storage, etc) to run through the same pathways. It's roughly the minimum amount of work required to be able to move forward.

NOTE: This removes per-project custom field selectors. Fields are now configured for an entire install. My understanding is that Facebook does not use this feature, and modern field infrastructure has moved away from selectors.

Test Plan: Viewed and edited projects, branches, and requests in Releeph. Grepped for removed config. Grepped for `field_selector`.

Reviewers: btrahan

Reviewed By: btrahan

CC: LegNeato, aran

Maniphest Tasks: T3661, T3718

Differential Revision: https://secure.phabricator.com/D6750
2013-08-14 12:34:07 -07:00
epriestley
ca0115b361 Support configuration-driven custom fields
Summary:
Ref T1702. Ref T3718. There are a couple of things going on here:

**PhabricatorCustomFieldList**: I added `PhabricatorCustomFieldList`, which is just a convenience class for dealing with lists of fields. Often, current field code does something like this inline in a Controller:

  foreach ($fields as $field) {
    // do some junk
  }

Often, that junk has some slightly subtle implications. Move all of it to `$list->doSomeJunk()` methods (like `appendFieldsToForm()`, `loadFieldsFromStorage()`) to reduce code duplication and prevent errors. This additionally moves an existing list-convenience method there, out of `PhabricatorPropertyListView`.

**PhabricatorUserConfiguredCustomFieldStorage**: Adds `PhabricatorUserConfiguredCustomFieldStorage` for storing custom field data (like "ICQ Handle", "Phone Number", "Desk", "Favorite Flower", etc).

**Configuration-Driven Custom Fields**: Previously, I was thinking about doing these with interfaces, but as I thought about it more I started to dislike that approach. Instead, I built proxies into `PhabricatorCustomField`. Basically, this means that fields (like a custom, configuration-driven "Favorite Flower" field) can just use some other Field to actually provide their implementation (like a "standard" field which knows how to render text areas). The previous approach would have involed subclasssing the "standard" field and implementing an interface, but that would mean that every application would have at least two "base" fields and generally just seemed bleh as I worked through it.

The cost of this approach is that we need a bunch of `proxy` junk in the base class, but that's a one-time cost and I think it simplifies all the implementations and makes them a lot less magical (e.g., all of the custom fields now extend the right base field classes).

**Fixed Some Bugs**: Some of this code hadn't really been run yet and had minor bugs.

Test Plan:
{F54240}
{F54241}
{F54242}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1702, T1703, T3718

Differential Revision: https://secure.phabricator.com/D6749
2013-08-14 12:33:53 -07:00
epriestley
9f41032693 Remove "cut point commit identifier" from Releeph
Summary: Ref T3656. Releeph denormalizes branch cut point identifiers into Branch objects, but this information isn't useful or used for sorting, filtering, or enforcing unique constraints. Instead, derive it via noramlized pathways from the `cutPointCommitPHID`.

Test Plan: Ran storage upgrade. Ran `releephwork.getbranch` and `releeph.getbranches`. Grepped for `cutPointCommitIdentifier`.

Reviewers: btrahan

Reviewed By: btrahan

CC: LegNeato, aran

Maniphest Tasks: T3656

Differential Revision: https://secure.phabricator.com/D6636
2013-08-14 09:01:38 -07:00
epriestley
a84cc777c8 Remove "Project ID" from Releeph Projects
Summary:
Fixes T3660. Releeph Projects currently have an unused one-to-one mapping to Phabricator projects. This isn't consistent with other applications and has no integrations or uses. Get rid of it.

NOTE: Waiting for signoff from @legneato on T3660 before pulling the trigger here.

Test Plan: Created and edited Releeph projects. Grepped for references to project ID; there are a dozen or so but they're all either Releeph projects or Arcanist projects.

Reviewers: btrahan

Reviewed By: btrahan

CC: LegNeato, aran

Maniphest Tasks: T3660

Differential Revision: https://secure.phabricator.com/D6635
2013-08-14 09:00:56 -07:00
epriestley
296818e129 Remove ReleephProject->repositoryID writes
Summary: Ref T3655. Depends on D6633. This removes the writes and the column.

Test Plan: Created a project, edited a project. Verified the table doesn't have any keys including this column.

Reviewers: btrahan

Reviewed By: btrahan

CC: LegNeato, aran

Maniphest Tasks: T3655

Differential Revision: https://secure.phabricator.com/D6634
2013-08-14 09:00:25 -07:00
epriestley
a7955e919c Remove all reads of ReleephProject->repositoryID
Summary:
Ref T3655. ReleephProject currently has both `repositoryID` and `repositoryPHID`, which point to the same object and are reudundant. Get rid of all reads of `repositoryID`.

NOTE: This makes project loads depend on repository loads. The eventual rule here will be that you must be able to see a repository in order to see projects for that repository, which seems like a reasonable rule. We might need to tailor it more than this (e.g., if there are branch read permissions down the line) but this seems like a reasonable minimum.

Test Plan: Grepped for `repositoryID` in `releeph/`. Called `releeph.getbranches`.

Reviewers: btrahan

Reviewed By: btrahan

CC: LegNeato, aran

Maniphest Tasks: T3655

Differential Revision: https://secure.phabricator.com/D6633
2013-08-14 08:59:28 -07:00
epriestley
c8061d5da8 Implement ApplicationSearch in Flags
Summary:
Ref T1809. Provide ApplicationSearch to Flags and allow the user to select flags by color.

@chad might have some design feedback on my control.

Test Plan: {F54131}

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T1809

Differential Revision: https://secure.phabricator.com/D6747
2013-08-13 16:27:26 -07:00
epriestley
275f67294c Make Flags policy aware
Summary:
Ref T1809. Ref T603. Ref T3599. Makes flags policy aware.

This change reduces the utility of flag search/browse; the next change will switch it to ApplicationSearch to restore utility. Representing all that ordering in terms of cursor paging is also a giant pain.

Test Plan: Viewed Differential, Flags, etc. Grepped for all PhabricatorFlagQuery callsites.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T603, T1809, T3599

Differential Revision: https://secure.phabricator.com/D6746
2013-08-13 16:17:42 -07:00
Bob Trahan
d8a1e7e15f Differential - add an undo element when you collapse a file
Summary: Fixes T2258.

Test Plan: collapsed and expanded file via the dropdown - good stuff. got the "undo" element into the mix - also good stuff.

Reviewers: epriestley

Reviewed By: epriestley

CC: chad, Korvin, aran

Maniphest Tasks: T2258

Differential Revision: https://secure.phabricator.com/D6742
2013-08-13 16:05:09 -07:00
epriestley
3021e1d52d Allow only one global top menu to be open at a time
Summary: Fixes T3715. Makes "visible" global instead of per-menu, so all the menus share a visible state.

Test Plan: For menus A and B, clicked "A, A", "A, B, A", "A, B, B", "A, B, B, A", etc. Couldn't figure out a way to break it.

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T3715

Differential Revision: https://secure.phabricator.com/D6745
2013-08-13 14:57:52 -07:00
epriestley
a530004ac7 Raise an error if a user tries to register with an excessively long username
Summary: Fixes T2348. We should probably do some of this more broadly, but can tackle them one at a time as they arise, since many fields have no effective length limit.

Test Plan: {F54126}

Reviewers: btrahan, asherkin

Reviewed By: asherkin

CC: aran

Maniphest Tasks: T2348

Differential Revision: https://secure.phabricator.com/D6744
2013-08-13 14:37:23 -07:00
epriestley
f852a09e1c Whitelist blacklisting pcntl_ functions for setup checks so Debian installs don't fatal instantly
Summary: See IRC. This is dumb but I think we should try to work by default on Debian, and it doesn't cost us too much. See inline comment for more.

Test Plan:
  - No `disable_functions`, restarted, worked fine.
  - Set `disable_functions = pcntl_derp`, restarted, worked fine.
  - Set `disable_functions = derp`, restarted, setup fatal.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6741
2013-08-13 12:23:29 -07:00
epriestley
796007a85e Publish inline comments in Asana notification stories
Summary: Ref T2852. Bleh, gross. Does what it says in the title.

Test Plan: {F54024}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2852

Differential Revision: https://secure.phabricator.com/D6735
2013-08-13 10:16:56 -07:00
epriestley
c7a84876c9 Add some missing rendering code to textual feed stories
Summary: Ref T2852. Token given stories currently try to `strip_tags()` a `PHUIFeedView` or similar, which doesn't work. Cast it to a string before stripping. This is super gross but I don't want to clean it up until after ApplicationTransactions so we can really clean up all of Feed.

Test Plan: Ran `bin/feed republish <id>` on a feed story about giving a token to a revision.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2852

Differential Revision: https://secure.phabricator.com/D6733
2013-08-13 10:11:47 -07:00
epriestley
f11a4d5ef0 Pass branch information to local Conduit calls in Diffusion
Summary: Fixes T3697. Currently, we don't pass "branch" implicitly, so, e.g., when viewing a branch you don't get the right commit hash when looking up the README.

Test Plan: Viewed a non-`master` branch with a README, no fatal. Poked around and couldn't find anything suspicious.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3697

Differential Revision: https://secure.phabricator.com/D6734
2013-08-13 10:11:15 -07:00
epriestley
b7387f314b Raise a setup fatal for 'disable_functions' or 'disable_classes'
Summary:
Fixes T3709. PHP has two configuration options ('disable_functions', 'disable_classes') which allow functions and classes to be blacklisted at runtime.

Since these break things in an unclear way, raise a setup fatal if they are set.

We take a slightly more tailored approach to these in `phd` already, but I'd rather try just saying "no, this is bad" and see if we can get away with it. I suspect we can, and there's no legitimate reason to blacklist functions given that Phabricator must have access to, e.g., `proc_open()`.

Test Plan: {F54058}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3709

Differential Revision: https://secure.phabricator.com/D6739
2013-08-13 10:11:05 -07:00
epriestley
f37b315dec Correct switched-around configuration descriptions for metamta.herald.show-hints and metamta.reply.show-hints
Summary: Fixes T3710. The text on these options is switched around.

Test Plan: {F54051} {F54052}

Reviewers: btrahan, nmalcolm, chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T3710

Differential Revision: https://secure.phabricator.com/D6737
2013-08-13 08:33:56 -07:00
Bob Trahan
65b875d29d Pholio - back end for image re-ordering
Summary:
companion diff to D6729. This is the back-end stuff, plus calls the JS in D6729 for when images are removed, un-removed, uploaded, or replaced.

Fixes T3640.

Test Plan: messed around with images. hit save - new order! temporarily showed these stories and got text about re-ordering stuff.

Reviewers: epriestley, chad

Reviewed By: epriestley

CC: Korvin, aran

Maniphest Tasks: T3640

Differential Revision: https://secure.phabricator.com/D6731
2013-08-12 13:09:07 -07:00
Chad Little
fe0873408d Clean up Notification colors a smidge
Summary: Picked better colors and hover states.

Test Plan: test new colors, stare intently.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6730
2013-08-12 12:19:09 -07:00
epriestley
a167d7463d Allow Pholio mock images to be drag-reordered
Summary:
Ref T3640. JS part only, should give you a list in `imageOrder` on the server that you can read with `$request->getStrList('imageOrder')`.

NOTE: You can't drag images into the first position; this is an existing thing that I just need to fix with DraggableList.

@chad might have some design feedback.

Test Plan: Dragged images around, things seemed to work?

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3640

Differential Revision: https://secure.phabricator.com/D6729
2013-08-12 12:08:54 -07:00
Chad Little
fe766ff683 Fix twitch name
Summary: fix spelling

Test Plan: i didn't test this, but seems ok?

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6728
2013-08-12 11:41:03 -07:00
epriestley
da8ffbac12 Don't synchronize Asana objects with no CCs and no responsible, non-author users
Summary: Ref T2852. Currently, we publish commits with no audit requests and reviews with no CCs or reviewers into Asana. This creates undesired notifications, so drop events which would publish an object that doesn't exist yet and has no followers or respible users.

Test Plan: Used `bin/feed republish` to publish a story about an object with no related users, saw the publish abort with the new message. Added a CC, published again, got a publish.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2852

Differential Revision: https://secure.phabricator.com/D6727
2013-08-12 11:20:30 -07:00
epriestley
a0f0ba6acd Stop using process/filesystem-based checks to determine if daemons are running
Summary:
We currently check if daemons are running using the filesystem and process list. These checks reach the wrong result for a lot of users because their webservers can't read the filesystem or process list. They also reach the wrong result for daemons running on other machines.

Instead, query the active daemon list to see if daemons are running. This should be significantly more reliable.

(We didn't do this before because the running daemon list mechanism didn't exist when the check was written, and at the time it was more complex than doing a simple filesystem/process list thing.)

Test Plan: Viewed `/repositories/` with and without daemons running, saw appropriate warning or lack of warning.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6722
2013-08-12 11:20:22 -07:00
epriestley
262475d151 Clean up a couple more doc references to the old MetaMTA application
Summary: This moved to CLI.

Test Plan: Read.

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D6724
2013-08-12 08:58:27 -07:00
epriestley
a02075698c When viewing a Ponder question, clear notifications about it
Summary: Fixes T3703. Clear question notifications when viewing a question.

Test Plan: Gave a question a token, logged in as author, saw notification, viewed question page, notification was marked read.

Reviewers: chad, btrahan

Reviewed By: chad

CC: aran

Maniphest Tasks: T3703

Differential Revision: https://secure.phabricator.com/D6723
2013-08-12 08:20:10 -07:00
Eric Stern
563f3ea236 Create 'Add Task' link on project/view page
Reviewed by: epriestley

See: https://github.com/facebook/phabricator/pull/368
2013-08-12 08:13:31 -07:00
epriestley
8ac2da9850 Provide hasChildren() to replace isEmptyContent()
Summary:
Fixes T3698. Sometimes views need to render differently depending on whether they contain content or not. The existing approach for this is `isEmptyContent()`, which doesn't work well and is sort of hacky (it implies double-rendering content, which is not always free or side-effect free).

Instead, provide a test for an element without children. This test is powerful enough to catch the easy cases of `null`, etc., and just do the expected thing, but will not catch a View which is reduced upon rendering. Since this is rare and we have no actual need for it today, just accept that as a limitation.

Test Plan:
Viewed Timeline and Feed UI examples. Viewed Feed (feed), Pholio (timelineview), and Differential (old transactionview).

{F53915}

Reviewers: chad, btrahan

Reviewed By: chad

CC: aran

Maniphest Tasks: T3698

Differential Revision: https://secure.phabricator.com/D6718
2013-08-12 07:51:01 -07:00
Tarmo Lehtpuu
52225f7eb9 Fix bug with macros search being global.
Summary: This fixed a bug with macros search finding macros flagged by any user. We should only look at flags by the current user.

Test Plan: Verify that no macros flagged by another user show up in macros search.

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6717
2013-08-11 13:35:20 -07:00
Chad Little
4657158e71 Jira, TwitchTV login icons
Summary: icons

Test Plan: photoshop

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6716
2013-08-11 11:00:38 -07:00
Tarmo Lehtpuu
dc28d161ad Change (No Filtering) to be the default selected option.
Summary: Cleaning up my mess, (No Filtering) should be the default selected option in macros search form.

Test Plan: Go to /macro/query/advanced/ and verify that (No Filtering) is the default selected option.

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Maniphest Tasks: T3692

Differential Revision: https://secure.phabricator.com/D6715
2013-08-11 10:05:47 -07:00
Bob Trahan
7225dc4525 Sort arcanist projects by name
Summary: Fixes T3691.

Test Plan: they be sorted now

Reviewers: epriestley

Reviewed By: epriestley

CC: edward, Korvin, aran

Maniphest Tasks: T3691

Differential Revision: https://secure.phabricator.com/D6714
2013-08-09 18:09:28 -07:00
Bob Trahan
ada749236a Herald - restore create an audit as an action for commit objects
Summary: I think we accidentally forgot to include this action in D6660.

Test Plan: verified it showed up in the UI to have the action be an audit

Reviewers: chad, epriestley

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6712
2013-08-09 13:01:00 -07:00
Bob Trahan
46c4459dc0 Conpherence notifications - fix ordering
Summary: we get participation data ordered, then query conpherences by phid... be sure to resort the conpherences based on participation data. I missed this in testing 'cuz my test data is so trashy, but it is glaringly obvious in production. :/

Test Plan: replied to a very old conpherence and noted it was first in the notification panel

Reviewers: chad, epriestley

Reviewed By: epriestley

CC: Korvin, aran

Maniphest Tasks: T3641

Differential Revision: https://secure.phabricator.com/D6711
2013-08-09 13:00:49 -07:00
Chad Little
e6f3c24bc3 Tweak colors on Conpherence Notification Menu
Summary: Fixes T3690. Uses standard colors, smaller borders.

Test Plan: Review Menu with and without a notification

Reviewers: epriestley, btrahan

Reviewed By: btrahan

CC: Korvin, aran

Maniphest Tasks: T3690

Differential Revision: https://secure.phabricator.com/D6710
2013-08-09 12:47:31 -07:00
Tarmo Lehtpuu
8c01cc97f4 Implement macros search by flags.
Summary: Reuse the existing flags functionality for searching macros. Currently implemented as a simple select element (for color).

Test Plan: Flagged some macros and tried searching by them.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D6709
2013-08-08 18:55:27 -07:00
Bob Trahan
399c3e4ee6 Conpherence - add dropdown menu
Summary: Fixes T3641. Probably needs some @chad love though on colors and what have you. Technique was to jam this into the existing notifications stuff as much as possible. I think its "okay" but if we were to add more stuff here (like a 3rd application) this could get a quality pass to consolidate even more code.

Test Plan: played with it in Chrome and Safari - looks reasonable

Reviewers: chad, epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T3641

Differential Revision: https://secure.phabricator.com/D6708
2013-08-08 13:43:33 -07:00
epriestley
07dd5df33b Support Twitch.tv as an OAuth provider
Summary:
This is mostly for personal reasons / lols, but they have a perfectly functional OAuth2 API and it takes like 15 minutes to add a provider now and I was in this code anyway...

@chad, we could use JIRA, Twitter and Twitch.tv auth icons if you have a chance.

Test Plan: {F53564}

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6706
2013-08-08 13:34:30 -07:00
epriestley
d7c712a855 Remove actor as a follower from unowned Asana subtasks after touching them
Summary: Ref T2852. Asana adds the actor as a follower when they create a task, so subtasks currently have up to two followers (the actor and the reviewer) when they should have only one (the reviewer). Simply removing the actor is an effective remedy for this because unfollowing tasks occurs with sneaky ninja stealth in Asana and doesn't generate notifications or even transaction activity.

Test Plan: Synchronized a revision without this patch, saw two followers on the subtask. Synchronized a revision after this patch, saw the "removeFollowers" fire and only one follower on the subtask, with no record of the removal in notifications or the transaction log.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2852

Differential Revision: https://secure.phabricator.com/D6700
2013-08-08 12:01:48 -07:00
Jakub Vrana
8c93e3c941 Allow using colon in Depends On
Test Plan: Used it.

Reviewers: epriestley

Reviewed By: epriestley

CC: tdrhq, aran, Korvin

Differential Revision: https://secure.phabricator.com/D6705
2013-08-08 11:43:25 -07:00
Edward Speyer
bca9dfa10e Fix for D6260
Summary: Fixes a query in √D6260.

Test Plan: View a Releeph RQ and verify that the "churn" field renders and has the right numbers in it.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D6702
2013-08-08 16:32:05 +01:00
Chad Little
f6e22a1ec0 Update status icons
Summary: Use standard colors.

Test Plan: create status

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D6701
2013-08-08 06:51:22 -07:00
epriestley
4f49ec1cff Remove HeraldDryRunAdapter
Summary: Ref T2769. This isn't a real adapter and its methods are increasingly hacky messes. Make "dry run" a first-class concept on the HeraldEngine instead and remove the adapter.

Test Plan: Ran Herald via test console and via CLI.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2769

Differential Revision: https://secure.phabricator.com/D6693
2013-08-07 18:04:40 -07:00
epriestley
ce163536ca Add a normal "view" page for Herald rules
Summary:
Ref T2769. This will house the transaction list and replace the "edit log" stuff.

The UI is a little bit rough and can probably share more code with the transaction history, but seems mostly-reasonable.

Test Plan: {F53253}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2769

Differential Revision: https://secure.phabricator.com/D6690
2013-08-07 18:04:39 -07:00
epriestley
b767bd3f2d Move Herald rule querying into HeraldRuleQuery
Summary: Ref T2769. The `HeraldRule` class has some query logic; move it into `HeraldRuleQuery`. Also some minor cleanup.

Test Plan: Ran test console, created a new revision, used `reparse.php --herald`. Verified rules triggered correctly.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2769

Differential Revision: https://secure.phabricator.com/D6689
2013-08-07 18:04:38 -07:00
epriestley
75e43513c2 Remove HeraldActionConfig, HeraldFieldConfig
Summary:
Ref T2769. Move all of this stuff into Adapters and get rid of the hard-coded classes.

I cheated in two places.

Test Plan: Edited and activated Herald rules.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, chad

Maniphest Tasks: T2769

Differential Revision: https://secure.phabricator.com/D6688
2013-08-07 18:04:37 -07:00
epriestley
2c2fcc58ca Remove HeraldConditionConfig
Summary: Ref T2769. Moves all traces of HeraldConditionConfig into Adapters.

Test Plan: Edited rules and used Test Console to exercise both affected code paths. Tried to save invalid rules to hit error pat.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2769

Differential Revision: https://secure.phabricator.com/D6679
2013-08-07 18:04:36 -07:00
epriestley
ca66eeb07c Remove HeraldContentTypeConfig and move repetition to Adapters
Summary: Ref T2769. Get rid of the last use of `HeraldContentTypeConfig` by moving repetition options into Adapters.

Test Plan: Viewed / edited Herald rules.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2769

Differential Revision: https://secure.phabricator.com/D6664
2013-08-07 18:04:35 -07:00
epriestley
0640931d30 Use Adapters to render Herald transcripts
Summary: Ref T2769. Use Adapters to build all the strings for transcripts, then get rid of the old maps.

Test Plan: Viewed revision and commit transcripts.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2769

Differential Revision: https://secure.phabricator.com/D6663
2013-08-07 18:04:34 -07:00
epriestley
78eb81ffd0 Remove almost all instances of HeraldContentTypeConfig
Summary: Ref T2769. This cleans up almost every use of the HeraldContentTypeConfig class.

Test Plan: Viewed and edited Herald rules.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2769

Differential Revision: https://secure.phabricator.com/D6662
2013-08-07 18:04:33 -07:00
epriestley
9c637604a2 Move most Herald actions and values into dynamic adapters
Summary: Ref T2769. Shift the bulk of value and action config into Adapters.

Test Plan: Viewed and edited Herald list and rules.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, vrana

Maniphest Tasks: T2769

Differential Revision: https://secure.phabricator.com/D6660
2013-08-07 18:03:54 -07:00
epriestley
2e87f9f53c Move most Herald condition config into dynamic adapters
Summary: Ref T2769. Pushes most condition configuration into Adapters, out of the hard-coded class.

Test Plan: Looked at, edited, and dry-run'd Herald rules.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2769

Differential Revision: https://secure.phabricator.com/D6658
2013-08-07 18:03:53 -07:00
epriestley
3490b6dd11 Move most Herald field configuration into dynamic Adapters
Summary: Ref T2769. Herald has a giant hard-coded list of fields. Primarily make these dynamic and adapter-based.

Test Plan: Viewed and edited Herald rules.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2769

Differential Revision: https://secure.phabricator.com/D6657
2013-08-07 18:03:52 -07:00
epriestley
6badb05d64 Make Herald adapters provide content types
Summary:
Ref T2769. Get content types out of hard-coded config and into dynamic adapters.

This removes the "MERGE" and "OWNERS" content types, which were vestigal. These needs are likely better addressed through subscriptions/transactions, and are obsolete, and haven't existed for 2+ years and no one has asked for them to be restored.

Test Plan: Mostly a bunch of grep. Viewed rule list, rule edit. Edited a revision.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2769

Differential Revision: https://secure.phabricator.com/D6656
2013-08-07 18:03:51 -07:00
epriestley
307a41e895 Rename "HeraldObjectAdapter" to "HeraldAdapter"
Summary: Ref T2769. The term "Object" is redundant.

Test Plan: grep

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2769

Differential Revision: https://secure.phabricator.com/D6655
2013-08-07 18:03:50 -07:00
epriestley
b1c4a258c9 Add ApplicationTransactions to Herald
Summary: Ref T2769. I'm planning to keep this pretty simple, but we have this ad-hoc edit log for rules already and some other mess that we can clean up.

Test Plan: No effect yet; see future changes.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2769

Differential Revision: https://secure.phabricator.com/D6654
2013-08-07 18:03:49 -07:00
epriestley
589ae8d26d Use ApplicationSearch in Herald
Summary: Ref T2769. Ref T2625. Herald is currently a giant mishmash of hard-codes and weird special cases. Move toward modernization and normality.

Test Plan: {F52716}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2625, T2769

Differential Revision: https://secure.phabricator.com/D6652
2013-08-07 18:03:47 -07:00
epriestley
a7ce55e3ca Remove extra side navs in Herald
Summary: Ref T2769. Removes some nonstandard side navs.

Test Plan: Viewed affected pages.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2769

Differential Revision: https://secure.phabricator.com/D6651
2013-08-07 18:03:46 -07:00
epriestley
ceb7f830a4 Make HeraldRuleQuery policy-aware
Summary: Ref T2769. dem policy checks

Test Plan: Loaded `/herald/`; loaded rule editor.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2769

Differential Revision: https://secure.phabricator.com/D6650
2013-08-07 18:03:45 -07:00
epriestley
8eed5b1f14 Make HeraldRule implement PhabricatorPolicyInterface
Summary:
Ref T603. Ref T2769. Herald currently interacts with policies in a bad way; specifically, I can create a rule which emails me for everything, and thus learn about objects I can't otherwise see.

This shouldn't be possible, so I'm going to reduce personal rules to have only the viewer's scope.

For global rules, I think I'm always going to let any user edit them, but make who the rule acts as part of the configuration. There will be an option to make a rule omnipotent, but only admins (or some other special subset of users) will be able to select it.

Transactions/subscriptions will provide a check against users editing global rules in ways that are bad.

Test Plan: Next diffs.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T603, T2769

Differential Revision: https://secure.phabricator.com/D6649
2013-08-07 18:03:44 -07:00
epriestley
2820fdc89b Add PHIDs to Herald Rules
Summary: Ref T2769. Precursor to various Herald-related modernizations.

Test Plan: Ran migration; loaded Herald via web.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2769

Differential Revision: https://secure.phabricator.com/D6648
2013-08-07 18:03:37 -07:00
epriestley
d3e700ce19 Further mitigate BREACH by reducing reflectiveness
Summary:
Ref T3684. The URI itself is reflected in a few places. It is generally not dangerous because we only let you add random stuff to the end of it for one or two controllers (e.g., the file download controller lets you add "/whatever.jpg"), but:

  - Remove it entirely in the main request, since it serves no purpose.
  - Remove query parameters in Ajax requests. These are available in DarkConsole proper.

Also mask a few things in the "Request" tab; I've never used these fields when debugging or during support, and they leak quasi-sensitive information that could get screenshotted or over-the-shoulder'd.

I didn't mitgate `__metablock__` because I think the threat is so close to 0 that it's not worthwhile.

Test Plan: Used Darkconsole, examined Requests tab.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3684

Differential Revision: https://secure.phabricator.com/D6699
2013-08-07 16:09:25 -07:00
epriestley
7298589c86 Proof of concept mitigation of BREACH
Summary: Ref T3684 for discussion. This could be cleaned up a bit (it would be nice to draw entropy once per request, for instance, and maybe respect CSRF_TOKEN_LENGTH more closely) but should effectively mitigate BREACH.

Test Plan: Submitted forms; submitted forms after mucking with CSRF and observed CSRF error. Verified that source now has "B@..." tokens.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3684

Differential Revision: https://secure.phabricator.com/D6686
2013-08-07 16:09:05 -07:00
epriestley
ab7a091212 Fix text-mode rendering of object and Asana link views
Summary:
Ref T2852. Two issues:

  - Embeds (`T12`, `{T12}`) have some handle issues because handles run afoul of visibility checks under some configs. Make handles unconditionally visible.
  - Asana links don't render correctly into text mode. Give them a valid text mode rendering so they don't flip out.

Test Plan: Made comments with `T12` and `http://app.asana.com/...` and published them to Asana.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2852

Differential Revision: https://secure.phabricator.com/D6696
2013-08-07 13:29:09 -07:00
epriestley
aa8c661d5d Don't publish story text for "close" stories to Asana
Summary: Ref T2852. After some discussion, Asana doesn't want "close" stories either.

Test Plan: Used `bin/feed republish` to publish close and non-close stories from Differential and Diffusion. Verified comments were synchronized in the expected cases.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2852

Differential Revision: https://secure.phabricator.com/D6697
2013-08-07 13:28:58 -07:00
Chad Little
9c999e3548 Update pinboard view styles, move to PHUI
Summary: Tightens up the CSS to display more items (4 wide on 15") and fixes some mobile CSS issues with appseach. Fixes T3614

Test Plan: Tested Pholio, Macros, mobile layouts

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T3614

Differential Revision: https://secure.phabricator.com/D6694
2013-08-07 10:58:09 -07:00
Kieran Brownlees
8b07c498d4 Add NEEDS_REVISION support to DifferentialRevisionQuery
Reviewed by: epriestley

See: https://github.com/facebook/phabricator/pull/370
2013-08-07 08:00:32 -07:00
Chad Little
1ab7622edf Fix project stories.
Summary: Fix missed %s

Test Plan: Load up feed.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D6692
2013-08-06 21:01:20 -07:00
Chad Little
6775005bad Add differential comments to feed.
Summary: We already show transaction and maniphest comments.

Test Plan: Review my feed, see diff comment.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D6687
2013-08-06 11:08:11 -07:00
Jakub Vrana
ce62632e15 Add example for bugtraq.logregex with two parts
Summary: Also fix displaying array examples.

Test Plan: Used it in `linkBugtraq()`.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T3620

Differential Revision: https://secure.phabricator.com/D6667
2013-08-06 09:29:22 -07:00
Chad Little
b348aaefb9 Add Hovercards / restyle feed one line stories.
Summary: This adds hovercards to most stories and removes the profile photo from one line stories. I don't know about my implementation, which has difficulties with application transactions (because it shows status). Which leads me to a bigger question, which is can we render all people through a common function like AphrontTagView so we can easily class and/or hovercard it anywhere.

Test Plan: Reviewed my feed, various stories.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D6684
2013-08-06 09:20:04 -07:00
epriestley
5a352d0a69 Improve phd help
Summary: Fixes T3680. One description was wrong, and clean up some of the other stuff.

Test Plan: Ran `phd`.

Reviewers: btrahan, Korvin

Reviewed By: Korvin

CC: aran, jifriedman, Korvin

Maniphest Tasks: T3680

Differential Revision: https://secure.phabricator.com/D6683
2013-08-06 09:10:53 -07:00
Bob Trahan
0e6b5073cd Paste - add support for email replies and subscribers
Summary: Email replies and subscribers seem to go hand in hand so deploy both at once.

Test Plan: played around with bin/mail. Verified replies posted comments on the paste.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T3650

Differential Revision: https://secure.phabricator.com/D6682
2013-08-05 17:11:46 -07:00
epriestley
42af0d66d9 Use ApplicationSearch in Feed
Summary: Ref T2625. This doesn't do anything fancy, but gives feed a little more flexibility.

Test Plan: Viewed `/feed/`.

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2625

Differential Revision: https://secure.phabricator.com/D6681
2013-08-05 14:10:41 -07:00
epriestley
b712905dc1 Add a "document" style to PHUIRemarkupPreviewPanel and use it in Legalpad and Phriction
Summary: Ref T3671. Depends on D6674. Continues work in D6673, D6674 and extends it into Legalpad and Phriction. Then deletes a bunch of dead code.

Test Plan: Edited documents in Legalpad and Phriction, verified I got reasonable looking previews.

Reviewers: btrahan, Firehed

Reviewed By: btrahan

CC: aran, chad

Maniphest Tasks: T3671

Differential Revision: https://secure.phabricator.com/D6675
2013-08-05 10:47:26 -07:00
epriestley
b2fa1293a7 Use PHUIRemarkupPreviewPanel in Ponder
Summary:
Ref T3578. Ref T3671. Depends on D6673. Use `PHUIRemarkupPreviewPanel` (introduced in D6673) to provide question create/edit and answer edit previews in Ponder.

Then delete a million lines of duplicate code.

Test Plan: Edited a question; edited an answer. Saw live previews.

Reviewers: btrahan, Firehed

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3578, T3671

Differential Revision: https://secure.phabricator.com/D6674
2013-08-05 10:47:06 -07:00
epriestley
193a9611e4 Partially generalize Remarkup previews and add support to Differential
Summary:
Ref T3671. A lot of applications have pretty ad-hoc preview code. Clean it up a bit and add Summary preview to Differential.

After ApplicationTransactions we might want to try to serialize the whole form and show a preview of all the transactions, but this seems not very useful in most cases (I'd guess that Remarkup previews are 99% of the value) and tricky to get right (e.g., adding images which don't exist yet to Pholio mocks).

I think I can add this in a few other places, too.

Test Plan:
Edited Maniphest Tasks and Differential Revisions, mashed some buttons. Verified previews rendered correctly. Grepped for removed CSS classes (no hits).

{F52907}

Reviewers: btrahan, Firehed

Reviewed By: btrahan

CC: aran, chad

Maniphest Tasks: T3671

Differential Revision: https://secure.phabricator.com/D6673
2013-08-05 10:46:39 -07:00
epriestley
86989c9f98 Provide a more flexible script for administrative management of audits
Summary: Fixes T3679. This comes up every so often and the old script is extremely broad (nuke everything in a repository). Provide a more surgical tool.

Test Plan: Ran a bunch of variations of the script and they all seemed to work OK.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, staticshock

Maniphest Tasks: T3679

Differential Revision: https://secure.phabricator.com/D6678
2013-08-05 10:35:01 -07:00
epriestley
02ccca4bbd Fix Maniphest fatal if attached tasks are not an array
Summary: Fixes T3678. I think some very old rows may have a junk value here. This will be obsoleted by ApplicationTransactions and other modernization, most likely, so just fix it locally.

Test Plan: looked at a task

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3678

Differential Revision: https://secure.phabricator.com/D6677
2013-08-05 10:27:50 -07:00
Chad Little
3fd2c0ff90 Re-implement one line stories.
Summary: This puts back the 'one line' story we previously had with the updated design.

Test Plan: Review my feed.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D6666
2013-08-05 10:10:33 -07:00
Korvin Szanto
61f0671e87 Fix PhabricatorBot macro cacheing
Summary:
Previously, if there were no macros, we would ping conduit for a list of macros until we got something. Now we cache false when there are no results.
T3045

Test Plan: Ensure the init doesn't call the ##macro.query## conduit method more than once during the PhabricatorBot's lifetime.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran

Maniphest Tasks: T3045

Differential Revision: https://secure.phabricator.com/D6671
2013-08-04 15:40:04 -07:00
Korvin Szanto
40cf765ca2 Line highlighting for pastes
Summary:
Add the ability to select singular and multiple lines in paste to highlight.
This is related to T3627

Test Plan: Create a paste, select one or more lines.

Reviewers: epriestley, tberman

Reviewed By: epriestley

CC: aran, chad

Maniphest Tasks: T3627

Differential Revision: https://secure.phabricator.com/D6668
2013-08-04 12:12:37 -07:00
epriestley
a5f790e192 Handle "multipart/form-data" correctly even if we get the data
Summary: Fixes T3673. Supposedly we won't get any data in this case, but it seems we sometimes do. See discussion in task.

Test Plan: Used `var_dump()`, etc., to verify we short circuit out of "multipart/form-data" posts regardless of the presence of input data.

Reviewers: nmalcolm, btrahan

Reviewed By: nmalcolm

CC: aran

Maniphest Tasks: T3673

Differential Revision: https://secure.phabricator.com/D6670
2013-08-04 11:37:17 -07:00
epriestley
0de3b351b2 Fix string construction of submit button in Flag
Summary: Fixes T3674.

Test Plan: Clicked "flag for later"; checked error log.

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T3674

Differential Revision: https://secure.phabricator.com/D6669
2013-08-04 08:16:09 -07:00
Bob Trahan
37a5c4b11a Paste - add transactions
Summary: Ref T3650. This adds a create transaction, transactions for metadata (title, langauge, view policy), and comments. Editor is used on all create /edit paths.

Test Plan: made some pastes via web and email - yay. edited pastes - yay. verified txns showed up on pastes and in feed correctly.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T3516, T3650

Differential Revision: https://secure.phabricator.com/D6645
2013-08-02 12:56:58 -07:00
Bob Trahan
ee9830a950 Fix a small bug - %d => %s
Summary: easy peasy. noticed it trying to fix an image.

Test Plan: can fix image by phid once more!

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D6659
2013-08-02 11:20:25 -07:00
epriestley
f0857e4fd8 Improve error message for bad timestamps
Summary: Ref T3031. While we should probably do more than this, provide a more useful error message so I don't have to make users run `date` and such.

Test Plan:
Added `|| true` and ran `arc list`:

  $ arc list --conduit-uri=http://local.aphront.com:8080/
  Exception
  ERR-INVALID-TOKEN: The request you submitted is signed with a timestamp, but that timestamp is not within 15 m of the current time. The signed timestamp is 1375454102 (Fri, 02 Aug 2013 07:35:02 -0700), and the current server time is 1375454102 (Fri, 02 Aug 2013 07:35:02 -0700). This is a differnce of 0 seconds, but the timestamps must differ from the server time by no more than 900 seconds. Your client or server clock may not be set correctly.
  (Run with --trace for a full exception trace.)

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T3031

Differential Revision: https://secure.phabricator.com/D6653
2013-08-02 07:38:59 -07:00
Jakub Vrana
6c7f36f6b8 Use filtered query instead of filter in Elasticsearch
Summary:
The 'filter' works like this: Get all results matching query (all if there's no query), compute facets (if there are any) and then filter out the uninteresting results.
The 'filtered' query applies the filters when searching, not when processing results.
This is obviously not documented anywhere in the great Elasticsearch documentation.
http://stackoverflow.com/questions/14007078/performance-of-elastic-queries

We don't hit this problem very often as we usually use some query.

Test Plan: Searched for open documents using Elasticsearch, verified the sent JSON, verified results.

Reviewers: epriestley, wez

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D6643
2013-08-01 16:38:39 -07:00
Chad Little
78f73e7d45 Add one-line feed story.
Summary: It turns out not everything is interesting. This adds a oneline story with less vertical space.

Test Plan: UIExamples

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D6640
2013-08-01 15:23:07 -07:00
epriestley
fd2593e8ab Restore setting "disabled" on user handles of disabled users
Summary:
Fixes T3666. D6585 updated the User handles, but accidentally dropped this unusual property.

We should get rid of this -- it doesn't really make any sense on Handles -- but restore the previous beahvior to fix T3666 until we can nuke it.

Test Plan: Clicked some pages? (Actually testing this properly is a bit of a pain and I am super lazy.)

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3666

Differential Revision: https://secure.phabricator.com/D6644
2013-08-01 14:50:45 -07:00
Bob Trahan
1663dc32c9 Pholio - finish off history view
Summary:
...bsasically add a "view mode" and play with that throughout the stack. Differences are...

 - normal mode has comments; history mode does not
 - normal mode has inline comments; history mode does not
 - page uris are correct with respect to either mode

 ...and that's about it. I played around (wasted too much time) trying to make this cuter. I think just jamming this mode in here is the easiest / cleanest thing at the end. Feel free to tell me otherwise!

This largely gets even better via T3612. However, this fixes T3572.

Test Plan: played around with a mock with some history. noted correct uris on images. noted no errors in js console.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T3572

Differential Revision: https://secure.phabricator.com/D6638
2013-08-01 13:59:37 -07:00
epriestley
75e56cb25d Publish create object stories into Asana sort of, but not really
Summary: Ref T2852. Current code works fine, but although we want to drop creation stories, we really only want to drop the story text, not the other effects of the creation story. Also generalize this mechanism so we don't have Asana-specific code in the publishers.

Test Plan: Used `bin/feed republish` to publish creation and non-creation stories. Verified creation story published no text.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2852

Differential Revision: https://secure.phabricator.com/D6639
2013-08-01 12:19:18 -07:00
epriestley
22d7b54378 Add missing "phabricator-remarkup" div
Summary: Fixes T3652.

Test Plan: Created a Ponder question with fancy remarkup in the descriptive text.

Reviewers: btrahan, Firehed

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3652

Differential Revision: https://secure.phabricator.com/D6632
2013-07-30 15:50:27 -07:00
Bob Trahan
2ee1f8cb4e Add some create mail handlers for paste and files
Summary: Fixes T1144. Though actually I think T1144 wanted some handy way to email from the command-line / arc, this is cooler. :D

Test Plan: set conf properly and then ./bin/mail receive-test --as btrahan --to pasties@phabricator.dev | README  --> it worked...! couldn't test files as easily but verified exception thrown when I tried to test.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1144

Differential Revision: https://secure.phabricator.com/D6622
2013-07-30 13:26:55 -07:00
epriestley
ece246cb72 Modernize Releeph Request create/edit controller
Summary: Ref T3092.

Test Plan: Created a new pick request. Edited an existing pick request.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3092

Differential Revision: https://secure.phabricator.com/D6630
2013-07-30 12:38:32 -07:00
epriestley
333e377488 Modernize Releeph project create controller
Summary:
Ref T3092.

  - Check for a duplicate key error;
  - do less single loading and use Query classes;
  - use responsive UI elements;
  - add crumbs.

Test Plan: Created a new project, and hit error cases.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3092

Differential Revision: https://secure.phabricator.com/D6629
2013-07-30 12:38:11 -07:00
Bob Trahan
c6ae9c5672 Fix Pholio feed fatal
Summary: need to filter images that we can't find mocks for. Fixes T3645. Note I have some other errors in my feed which are really tricky to debug and might be garbage data; I want to see what happens in prod post this push.

Test Plan: set a mock visibility to no one and feed worked

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T3645

Differential Revision: https://secure.phabricator.com/D6631
2013-07-30 12:27:44 -07:00
epriestley
8d21dc0d52 Use application PHIDs for ATOM
Summary: Ref T2715.

Test Plan: `phid.query`

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2715

Differential Revision: https://secure.phabricator.com/D6597
2013-07-30 06:49:13 -07:00
epriestley
bdc93f65a2 Use application PHIDs for Diviner Books
Summary: Ref T2715.

Test Plan: `phid.query`

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2715

Differential Revision: https://secure.phabricator.com/D6596
2013-07-30 06:47:07 -07:00
Chad Little
8e1dd430fd Fix feed action icons
Summary: Feed stories have the ability to attach actions, but they were broken

Test Plan: review ui examples

Reviewers: epriestley, btrahan

Reviewed By: btrahan

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D6621
2013-07-29 12:12:14 -07:00
epriestley
999b47ca5c Celery! 2013-07-29 12:07:35 -07:00
epriestley
1fd2d28b11 Restore mail to Ponder
Summary: Ref T3578. Use ApplicationTransactions mail.

Test Plan: {F52159}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3578

Differential Revision: https://secure.phabricator.com/D6620
2013-07-29 12:04:20 -07:00
epriestley
4308a932c2 Restore search indexing to Ponder questions
Summary: Ref T3578. Get indexing back, and try to simplify it a bit.

Test Plan: Rebuilt QUES and MOCK indexes with `bin/search`. Created question with unique string, verified it appeared as a result. Added an answer with a unique string, got it as a result too.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3578

Differential Revision: https://secure.phabricator.com/D6619
2013-07-29 12:04:19 -07:00
epriestley
4c4fcb0bd1 Use ApplicationPHIDs to power object name typehaead results
Summary: Ref T2715. When you type "T12", etc., into the search box, use ApplicationPHIDs to try to find an object name match.

Test Plan: Typed "T12", "rP", "Q11", etc.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2715

Differential Revision: https://secure.phabricator.com/D6618
2013-07-29 12:04:17 -07:00
epriestley
5cc3bbf721 Use application PHIDs for application transactions
Summary: Ref T2715. Ref T3578. Load application transactions through application PHID infrastructure.

Test Plan: Viewed feed, saw successful loads of application transaction objects and rendered feed stories.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2715, T3578

Differential Revision: https://secure.phabricator.com/D6617
2013-07-29 12:04:15 -07:00
epriestley
1720d651da Restore feed stories to Ponder
Summary: Ref T3578. These are a touch rough still, but work.

Test Plan: {F52154}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3578

Differential Revision: https://secure.phabricator.com/D6616
2013-07-29 12:04:14 -07:00
epriestley
5037ba1cf8 Restore voting to Ponder
Summary: Ref T3578. Restores the voting UI and makes it a little prettier.

Test Plan: {F52089}

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T3578

Differential Revision: https://secure.phabricator.com/D6614
2013-07-29 12:04:13 -07:00
epriestley
ba8803af96 Hide Ponder comments and "add comment" form behind a disclosure link
Summary: Ref T3373. This is probably about as good as I can get without actual design, but it seems mostly improved over what we had going on before?

Test Plan: {F52087}

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T3373

Differential Revision: https://secure.phabricator.com/D6613
2013-07-29 12:04:12 -07:00