1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 17:02:41 +01:00
Commit graph

3011 commits

Author SHA1 Message Date
Pieter Hooimeijer
3440839c99 Hook Ponder to Subscriptions
Summary: Adding email aggro email aggro

Test Plan: Added some content; annoyed some coworkers.

Reviewers: epriestley, nh, vrana

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1808

Differential Revision: https://secure.phabricator.com/D3643
2012-10-08 14:47:21 -07:00
epriestley
cd9d78c107 Allow Fact analysis of commits
Summary: For immutable objects, just use the ID as a cursor.

Test Plan:
  - Analyzed commits from an empty cursor.
  - Checked that cursor was good.
  - Pulled some more commits.
  - Analyzed commits again, verified it only hit the new ones.
  - Verified the graph of "Count of CMIT" looked reasonable.

Reviewers: vrana

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1866

Differential Revision: https://secure.phabricator.com/D3656
2012-10-08 13:27:06 -07:00
epriestley
4b6d3e1be9 Unconditionally enable drag-and-drop uploads for Remarkup text areas
Summary: Make these always work. Notably, this makes them work in Maniphest. Previously this was at odds with stuff fixed in D3651.

Test Plan: Dragged and dropped files into Remarkup in Maniphest.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3652
2012-10-08 13:26:57 -07:00
epriestley
8573a1e142 Make the drop target for file attachments smaller
Summary:
Currently, in Maniphest, if you drag-and-drop a file it always attaches. Instead, I want you to have two options:

  - Drag and drop to the attachment area to attach; or
  - drag and drop to the Remarkup panel to upload + inline.

For the first step, make the input have a clear drop target instead of it being the entire panel.

Test Plan: Attached files in Create Task, task view, meta mta send test.

Reviewers: btrahan, vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3651
2012-10-08 13:26:41 -07:00
epriestley
85d6f7a66e Improve image thumbnailing and increase the size of Macro thumbnails
Summary:
Alternate proposal for D3635.

  - Works better with small images.
  - Produces a predictable thumbnail size.
  - Somewhat reasonable output on 3000x10 images.
  - Increase the size of Macro thumbnails to 240px.

Test Plan: {F20497}

Reviewers: vrana, chad

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3638
2012-10-08 13:26:10 -07:00
Pieter Hooimeijer
74644d5210 move ponder writes into editors; better search indexing
Summary:
* Moved the remaining `->save()` calls into editors
* for the `PonderQuestion`, separate `attachRelated` (needed for
  indexing and viewing) from `attachVotes` (needed for viewing
  but not indexing)
* Update the indexer to include comment and answer content
  in the search index.

Test Plan:
Stuff works as before. Also: add a comment or answer with some
easily-identifiable text and search for it; observe that
it gets indexed appropriately.

Reviewers: epriestley, nh, vrana

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1869

Differential Revision: https://secure.phabricator.com/D3654
2012-10-07 14:35:01 -07:00
epriestley
741469d7df Minor, fix a JS issue with help link in Remarkup assist. 2012-10-06 16:29:55 -07:00
epriestley
643d8070f1 Implement improved remarkup assistance panel
Summary:
  - I made a "?" icon for help/reference.
  - The `<>` icon was slightly too wide so I carved it down to 14x14.
  - All the icons are in `/Phabriactor/remarkup_icon_sources.psd` if you want to tweak anything.
  - Tooltips don't look like the mock but I'll tackle those separately.
  - Removed strikethrough.
  - Removed tag/image/text size for now since they don't have reasonable JS implementations yet.
  - I think everything else is accurate to the mock.

Test Plan:
Normal state:

{F20621, size=full}

Hover + Click states:

{F20622, size=full}

Clicked state:

{F20620, size=full}

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T1848

Differential Revision: https://secure.phabricator.com/D3650
2012-10-06 16:21:25 -07:00
epriestley
a7cdc312e6 Use new application icons and intended side nav icons
Summary: @chad, can you do the icon sheets based on 1.6? We're using a few icons not present in 1.5. I put the 1.6 "pro" source on Dropbox.

Test Plan:
Nav hover and selected states:

