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

1501 commits

Author SHA1 Message Date
epriestley
8ae08a3de7 Make "Add Subscribers" and "Remove Subscribers" Herald actions modular
Summary: Ref T8726. Converts these actions to be modular. No real surprises in this change.

Test Plan:
{F658709}

  - Wrote some rules.
  - Migrated them forward.
  - Used a bunch of these rules.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: joshuaspence, epriestley

Maniphest Tasks: T8726

Differential Revision: https://secure.phabricator.com/D13699
2015-08-03 14:33:22 -07:00
lkassianik
930b6fec25 DRAFT - throw together Phurl skeleton.
Summary: DRAFT - throw together Phurl skeleton.

Test Plan: The idea is that `some/long/url` will become `install/Udet4d` and can be viewed and edited at `install/Udet4d/view` and `install/Udet4d/edit`, respectively?

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: joshuaspence, chad, epriestley, Korvin

Maniphest Tasks: T6049

Differential Revision: https://secure.phabricator.com/D13681
2015-07-24 11:06:27 -07:00
Chad Little
ffadf64751 Badges v0.1
Summary:
Basic plumbing for Badges application.

 - You can make Badges.
 - You can look at a list of them.
 - They can be edited.
 - They can be assigned to people.
 - You can revoke them from people.
 - You can subscribe to them.

Test Plan: Make Badges with various options. Give them to people. Take them away from people.

Reviewers: lpriestley, epriestley

Reviewed By: epriestley

Subscribers: tycho.tatitscheff, johnny-bit, epriestley, Korvin

Maniphest Tasks: T6526

Differential Revision: https://secure.phabricator.com/D13626
2015-07-22 13:37:20 -07:00
epriestley
f1222f956a Correctly clear draft markers when deleting an inline comment
Summary:
Fixes T8917. Prior to T2618, deleting inlines prompted users, then really deleted the rows.

After T2618, we delete immediately and offer "Undo". However, some interactions with drafts were missed, and we were only clearing the "this revision has a draft" flag on one of the delete pathways (when you delete all the comment text, then save the comment).

Make both the "Delete" action and the "Delete All Comment Text + Save" workflows do the same thing: mark the row as deleted, and clear any relevant drafts.

Test Plan:
  - Made an inline comment on a clean revision with no "draft comments" marker in the list view.
  - Used "delete" to delete it.
  - After applying the patch, verified that no "draft commetns" marker appears in the list view.
  - Used Delete and Edit + Remove Text + Save to delete comments in Differential and Diffusion.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T8917

Differential Revision: https://secure.phabricator.com/D13665
2015-07-21 11:36:46 -07:00
Chad Little
039be71b87 Fix a phutil_json_decode call in CustomField PHID
Summary: I assume this is correct, it fixes my test case and was inconsistent with the rest of the file.

Test Plan: Add and Remove a CustomFieldPHID in Maniphest, no longer get errors.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8866

Differential Revision: https://secure.phabricator.com/D13642
2015-07-16 21:02:01 -07:00
epriestley
0306eb70ed Group and order Herald fields
Summary:
Ref T8726. Some adapters now have a large number of fields, and we lost the sort-of-human-readable implicit ordering when fields were modularized.

Instead, group and sort fields.

Test Plan: {F603066}

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T8726

Differential Revision: https://secure.phabricator.com/D13619
2015-07-16 14:13:13 -07:00
epriestley
97ccd93670 Support "Select" custom fields in Herald rules
Summary: Fixes T5016. Ref T655. Ref T8434. Ref T8726. For "select" custom fields, permit construction of Herald rules.

Test Plan: {F602997}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T655, T5016, T8434, T8726

Differential Revision: https://secure.phabricator.com/D13618
2015-07-16 14:12:54 -07:00
epriestley
715233fb61 Fully modularize Herald field values
Summary: Ref T8726. This gets rid of all the `VALUE_*` constants and lets Fields provide arbitrary typeaheads without upstream/JS changes.

Test Plan: Used all tokenizers. Used "Another Herald Rule". Grepped for all removed constants.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8726