{F20598}

Launch hover state:

{F20596}

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T1856

Differential Revision: https://secure.phabricator.com/D3649
2012-10-06 14:48:46 -07:00
vrana
22cb8f5d08 Require canonical numbers in routes
Summary:
D03646 works, I don't want it to work.
Theoretically, it can cause us some troubles if we use this string in JS number context where 030 is 24.

Test Plan: D03646, D3646

Reviewers: epriestley, edward

Reviewed By: edward

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3646
2012-10-05 18:07:54 -07:00
lesha
26d62ee450 [Ubuntu Install Script] Automatically enable mod_rewrite
Summary: I needed to figure out how to do this, and it took a couple of minutes.

Test Plan: ran that command on my Ubuntu 12.04 system

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3479
2012-10-05 15:54:23 -07:00
vrana
3d6f3e1014 Allow editing macros
Summary: Attempt to edit macro said that there is a name conflict.

Test Plan: Edited macro.

Reviewers: wez, epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3644
2012-10-05 14:14:07 -07:00
vrana
bf98ab5e92 Handle empty array argv in daemon log view 2012-10-05 13:20:44 -07:00
epriestley
5b74b8b765 Add basic "Subscriptions" application
Summary:
Basic infrastructure for generalizing subscriptions/CCs for T1808, T1514 and T1663.

  - Implement `PhabricatorSubscribableInterface` and you'll get a subscribe/unsubscribe button for free.
  - If there are any auto-subscribed users (like the question author) you can specify them; this makes more sense for Tasks and Revisions than Ponder probably, but maybe the author should be auto-subscribed.
  - Subscriptions are either "explicit" (the user clicked 'subscribe') or "implicit" (the user did something which causes them to become subscribed naturally). If a user unsubscribes, they'll no longer be added by implicit subscriptions. This may or may not be relevant to Ponder but is an existing Herald feature in Differential.
  - Helper method on PhabricatorSubscribersQuery to load subscribers.
  - This doesn't handle actually sending email, etc. I think that's all so application-specific that it doesn't belong here.
  - Now seems to work.

Test Plan:
{F20552}
{F20553}

Reviewers: pieter, btrahan

Reviewed By: pieter

CC: aran

Maniphest Tasks: T1663, T1514, T1808

Differential Revision: https://secure.phabricator.com/D3637
2012-10-05 13:18:05 -07:00
Wez Furlong
1fda844c9f Avoid fatal if a macro has no file
Summary:
Not sure how this triggers, but we have a macro that has no file
associated with it, and this caused a fatal on the /macro endpoint.

Test Plan: https://phabricator.fb.com/macro/?page=100

Reviewers: vrana, nh, epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D3642
2012-10-05 13:13:50 -07:00
epriestley
7c0f0807da Use action list and property list elements in Ponder
Summary: This is sort of silly as-is, but automatically exposes flagging and will give subscribe/unsubscribe and "Subscribers" a place to plug into shortly. For context, see D3637 and T1808.

Test Plan: {F20550}

Reviewers: pieter, btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1808

Differential Revision: https://secure.phabricator.com/D3641
2012-10-05 13:12:31 -07:00
Bob Trahan
a754fdfca3 Create metamta.user-address-format configuration option
Summary: this lets users specify what "name" to use in email addresses

Test Plan: changed the conf setting in my local instance and used phabricator. observed name format changes

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1862

Differential Revision: https://secure.phabricator.com/D3639
2012-10-05 11:27:58 -07:00
vrana
c4aaa7291b Display full picture in image macro editing
Summary:
Users are complaining that they don't see how the image macro looks until they use it.
Click leads to edit form.
Display it there.

Test Plan:
Edited macro.
Attempted to create macro with duplicate name.

Reviewers: epriestley

Reviewed By: epriestley

CC: chad, aran, Korvin

Differential Revision: https://secure.phabricator.com/D3636
2012-10-04 18:52:48 -07:00
vrana
dfe5ae08aa Handle empty argv in daemon log view
Summary: This could be empty probably for old logs