Differential Revision: https://secure.phabricator.com/D13616
2015-07-16 14:12:44 -07:00
epriestley
9979952e71 Refine "invalid cursor" exception to have a little more information
Summary: Ref T8780.

Test Plan: See @chad.

Reviewers: chad

Reviewed By: chad

Subscribers: chad, epriestley

Maniphest Tasks: T8780

Differential Revision: https://secure.phabricator.com/D13583
2015-07-07 12:52:12 -07:00
Joshua Spence
f695dcea9e Use PhutilClassMapQuery
Summary: Use `PhutilClassMapQuery` where appropriate.

Test Plan: Browsed around the UI to verify things seemed somewhat working.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13429
2015-07-07 22:51:57 +10:00
epriestley
4c23d5cfae Make Herald custom field integration modular
Summary: Ref T8726. The existing implementation is largely made redundant by the newer modular implementation.

Test Plan: Created a custom field rule, set custom field to various values until it matched, saw effect and proper transcripts.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: eadler, joshuaspence, epriestley

Maniphest Tasks: T8726

Differential Revision: https://secure.phabricator.com/D13497
2015-07-06 13:15:58 -07:00
Joshua Spence
f2435fd1d0 Return $this from setter methods
Summary: Return `$this` from setter methods for consistency. I started writing a [[https://secure.phabricator.com/differential/diff/32506/ | linter rule]] to detect this, but I don't think it is trivial to do this properly.

Test Plan: Eyeball it.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13422
2015-07-06 22:53:43 +10:00
Joshua Spence
acb1eb81cc Move some PhabricatorSearchField subclasses
Summary: Move some `PhabricatorSearchField` subclasses to be adjacent to the application to which they belong. This seems generally better to me than lumping them all together in the `src/applications/search/field/` directory. I was also wondering if it makes sense to rename these subclasses as `PhabricatorXSearchField` rather than `PhabricatorSearchXField` (as per T5655), but wasn't really sure if these objects are meant to be search-fields, or just fields belonging to the #search application.

Test Plan: N/A.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13374
2015-07-06 22:52:05 +10:00
Chad Little
54194acd39 [Redesign] Set a max-width on Graphviz
Summary: Ref T8750, Adds a maxwidth class for Graphviz images.

Test Plan: Generate a Graphviz image, really big, see it scale to the viewport.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8750

Differential Revision: https://secure.phabricator.com/D13548
2015-07-04 13:17:12 -07:00
epriestley
fe4bcde59e Merge branch 'master' into redesign-2015 2015-07-03 13:05:16 -07:00
epriestley
bcfbc5cfbf Remove CHECKREQUEST event
Summary: Fixes T8749.

Test Plan: `grep`

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8749

Differential Revision: https://secure.phabricator.com/D13546
2015-07-03 13:03:49 -07:00
epriestley
92b73fed6b Don't apply space constraints to omnipotent-viewer queries
Summary:
Fixes T8743. Fixes T8746. When running queries with the omnipotent viewer and no explicit space constraints, don't add implicit space constraints.

This prevents us from fataling when running older pre-space migrations and trying to load space-aware objects.

Test Plan: Manually ran migrations with `--trace`, verified no `WHERE spacePHID = ...`.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: eadler, epriestley

Maniphest Tasks: T8743, T8746

Differential Revision: https://secure.phabricator.com/D13542
2015-07-03 10:59:48 -07:00
epriestley
f7edabbc6a Merge branch 'master' into redesign-2015 2015-07-01 14:23:01 -07:00
epriestley
d5e4d96086 Don't put objects into the query workspace by default
Summary:
Ref T8731. I think the issue is that some `ProjectQuery` (without needImages()) populates the query workspace, then the "real" one hits the workspace.

Instead, only populate the workspace from ObjectQuery, so we know that objects in the workspace always have whatever ObjectQuery attaches to them.

Test Plan: Verified this didn't destroy the cache hitrate, but I can't repro the original issue locally per se.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: chad, epriestley

Maniphest Tasks: T8731

Differential Revision: https://secure.phabricator.com/D13516
2015-07-01 14:22:48 -07:00
Chad Little
3b755115c2 [Redesgin] Misc Inline Comment tweaks
Summary: Ref T8099. Better alignment with TODO and Ghost Icons.

Test Plan: Test more states of inline comments, ghosts, todos, unsubmitted, etc.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13515
2015-07-01 11:32:32 -07:00
epriestley
4b298c1c44 Merge branch 'master' into redesign-2015 2015-06-30 11:20:16 -07:00
epriestley
4adaf53bf0 Dramatically increase cache hit rate for feed
Summary:
Ref T8631. The query plan for feed stories is really bad right now, because we miss caches we should be hitting:

  - The workspace cache is stored at each query, so adjacent queries can't benefit from the cache (only subqueries). Feed has primarily sibling queries.
    - There is no technical reason to do this. Store the workspace cache on the root query, so sibling queries can hit it.
  - In `ObjectQuery`, we check the workspace once, then load all the PHIDs. When the PHIDs are a mixture of transactions and objects, we always miss the workspace and load the objects twice.
    - Instead, check the workspace after loading each type of object.
  - `HandleQuery` does not set itself as the parent query for `ObjectQuery`, so handles never hit the workspace cache.
    - Pass it, so they can hit the workspace cache.
  - Feed's weird `PhabricatorFeedStory::loadAllFromRows()` method does not specify a parent query on its object/handle queries.
    - Just declare the object query to be the "root" query until this eventually gets cleaned up.

Test Plan: Saw queries for each object drop from 4-6x to 1x in `/feed/`.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8631

Differential Revision: https://secure.phabricator.com/D13479
2015-06-30 11:19:41 -07:00
epriestley
12c6e63d5b Don't put the entire corpus into project edit feed stories
Summary: Fixes T8723. We override timeline titles for these fields to shorten them, but the parent class shows full values for feed edits, which can lead to screen-sized notifications.

Test Plan: Edited a project, saw a reasonably-sized notification for it.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T8723

Differential Revision: https://secure.phabricator.com/D13485
2015-06-30 06:05:30 -07:00
Chad Little
6fef37ddb5 [Redesign] Update Inline Comment UI
Summary: Ref T8099, Simplifies the button bar with a `borderless` option and implements in Differential Inline Commenting.

Test Plan:
Review new and old comments, submitted, unsubmitted, ghosts, done.

{F562765}

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13475
2015-06-29 14:42:29 -07:00
epriestley
729606ba93 Update BulkJob and MetaMTA search engines for redesign-2015 2015-06-23 13:39:27 -07:00
epriestley
075f041bec Merge branch 'master' into redesign-2015 2015-06-23 13:36:47 -07:00
epriestley
3215899925 Execute Maniphest batch edits in the background with a web UI progress bar
Summary:
Ref T8637. This does nothing interesting, just has empty scaffolding for a bulk job queue.

Basic idea is that when you do something like a batch edit in Maniphest, we:

  - Create a BulkJob with all the details.
  - Queue a worker to start the job.
  - Send you to a progress bar page for the job.

In the background:

  - The "start job" worker creates a ton of Task objects, then queues worker tasks to do the work.

In the foreground:

  - Fancy ajax animates the progress bar and it goes wooosh.

In general:

  - Big jobs actually work.
  - Jobs get logged.
  - You can monitor jobs.
  - Terrible junk like T8637 should be much harder to write and much easier to catch and diagnose.

Test Plan:
No interesting code/beahavior yet. Clean `storage adjust`.

{F526411}

Reviewers: chad, btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8637

Differential Revision: https://secure.phabricator.com/D13392
2015-06-23 13:36:16 -07:00
epriestley
716bd4e4b4 Improve lint/unit limit, sort, view all, collapse behaviors
Summary:
Ref T8096. Various tweaks here:

  - Sort result lists by importance (even lint -- "errors first" seems better than "alphabetical by file", I think?).
  - Do sane stuff with display limits.
  - Add a "view all" view.
  - Don't show a huge table of passing tests in Differential.
  - Link to full results.

Test Plan: See screenshots.

Reviewers: chad, btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8096

Differential Revision: https://secure.phabricator.com/D13407
2015-06-23 13:34:25 -07:00
epriestley
7d7e13d79b Merge branch 'master' into redesign-2015 2015-06-19 08:33:30 -07:00
Joshua Spence
68bb60e52f Use PhutilConsoleTable in ./bin/storage probe
Summary: Fixes T8477. Use `PhutilConsoleTable` to render the output from `./bin/storage probe`.

Test Plan: Ran `./bin/storage probe` and saw tabulated output.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T8477

Differential Revision: https://secure.phabricator.com/D13339
2015-06-19 13:09:22 +10:00
Joshua Spence
7f6508af5a Add missing execution on archived task query
Summary: Fixes T8599. I'm not sure how to reproduce the original issue, but I'm fairly confident that the issue is that the issue is that `execute()` is not called on the query object.

Test Plan: Created a Harbormaster build plan with a single "Lease Host" step. Ran `./bin/harbormaster build --plan 1 D1` from the command line and hit the exception as described in T8599. Applied patch and hit a different exception (which I think is just because I don't know how to use #drydock and #harbormaster).

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: hach-que, epriestley, Korvin

Maniphest Tasks: T8599

Differential Revision: https://secure.phabricator.com/D13335
2015-06-18 22:40:05 +10:00
Joshua Spence
4761cb8d73 Use PhutilInvalidStateException
Summary: Use `PhutilInvalidStateException` where appropriate.

Test Plan: Eyeball it.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13327
2015-06-18 07:09:02 +10:00
epriestley
f1b7fd483e Merge branch 'master' into redesign-2015 2015-06-16 19:34:36 -07:00
epriestley
6933ee5fb8 Don't spend ridiculous amounts of time rebuilding orderable columns
Summary:
Ref T8575. Because orderable columns need to build custom fields, they are relatively expensive to build. Use the request cache.

(The request cache is technically more correct than `static`, because configuration may change between requests and we may eventually reuse interpreters.)

Test Plan: Saw home page time drop 39% (from 462ms to 283ms).

Reviewers: btrahan, avivey

Reviewed By: avivey

Subscribers: avivey, epriestley

Maniphest Tasks: T8575

Differential Revision: https://secure.phabricator.com/D13322
2015-06-16 19:32:58 -07:00
epriestley
8484adcffd Cache application visibility in the request cache
Summary: Ref T8575. We check if users can see applications frequently, and caching on the Query isn't especially effective. Use the new Request cache instead.

Test Plan:
  - Saw `/feed/` drop 7% (from ~830ms to ~770ms) on profiles.

Reviewers: btrahan, avivey

Reviewed By: avivey

Subscribers: avivey, epriestley

Maniphest Tasks: T8575

Differential Revision: https://secure.phabricator.com/D13321
2015-06-16 19:32:37 -07:00
Joshua Spence
6b7d7401ca Modernize Diviner
Summary:
Ref T4558. This diff modernizes the #diviner application. Basically:

  - Add an edit controller, accessible at `/book/$BOOK/edit/`.
  - Add edit/view policies.
  - Added an action menu to the `DivinerBookController` to expose the edit interface.
  - Allows projects to be associated with books.
  - Implement edges and transactions.
  - Implemented `PhabricatorApplicationTransactionInterface` in `DivinerLiveBook`.

Test Plan:
  - Generated a Diviner book with `./bin/diviner generate`.
  - Added projects to a book and ensured that they persisted.
  - Changed the view policy on a book and made sure it was effective.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T4558

Differential Revision: https://secure.phabricator.com/D13091
2015-06-17 07:17:14 +10:00
epriestley
6af1c02f06 Merge branch 'master' into redesign-2015 2015-06-15 14:06:59 -07:00
epriestley
c2a2933848 Add missing property on PhabricatorBot
Auditors: joshuaspence
2015-06-15 13:53:18 -07:00
epriestley
53ef057b1b Merge branch 'master' into redesign-2015 2015-06-15 08:06:23 -07:00
epriestley
5878500e1f Fix missing property on PhabricatorYoutubeRemarkupRule
Fixes T8545.

Auditors: joshuaspence
2015-06-15 06:30:10 -07:00
Joshua Spence
b95fc8ba5d Fix another undeclared property
This was reported in IRC, see https://secure.phabricator.com/chatlog/channel/6/?at=204524.

Auditors: epriestley
2015-06-15 18:41:09 +10:00
Joshua Spence
1239cfdeaf Add a bunch of tests for subclass implementations
Summary: Add a bunch of tests to ensure that subclasses behave.

Test Plan: `arc unit`

Reviewers: eadler, #blessed_reviewers, epriestley

Reviewed By: eadler, #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13272
2015-06-15 18:13:27 +10:00
Joshua Spence
b6d745b666 Extend from Phobject
Summary: All classes should extend from some other class. See D13275 for some explanation.

Test Plan: `arc unit`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13283
2015-06-15 18:02:27 +10:00
epriestley
2fbc65e396 Call didRejectResult() in DiffusionCommitQuery properly
Summary:
Ref T4345. This error is per object-type in the query implementations, not a mail/permissions issue.

Without `didRejectResult()`, we can't distinguish between "restricted" and "unknown" for objects filtered by `willFilterPage()`.

  - Call `didRejectResult()` on commits.
  - Make `didRejectResult()` handle both existing policy exceptions and filtering.
  - Recover from partial objects (like commits) which are missing attached data required to figure out policies.

Test Plan: Saw "Restricted Diffusion Commit" instead of "Unknown Object (Diffusion Commit)" when viewing nonvisible commit handle in Maniphest.

Reviewers: btrahan, joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Maniphest Tasks: T4345

Differential Revision: https://secure.phabricator.com/D13289
2015-06-14 15:35:32 -07:00
Joshua Spence
32f4c962fc Remove "@stable" annotations
Summary: See D13285.

Test Plan: N/A

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13287
2015-06-15 07:55:08 +10:00
Joshua Spence
57e7c7c706 Tidy up some translation strings
Summary: Parameterize command names in translation strings.

Test Plan: Eyeball it.

Reviewers: #blessed_reviewers, epriestley, eadler

Reviewed By: #blessed_reviewers, epriestley, eadler

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13270
2015-06-14 14:13:16 +10:00
Joshua Spence
ea7397f7e4 Rename PassphraseCredentialType subclasses for consistency
Summary: Ref T5655.

Test Plan: `arc unit` + `grep`

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T5655

Differential Revision: https://secure.phabricator.com/D13266
2015-06-14 14:11:55 +10:00
epriestley
88e7cd158f Allow Spaces to be archived
Summary:
Ref T8377. This adds a standard disable/enable feature to Spaces, with a couple of twists:

  - You can't create new stuff in an archived space, and you can't move stuff into an archived space.
  - We don't show results from an archived space by default in ApplicationSearch queries. You can still find these objects if you explicitly search for "Spaces: <the archived space>".

So this is a "put it in a box in the attic" sort of operation, but that seems fairly nice/reasonable.

Test Plan:
  - Archived and activated spaces.
  - Used ApplicationSearch, which omitted archived objects by default but allowed searches for them, specifically, to succeed.
  - Tried to create objects into an archived space (this is not allowed).
  - Edited objects in an archived space (this is OK).

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8377

Differential Revision: https://secure.phabricator.com/D13238
2015-06-11 10:13:47 -07:00
epriestley
57b898af9a Merge branch 'master' into redesign-2015 2015-06-10 07:44:58 -07:00
Joshua Spence
f47e69c015 Mark some strings for translation
Summary: Add some more `pht`izations.

Test Plan: Eyeball it.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: hach-que, Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D13200
2015-06-09 23:06:52 +10:00