Test Plan: Ran the controller.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3633
2012-10-04 17:03:06 -07:00
vrana
511a8bae34 Optimize feed query
Summary:
This was killing us. `EXPLAIN` after:

<table>
<tr><th>id</th><th>select_type</th><th>table</th><th>type</th><th>possible_keys</th><th>key</th><th>key_len</th><th>ref</th><th>rows</th><th>Extra</th></tr>
<tr><td>1</td><td>SIMPLE</td><td>story</td><td>index</td><td>chronologicalKey</td><td>chronologicalKey</td><td>8</td><td></td><td>201</td><td> </td></tr>
<tr><td>1</td><td>SIMPLE</td><td>ref</td><td>ref</td><td>chronologicalKey</td><td>chronologicalKey</td><td>8</td><td>phabricator_feed.story.chronologicalKey</td><td>1</td><td>Using index</td></tr>
</table>

Test Plan: /feed/

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3628
2012-10-04 16:07:39 -07:00
epriestley
5578ccdff2 Expose "withAnyProjects()" in the UI
Summary:
Add an "Any Projects" field to the custom search UI.

This is starting to get ugly but we'll do a design pass on it before toooo long.

Test Plan: {F20423}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1610

Differential Revision: https://secure.phabricator.com/D3632
2012-10-04 15:31:14 -07:00
epriestley
5cbc4fe7e1 Rename ManiphestTaskQuery::withProjects() to withAllProjects()
Summary: After D3630, make the API more clear: withAllProjects() vs withAnyProjects()

Test Plan: Loaded project page, maniphest task query, reports, filtered by project and "noproject". Grep.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1610

Differential Revision: https://secure.phabricator.com/D3631
2012-10-04 15:31:04 -07:00
epriestley
030726b144 Improve implementation of ManiphestTaskQuery
Summary:
Currently, we have a single `projectPHIDs` field, and a separate flag which makes it act like AND or OR.

This is silly. Make two separate methods for setting `AND` vs `OR` projects. This also simplifies the implmentation.

This doesn't change the UI or any behavior (yet), it just makes the API more usable.

Test Plan: Loaded homepage, "All Projects" task view, verified queries made sense and returned correct results. Grepped for changed method name.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1610

Differential Revision: https://secure.phabricator.com/D3630
2012-10-04 15:30:51 -07:00
Bob Trahan
689c98c47c Update database.schema doc to include how to upgrade the schema
Summary: plus update the phid section a little

Test Plan: read it, looked good.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1287

Differential Revision: https://secure.phabricator.com/D3629
2012-10-04 15:26:16 -07:00
vrana
5bde6c71ce Declare used properties
Summary: Also fix couple of other errors.

Test Plan: Executed controllers.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3627
2012-10-04 14:46:06 -07:00
Bob Trahan
84ddc4a0c9 Add a defaulty priority configuration flag for maniphest tasks
Summary: instance-wide this setting be

Test Plan: made a new task and noted the default priority honored what was in btrahan.conf

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1842

Differential Revision: https://secure.phabricator.com/D3626
2012-10-04 14:19:37 -07:00
epriestley
ea32c541e4 Remove all optimistic lock code from Lisk
Summary: We never use this and almost certainly never will. It's been in Lisk for ~7 years but is a solution in search of a problem. It causes a conflict with any DAO that has a `version` column.

Test Plan: Browsed around, performed inserts and updates. Edited a Phriction document.

Reviewers: vrana, btrahan

Reviewed By: btrahan

CC: aran, leslie.chong

Differential Revision: https://secure.phabricator.com/D3625
2012-10-04 13:55:43 -07:00
vrana
fe355f7905 Fix typo in route 2012-10-04 13:52:06 -07:00
Bob Trahan
4c86893108 allow arcanist projects to be deleted via the ui
Summary: tricky part is purging symbols at that time too. override "delete" method to get there, use transactions, etc.

Test Plan: deleted an arcanist project - it worked!

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, mbishopim3

Maniphest Tasks: T1738

Differential Revision: https://secure.phabricator.com/D3613
2012-10-04 13:25:58 -07:00
epriestley
36d02b6c79 Fix a use of $method in Conduit which is not available in scope
Summary:
This got refactored at some point and lost access to $method. Also make the error a little more helpful.

See https://groups.google.com/forum/?fromgroups=#!topic/phabricator-dev/05voYIPV7uU

Test Plan:
  $ arc list --conduit-uri=http://local.aphront.com:8080/
  Exception
  ERR-CONDUIT-CORE: Invalid parameter information was passed to method 'conduit.connect', could not decode JSON serialization. Data: xxx{"client":"arc","clientVersion":5,"clientDescription":"orbital:\/INSECURE\/devtools\/arcanist\/bin\/..\/scripts\/arcanist.php list --conduit-uri=http:\/\/local.aphront.com:8080\/","user":"epriestley","host":"http:\/\/local.aphront.com:8080\/api\/","authToken":1349367823,"authSignature":"54bc136589c076ea06f8e5fb77c76ea7d57aec5b"}
  (Run with --trace for a full exception trace.)

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3622
2012-10-04 09:30:32 -07:00
vrana
4a2bcc06fe Catch unhandled exceptions in index.php
Summary:
When there is an exception in `index.php` then we currently get only blank screen.
Print it instead.

Test Plan: Thrown exceptions on several places of `index.php` and controller, got best results.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3619
2012-10-04 09:10:31 -07:00
vrana
58206a146f Fix displaying gap context when showing first lines
Summary: Show First 20 Lines doesn't display gap context and emits error.

Test Plan: Showed first 20 lines, last 20 lines, middle 20 lines - saw context and no error.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3616
2012-10-04 09:07:47 -07:00
vrana
a185b1b4a7 Include comment drafts in revision draft query
Summary: Previously, only inline comment drafts were included.

Test Plan:
**/differential/** - verified that there are drafts where they weren't before.

Checked executed queries.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3615
2012-10-04 09:07:22 -07:00
vrana
12df076157 Improve error message printed in SEV
Summary:
D3542 caused a SEV for us.
Make it better for future.

Test Plan: SEV

Reviewers: btrahan, epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3614
2012-10-03 20:47:35 -07:00
vrana
7e7a029481 Liberate 2012-10-03 18:23:46 -07:00
Bob Trahan
b440830cb7 Update ponder answer view to use newer fangled abstractions
Summary: also did a wee bit o' formatting stuff while I was in there.

Test Plan: it looks... well, it looks like its using the new UI component and all the information is there!

Reviewers: epriestley, pieter

CC: aran, Korvin

Maniphest Tasks: T1845

Differential Revision: https://secure.phabricator.com/D3611
2012-10-03 16:22:17 -07:00
Bob Trahan
284bf71a8d Fix error when deleting revision
Summary: DifferentialAffectedPath has no id or phid key so delete() won't work and we have to do things this other way.

Test Plan: deleted a few diffs on my test reproduction. aside from warnings about missing keys (epriestley is on it as I write this) no errors found and diff observed as deleted

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1846

Differential Revision: https://secure.phabricator.com/D3610
2012-10-03 15:50:42 -07:00
vrana
1f4c3ee167 Make it obvious how autodetecting language in Paste works
Test Plan: /paste/

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1841

Differential Revision: https://secure.phabricator.com/D3595
2012-10-03 15:48:19 -07:00
vrana
e84c18d734 Mark revision as closed before attaching commit and loading changes
Summary:
D3555 stopped multiple commenting but it still attaches multiple diffs.

Save earlier to stop doing unnecessary work.

Test Plan: Reparsed the same commit twice at the same time.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3598
2012-10-03 15:47:55 -07:00
epriestley
78784aa1fe Group applications into groups on /applications/
Summary: So they're maybe a little easier to deal with? I'm going to take this formally to "plz @chad plz help" land.

Test Plan: {F20329}

Reviewers: btrahan, vrana, chad

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3609
2012-10-03 15:46:19 -07:00
epriestley
fe6022cd97 Load only valid properties in LiskDAO::loadFromArray()
Summary:
Fixes a TODO, and silences a warning introduced by D3601.

There are several cases where we load data like:

  SELECT *, ... AS extraData FROM ...

...and then pass it to `loadAllFromArray()`. Currently, this causes us to set an `extraData` property on the object.

This idiom seems fairly useful and non-dangerous, so I made `loadFromArray()` just drop extra keys.

Since we hit this loop a potentially huge number of times (10,000+ for full Maniphest pages) I did some microoptimization. Lisk is hot enough that it's one of the few places where it's worthwhile (see D1291).

Test Plan: Loaded homepage, no longer got warnings about `viewerIsMember` from Project queries. Browsed ~10 apps, didn't see any issues.

Reviewers: vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3606
2012-10-03 15:42:44 -07:00
epriestley
270256d336 Restore flavor text to applications
Summary: D3581 removed some flavor text. Allow applications to provide flavor text instead of status information if they so desire.

Test Plan: {F20325}

Reviewers: vrana, btrahan

Reviewed By: btrahan

CC: aran, chad

Differential Revision: https://secure.phabricator.com/D3608
2012-10-03 15:16:26 -07:00
vrana
6ee5370a95 Fix height of DarkConsole request log
Summary: When I have displayed DarkConsole and write a comment it keeps scrolling because new AJAX requests pop up.

Test Plan: Displayed it, issued couple of AJAX requests.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1316

Differential Revision: https://secure.phabricator.com/D3605
2012-10-03 15:08:21 -07:00
vrana
422428a135 Declare used property 2012-10-03 13:32:53 -07:00
epriestley
14fe3f5d14 Implement getHelpURI() for new applications
Summary: A bunch of recently-created applications have help available; link to it.

Test Plan: Clicked each app, clicked help link in menu bar, ended up in relevant documentation.

Reviewers: vrana, btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3602
2012-10-03 12:39:18 -07:00
vrana
4682e0c104 Warn against writing to undeclared properties
Summary:
I make this error quite often: I forget to declare a property I am writing to or I make a typo in it.
PHP implicitly creates a public property which I don't like.

I would much rather see a linter warning me against this than this runtime check but writing it is very difficult:

- We need to explore all parents of the class we are checking.
- It is even possible that children will declare that property but it's OK to treat this as error anyway.
- We can extend also builtin or external classes.
- It's somewhat doable for `$this` but even more complex for any `$obj` because we don't know the class of it.

This should catch significant part of these errors and I'm fine with that.

I don't plan escalating to exception because this error is not fatal and should not stop the application from working.

Test Plan: Loaded homepage, checked log.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3601
2012-10-03 11:54:03 -07:00
vrana
7c39c4ca7d Declare common Lisk properties
Summary:
Calling `->setPHID()` or other common Lisk setters creates an implicit public property `$phid`.
I don't like implicit properties and I see them as errors.
Its public visibility also makes me nervous and is vulnerable to bypassing any setters we may create.

Test Plan: Loaded homepage, checked log.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3600
2012-10-03 11:53:37 -07:00
vrana
92aaffd0c5 Fix inconsistence in declared VS used property
Summary: Found by D3601.

Test Plan: Loaded revision.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3603
2012-10-03 11:40:11 -07:00
Aviv Eyal
52c68e1261 File view: Replace drop-down form with buttons for view options
Summary:
It always bothered me that adding/removing blame view takes two clicks.
Showing it like this saves a click for almost all transformations, and I think it feels nicer too.

I'm open to adding a user-setting for this (This form or the drop-down), but figured I'd ask first.

Test Plan:
Use buttons to switch modes - make sure text on button matches action.
Repeate with lines highlighted.

Reviewers: epriestley, vrana

Reviewed By: epriestley

CC: jungejason, Two9A, aran, Korvin

Differential Revision: https://secure.phabricator.com/D3499
2012-10-03 10:59:23 -07:00
vrana
b585146532 Display auditors in audit commit list
Summary: Users wonder who is actually doing all these audits.

Test Plan:
/owners/package/1/
/audit/view/packagecommits/?phid=PHID-OPKG-1

Reviewers: epriestley

Reviewed By: epriestley

CC: jungejason, aran, Korvin

Differential Revision: https://secure.phabricator.com/D3597
2012-10-03 10:41:39 -07:00