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

9371 commits

Author SHA1 Message Date
epriestley
944539a786 Simplify locking of Almanac cluster services
Summary:
Fixes T6741. Ref T10246. Broadly, we want to protect Almanac cluster services:

  - Today, against users in the Phacility cluster accidentally breaking their own instances.
  - In the future, against attackers compromising administrative accounts and adding a new "cluster database" which points at hardware they control.

The way this works right now is really complicated: there's a global "can create cluster services" setting, and then separate per-service and per-device locks.

Instead, change "Can Create Cluster Services" into "Can Manage Cluster Services". Require this permission (in addition to normal permissions) to edit or create any cluster service.

This permission can be locked to "No One" via config (as we do in the Phacility cluster) so we only need this one simple setting.

There's also zero reason to individually lock //some// of the cluster services.

Also improve extended policy errors.

The UI here is still a little heavy-handed, but should be good enough for the moment.

Test Plan:
  - Ran migrations.
  - Verified that cluster services and bindings reported that they belonged to the cluster.
  - Edited a cluster binding.
  - Verified that the bound device was marked as a cluster device
  - Moved a cluster binding, verified the old device was unmarked as a cluster device.
  - Tried to edit a cluster device as an unprivileged user, got a sensible error.

{F1126552}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T6741, T10246

Differential Revision: https://secure.phabricator.com/D15339
2016-02-25 03:38:39 -08:00
Chad Little
be0e84a81a Fix Ponder Exception, spacing
Summary: Evidently I only tested adding a question, not an answer. Properly set the getter. Also, fixed some header spacing.

Test Plan: Add a question, add an answer. See everything work, proper spacing.

Reviewers: epriestley, avivey

Reviewed By: avivey

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15341
2016-02-23 20:37:58 -08:00
Chad Little
e9f4ca6ca3 Redesign PonderQuestionView
Summary: Full new UI, testing some upcoming treatments for consideration in other View controllers. Small tweaks to allow PHUITwoColumnView to have fixed and fluid width, and let TransactionCommentView go fullWidth.

Test Plan:
Tested a number of Ponder cases, New Question, with and without summary, with and without answers, with and without comments. Mobile, Tablet, and Desktop layouts. Verify Project and Profile UI's still in tact.

{F1120961}

{F1120962}

{F1120963}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15315
2016-02-23 17:20:07 -08:00
epriestley
9baae00fbd Fix a couple of column editing issues
Summary:
Ref T10349.

  - Don't show subproject columns on "Manage Board".
  - Fix "Edit Column" for milestone columns (allows you to set points, but not rename).

Test Plan:
  - Viewed "Manage Board" on a project with subprojects.
  - Edited a milestone column and set a point limit.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10349

Differential Revision: https://secure.phabricator.com/D15338
2016-02-23 14:45:05 -08:00
epriestley
ee6070a984 Add a couple of missing needProperties() Almanac calls
Summary: Fixes T10432. I missed these in making properties non-default.

Test Plan: Diffusion now works again in a cluster configuration.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10432

Differential Revision: https://secure.phabricator.com/D15337
2016-02-23 13:50:49 -08:00
epriestley
76d4e85bfc Only hide archived project tags on workboard cards
Summary: Fixes T10413. I accidentally hid these //everywhere//, but only intended to hide them on workboards.

Test Plan:
  - Viewed a workboard, saw un-archived projects only.
  - Viewed a task detail page, saw archived and un-archived projects.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10413

Differential Revision: https://secure.phabricator.com/D15335
2016-02-23 10:47:27 -08:00
epriestley
a112bc5cba Sort Spaces dropdown by name, not "alphabetical ID"
Summary:
Fixes T10414. I think this sorted by name at one time (the `asort()`) but then I probably added "Space SX" in front of it. Or I just got this wrong from the beginning.

Instead, sort by space name.

Test Plan: {F1126034}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10414

Differential Revision: https://secure.phabricator.com/D15334
2016-02-23 10:41:49 -08:00
epriestley
0799c91822 In Maniphest tasks, only move old owner to CC if owner changed
Summary:
Fixes T10426. When the owner of a task changes, we try to add the old owner to CC so they're kept in the loop.

Currently, we do this unconditionally. This can add the owner as a subscriber when someone didn't change anything, which is confusing.

Instead, only do this if the owner actually changed.

Test Plan:
  - With "A" as owner, edited task and saved.
    - Before patch, A was added as subscriber.
    - After patch, A not added.
  - With "A" as owner, changed owner to "B" and saved.
    - Both before and after patch, "A" is added as a subscriber.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10426

Differential Revision: https://secure.phabricator.com/D15333
2016-02-23 10:10:20 -08:00
Chad Little
2cdc40eb00 Fix description variable on Blog manage page
Summary: Properly set description variable.

Test Plan: Visit blog manage page.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15332
2016-02-23 08:55:23 -08:00
epriestley
f7d5904e4b Expose modern *.search Conduit endpoints in Almanac
Summary: Fixes T10411. Ref T10246. There are probably still some rough edges with this, but replace the old-school endpoints with modern ones so we don't unprototype with deprecated stuff.

Test Plan:
  - Made a bunch of calls to the new endpoints with various constraints/attachments.
  - Created and edited services, devices, interfaces, bindings, and properties on everything.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10246, T10411

Differential Revision: https://secure.phabricator.com/D15329
2016-02-23 08:20:57 -08:00
Chad Little
023cfbb23a Restrict PropertyListView width to just DocumentProView
Summary: Fixes T10409. Long term need to build a proper "PageEngine" of sorts for layouts not needing special magic. For now this just affects a few applications.

Test Plan: View Diffusion, Phriction, Phame, Legalpad, Diviner.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T10409

Differential Revision: https://secure.phabricator.com/D15328
2016-02-22 11:54:23 -08:00
epriestley
24104be67d Use EditEngine for Almanac Services, Devices, and Networks
Summary:
Ref T10411. This cleans up / modernizes things and lets me get an `almanac.network.edit` API in the future.

This is mostly straightforward, except that Services have an extra "choose type" screen in front of them.

Test Plan:
  - Created and edited Almanac networks, services, and devices.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10411

Differential Revision: https://secure.phabricator.com/D15326
2016-02-22 11:28:38 -08:00
epriestley
ab86523ac4 Allow Almanac properties to be deleted, use EditEngine instead of CustomField
Summary:
Fixes T10410. Immediate impact of this is that you can now actually delete properties from Almanac services, devices and bindings.

The meat of the change is switching from CustomField to EditEngine for most of the actual editing logic. CustomField creates a lot of problems with using EditEngine for everything else (D15326), and weird, hard-to-resolve bugs like this one (not being able to delete stuff).

Using EditEngine to do this stuff instead seems like it works out much better -- I did this in ProfilePanel first and am happy with how it looks.

This also makes the internal storage for properties JSON instead of raw text.

Test Plan:
  - Created, edited and deleted properties on services, devices and bindings.
  - Edited and reset builtin properties on repository services.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10410

Differential Revision: https://secure.phabricator.com/D15327
2016-02-22 11:28:26 -08:00
epriestley
411331469a Apply namespace locking rules in Almanac
Summary:
Ref T10246. Ref T6741.

When you have a namespace like "phacility.net", require users creating services and devices within it to have edit permission on the namespace.

This primarily allows us to lock down future device names in the cluster, so instances can't break themselves once they get access to Almanac.

Test Plan:
  - Configured a `phacility.net` namespace, locked myself out of it.
  - Could not create new `stuff.phacility.net` services/devices.
  - Could still edit existing devices I had permission for.
  - Configured a `free.phacility.net` namespace with more liberal policies.
  - Could create `me.free.phacility.net`.
  - Still could not create `other.phacility.net`.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T6741, T10246

Differential Revision: https://secure.phabricator.com/D15325
2016-02-22 04:58:53 -08:00
epriestley
db50d0fb11 Rough-in Almanac namespaces
Summary:
Ref T6741. Ref T10246.

Root problem: to provide Drydock in the cluster, we need to expose Almanac, and doing so would let users accidentally or intentionally create a bunch of `repo006.phacility.net` devices/services which could conflict with the real ones we manage.

There's currently no way to say "you can't create anything named `*.blah.net`". This adds "namespaces", which let you do that (well, not yet, but they will after the next diff).

After the next diff, if you try to create `repo003.phacility.net`, but the namespace `phacility.net` already exists and you don't have permission to edit it, you'll be asked to choose a different name.

Also various modernizations and some new docs.

Test Plan:
  - Created cool namespaces like `this.computer`.
  - Almanac namespaces don't actually enforce policies yet.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T6741, T10246

Differential Revision: https://secure.phabricator.com/D15324
2016-02-22 04:58:35 -08:00
epriestley
50debecf52 Allow Almanac namespaces to be searched by ngram index
Summary: Ref T6741. Ref T10246. This is largely modernization, but will partially support namespace locking in Almanac.

Test Plan:
Searched for Almanac networks by name substring.

{F1121740}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T6741, T10246

Differential Revision: https://secure.phabricator.com/D15322
2016-02-22 04:58:18 -08:00
epriestley
959bb16d0f Allow Almanac services to be searched by substring
Summary: Ref T10246. Build an ngram index for Almanac services, and use it to support improved search.

Test Plan: {F1121725}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10246

Differential Revision: https://secure.phabricator.com/D15321
2016-02-22 04:58:03 -08:00
Ben Alpert
31927476e3 Reorder audit actions to match Differential
Summary:
These trip me up every time because Differential has:

> Comment, Accept, Request Changes, Resign, Commandeer, Add Reviewers, Add Subscribers

while audits currently show:

> Comment, Add Subscribers, Add Auditors, Accept, Raise Concern, Resign

Now they're more or less in the same order which helps with muscle memory.

Test Plan: Careful inspection.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15323
2016-02-21 12:16:04 -08:00
epriestley
22d2b7ed04 Allow Almanac interfaces to be browsed
Summary:
Fixes T10205. Ref T10246. Previously, the issue was that the result set was not ordered, so "More Results" would not have been able to work in a reasonable way if there were more than 100 matching interfaces.

You would have seen 100 interfaces more or less at random, then clicked "more" and gotten 100 more random interfaces.

Now, you would see 100 "a" interfaces, then click more to get the next 100 alphabetical interfaces (say, "b" and "c" interfaces).

Test Plan:
  - Clicked browse when binding an interface.
  - Got a browse dialog.
  - Artificially set query limit to 1, paged through "local" interfaces in an ordered, consistent way.

{F1121313}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10205, T10246

Differential Revision: https://secure.phabricator.com/D15320
2016-02-21 10:45:00 -08:00
epriestley
1b6ddae6b2 Allow Almanac devices to be queried and sorted by name
Summary:
Ref T10205. Ref T10246. This is general modernization, but also supports fixing the interface datasource in T10205.

  - Update Query.
  - Update SearchEngine.
  - Use an ngrams index for searching names efficiently.

Test Plan:
  - Ran migrations.
  - Searched Almanac devices by name.
  - Created a new device, searched for it by name.

{F1121303}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10205, T10246

Differential Revision: https://secure.phabricator.com/D15319
2016-02-21 10:44:46 -08:00
Chad Little
929b4ccb5c Remove Similar Questions column from Ponder
Summary: Not terribly useful. Also removed close your stuff reminder.

Test Plan: View question I asked and strangers question. Both layout more normal like.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15312
2016-02-19 14:55:55 -08:00
epriestley
50f910ce67 Always install the "icon" and "emoji" remarkup rules
Summary: Ref T10394. Currently, these rules are only active if the Macro application is installed. Instead, install them unconditionally.

Test Plan:
  - Used `{icon camera}` with Macro installed and uninstalled.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10394

Differential Revision: https://secure.phabricator.com/D15311
2016-02-19 11:51:53 -08:00
Chad Little
5eecff91cd Move Diffusion ReadmeView to PHUIDocumentProView
Summary: Swapping out to PHUIDocumentProView to remove all calls to PHUIDocumentView.

Test Plan: Review the Phabricator Readme.MD in Diffusion

Reviewers: epriestley, avivey

Reviewed By: avivey

Subscribers: avivey, Korvin

Differential Revision: https://secure.phabricator.com/D15308
2016-02-19 04:18:33 +00:00
epriestley
af1fef242c Fix an issue with editing pre-space objects using a form with no visibility controls
Summary:
WMF ran into this after their update. Here's the setup:

  - When you enable Spaces, we leave all existing objects set to `null`, which means "these belong to the default space". This is so we don't have to go update a trillion objects.
  - New objects get set to the default space explicitly (`PHID-SPCE-...`) but older ones stay with `null`.
  - If you edit an older object (like a task) from the time before Spaces, //and// the form doesn't have a Visbility/Spaces control, we would incorrectly poplate the value with `null` when the effective value should be the default space PHID.
  - This caused a "You must choose a space." error in the UI.

Instead, populate the control with the effective value instead of the literal database value. This makes the edit go through cleanly.

Also add a note about this for future-me.

Test Plan:
  - Disabled "Visibility" control in task edit form.
  - Edited an old task which had `null` as a `spacePHID` in the database.
  - Before patch: UI error about selecting a Space.
  - After patch: edit goes through cleanly.

Reviewers: chad, 20after4

Reviewed By: chad, 20after4

Subscribers: 20after4, aklapper

Differential Revision: https://secure.phabricator.com/D15306
2016-02-18 11:15:40 -08:00
epriestley
dc7d0b4a56 Make repository callsigns optional
Summary:
Ref T4245. This could still use a little UI smoothing, but:

  - Don't require a callsign on the create flow (you can add one later in "Edit Basic Information" if you want).
  - Allow existing callsigns to be removed.

Test Plan:
  - Created a new repository with no callsign.
  - Cloned it; pushed to it.
  - Browsed around Diffusion a bunch.
  - Visited a commit URI.
  - Added a callsign to it.
  - Removed the callsign again.
  - Referenced it with `R22` in remarkup.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D15305
2016-02-18 10:36:13 -08:00
epriestley
dfc8f8bcb4 Make callsigns editable on repository basic information
Summary:
Ref T4245. This is a prelude to removing them from the "create" screen.

Currently, if you try to delete the callsign you get an unceremonious database error, but the next diff (or maybe two) will permit that, so I didn't put any "this is required yada yada" text in.

This could also maybe use some big flashing warning lights and a "if you edit this, all your URIs break" but I'll save that for later.

Test Plan: Changed the callsign for a repository.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D15304
2016-02-18 10:34:32 -08:00
epriestley
b63eb09cac Don't require a callsign to set a repository's local path
Summary: Ref T4245. When creating new repositories, set a default local path based on the repository ID instead of callsign.

Test Plan:
  - Created a new repository.
  - Saw it get a reasonable, ID-based local path.
  - Edited a repository to make sure the `applyFinalEffects()` wasn't doing anything whacky.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D15303
2016-02-18 10:33:10 -08:00
epriestley
74a79aa634 Make serving repositories work with alternate URIs
Summary: Ref T4245. Consolidates the URI parsing/rewriting logic so that repositories can be served from either `/diffusion/XYZ/` or `/diffusion/123/`, over both HTTP and SSH.

Test Plan:
  - Pulled a Git repository by ID and callsign over HTTP and SSH.
  - Pulled a Mercurial repository by ID and callsign over HTTP and SSH.
  - Pulled a Subversion repository by ID and callsign over SSH (no HTTP support for SVN).

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D15302
2016-02-18 10:06:03 -08:00
epriestley
c2b8dd28d8 Support ID-based repository URIs, and canonicalize repository URIs
Summary:
Ref T4245. Make `/diffusion/123/` work, but redirect the user to `/diffusion/XYZ/` if the repository has a callsign.

(Right now, every repository has a callsign, so this always redirects.)

Also redirect `/R123:abcdef` if the repository has a callsign.

Also also, move the Pull garbage collector somewhere more sensible.

Test Plan:
  - Added test coverage.
  - Visited `/diffusion/1/`, was redirected.
  - Visited `/diffusion/R1:abcdef`, was redirected.
  - Browsed Diffusion normally.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D15301
2016-02-18 09:56:28 -08:00
Alex Monk
f557fc9caa Return 404 instead of undefined variable error when trying to edit a non-existent form
Summary: E.g. https://phab-01.wmflabs.org/transactions/editengine/transactions.editengine.config/view/13/

Test Plan:
* Go to /transactions/editengine/transactions.editengine.config/view/1000000/
* Observe error
* Apply patch
* Observe 404

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D15307
2016-02-18 09:54:47 -08:00
epriestley
82ca92a9ef Don't show archived project tags on workboard cards
Summary: Ref T10349.

Test Plan:
  - Added archived and unarchived project tags to a task.
  - Saw unarchived tags, only, on cards.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10349

Differential Revision: https://secure.phabricator.com/D15297
2016-02-17 19:06:27 -08:00
epriestley
097bcb3970 Make bin/diviner generate --repository <repository> accept identifiers
Summary: Ref T4245. This currently accepts only callsigns; prepare it for the bright new callsign-optional world.

Test Plan:
  - Ran `./bin/diviner generate --repository 1 --book src/docs/book/flavor.book --clean`, got a good result.
  - Ran `./bin/diviner generate --repository 239238 --book src/docs/book/flavor.book --clean`, got an appropraite error about a bad repository identifier.

Reviewers: chad, avivey

Reviewed By: avivey

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D15296
2016-02-17 17:23:35 -08:00
epriestley
93d7b01222 Remove uncalled DiffusionRequest->getCallsign()
Summary: Ref T4245. This has no callers.

Test Plan:
  - Ran `git grep -i 'getCallsign('` and visually verified that no callers could reasonably be `DiffusionRequest` objects (there are only 23 remaining sites, and about half are `$this->...` in `PhabricatorRepository`.
  - Browsed around directory/file/branch/content/diff/etc pages in Diffusion.

Reviewers: chad, avivey

Reviewed By: avivey

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D15295
2016-02-17 17:17:35 -08:00
epriestley
925a0d3d59 Pass repository PHID to custom hooks in PHABRICATOR_REPOSITORY instead of callsign
Summary:
Ref T4245. We pass this exclusively for use by additional third-party hooks.

This is technically a backward compatibility break, but I suspect it doesn't affect anyone:

  - Probably almost no one is using this (there are few reasons to, even for the tiny number of installs with custom commit hooks).
  - If they are, there's a good chance the PHID will work anyway, since nearly all scripts and Conduit methods will accept it in place of a callsign now, and if it's in logging or debugging code the PHID is a reasonable substitute
  - Even if it doesn't just keep working, the break should be very obvious in most reasonable cases.

I'll call this out explicitly in the changelog, though -- almost everything else will just continue working, but this is a strict compatibility break.

Test Plan:
  - Ugh.
  - Picked a hosted Git repo out of Diffusion.
  - Went to the path on disk.
  - Went into `hooks/`.
  - Went into `pre-receive-phabricator.d/`.
  - Wrote this hook and gave it `chmod +x`:

```name=stuff.sh
#!/bin/sh

echo $PHABRICATOR_REPOSITORY >> /tmp/stuff.log
```

  - Pushed to the repository.
  - Saw a PHID show up in the log:

```
$ cat /tmp/stuff.log
PHID-REPO-bqkcdp47euwnwlasrsrh
```

Reviewers: chad, avivey

Reviewed By: avivey

Subscribers: avivey

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D15294
2016-02-17 17:10:44 -08:00
epriestley
973b8ace86 Remove dependence on callsigns from bin/commit-hook
Summary:
Ref T4245. Two effects:

  - First, let hooks work for future repositories without callsigns.
  - Second, provide a better error when users push directly to hosted repositories.

Test Plan: Ran `bin/commit-hook PHID-REPO-xxx`.

Reviewers: chad, avivey

Reviewed By: avivey

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D15293
2016-02-17 16:50:36 -08:00
Chad Little
f5e2f9587c Add setHeader to PHUITwoColumnView for consistent page layouts
Summary: Working towards making PHUITwoColumnView into a page layout engine. Adds header support.

Test Plan: Use new header on Profile and Profiles. No visual changes, less duplicated code.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15292
2016-02-17 13:09:10 -08:00
Chad Little
12d8520059 Convert PHUIObjectBoxView to AphrontTagView
Summary: Attempting to clean PHUIObjectBoxView up a little as well as finally being able to `addClass` on the sucker. I'm running into some issue with `addTabs` though, which on Files isn't firing.

Test Plan: Bounce around tons of screens.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15291
2016-02-17 12:54:56 -08:00
epriestley
9a16e5c1aa Allow users to seach for projects by watcher
Summary:
Ref T10349. This capability didn't make a ton of sense when you had to be a member to watch a project and watch rules were simple, but makes more sense now.

A particular use case might be finding all the stuff you're watching so you can prune it.

Test Plan: Searched for stuff I was watching, got accurate results.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10349

Differential Revision: https://secure.phabricator.com/D15289
2016-02-17 11:47:55 -08:00
Chad Little
8c3ca2a729 Add ability to setActionList to a PHUIHeaderView
Summary: We're using this a little more, so I'd prefer less copy-pasta and one place to manage the UI. Maybe add a caret?

Test Plan: grep for 'Actions', test Phriction, Diviner, ect, Action Menus.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15288
2016-02-16 20:00:39 -08:00
Eitan Adler
73bab57160 fix the typo in the label field
Summary: Fixes T10369

Test Plan: de nada

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Maniphest Tasks: T10369

Differential Revision: https://secure.phabricator.com/D15285
2016-02-16 15:14:19 -08:00
epriestley
c6d91938e8 Show first 10 branches, then "More Branches" for commits on huge numbers of branches
Summary: Fixes T9562. We already do this for tags, but didn't have similar logic for branches. Implement that logic.

Test Plan:
  - Set limit to 1, saw "More branches", clicked it, got the correct results.
  - Verified that branch table with no specified commit still works properly.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9562

Differential Revision: https://secure.phabricator.com/D15284
2016-02-16 15:10:01 -08:00
Chad Little
71be2b06a8 Add Workboard UI Color to sidenav, fix fullscreen CSS
Summary: Uses the background color changes to show also on the side nav. Places color on entire body so fullscreen doesn't show other body color.

Test Plan: Review various workboard colors at normal and fullscreen

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15283
2016-02-16 14:32:26 -08:00
epriestley
58c2141ffd Fix limit calculation for largeish Mercurial repsositories
Summary:
Fixes T10304. In Mercurial, we must enumerate the whole file tree. Currently, we incorrectly count files within directories (which won't be shown) toward the "100 file" limit at top level, so directories with more than 100 subpaths are truncated improperly.

This is approxiately the same as @richardvanvelzen's fix.

Test Plan: Viewed a large Mercurial repository, saw a complete directory listing.

Reviewers: chad

Reviewed By: chad

Subscribers: richardvanvelzen

Maniphest Tasks: T10304

Differential Revision: https://secure.phabricator.com/D15282
2016-02-16 14:14:59 -08:00
Chad Little
f35509e30e Update to use PHUIRemarkupView everywhere possible
Summary: Moves all the one off object calls to PHUIRemarkupView, adds a "Document" call as well (future plans).

Test Plan: Visited most pages I could get access to, but may want extra careful eyes on this diff.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15281
2016-02-16 14:05:53 -08:00
epriestley
376c85a828 Make subproject/milestone watch rules work better
Summary:
Ref T10349. These got sort of half-weirded-up before I separated subscriptions and watching fully. New rules are:

  - You can watch whatever you want.
  - Watching a parent watches everything inside it.
  - If you're watching "Stonework" and go to "Stonework > Masonry", you'll see a "Watching Ancestor" hint to let you know you're already watching a parent or ancestor.

Test Plan:
  - Watched and unwatched "Stonework".
  - Watched and unwatched "Stonework > Iteration IV".
  - While watching "Stonework", visited "Iteration IV" and saw "Watching Ancestor" hint.
  - Created a task tagged "Stonework > Iteration IV". Got notified about it because I watch "Stonework".

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10349

Differential Revision: https://secure.phabricator.com/D15280
2016-02-16 10:42:07 -08:00
Chad Little
0e5cd478c4 Move rgba rules into CelerityDefaultPostprocessor
Summary: Should make it simpler here to have more `rgba` rules in CSS for things like hovers, selected states. Maybe only use `rgb` colors? Color pallette probably needs an overhaul.

Test Plan: Bounce around random pages, buttons, menus. Everything appears normal.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15273
2016-02-16 09:54:43 -08:00
epriestley
483d90fac1 Allow workboard background colors to be configured
Summary:
Adds a UI for selecting background colors.

You can choose "Use Parent", which is the default, and allows you to set a color that all descendants inherit.

You can also choose "None", if a parent has a WHACKY BACKGROUND that you refuse to put up with.

Test Plan:
{F1114588}

{F1114589}

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15279
2016-02-16 08:15:12 -08:00
epriestley
5a44c85b6b Move uncommon workboard management options to "Manage Board" view
Summary:
This gives us room for less-common workboard management options like "Disable Board" without overloading the menus on the main board.

Particularly, we can add background color options here without anything getting weird.

I've left "Add Column" on the main UI since I think it's common enough to leave there. We could probably move "Hide Column" to this UI in the future, though.

Test Plan: {F1114475}

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15278
2016-02-16 08:13:31 -08:00
epriestley
e4690a3854 Fix an issue where newly created tasks could appear at the bottom of columns
Summary:
Ref T10349. At HEAD, if you create a task //on a board//, it floats to the top correctly.

If you create a task elsewhere and tag it with the board, you were subject to the whims of the layout engine and it would generally end up on the bottom.

Instead, make the rules consistent so that "virtual" positions (of tasks which haven't been committed to a particular position yet) still float to the top.

Test Plan:
  - Created tasks from a board.
  - Created tasks from Maniphest, then looked at them on a board.
  - Moved tasks around.
  - In all cases, newly created tasks floated to the top.
  - Sorted by natural and priority.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10349

Differential Revision: https://secure.phabricator.com/D15276
2016-02-15 15:18:05 -08:00
epriestley
53b963efdb Process slowvote description as remarkup (link images, activate mentions, etc)
Summary: Fixes T10361.

Test Plan:
  - Created a poll with an embedded file and a mention of a task.
  - Verified file was attached properly.
  - Verified mention appeared on task.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10361

Differential Revision: https://secure.phabricator.com/D15277
2016-02-15 15:17:32 -08:00
epriestley
71ee97d74f Give Owners real view and edit policies
Summary: Fixes T10360. In modern code, most of the meat is automatic.

Test Plan:
  - Edited view policy and edit policy from web UI.
  - Viewed package, saw policy badge in header.
  - Tried to edit a package as a user without permission, got appropriate disabled states and errors.
  - Changed policies via Conduit.
  - Tried to view a package as a user without permission.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10360

Differential Revision: https://secure.phabricator.com/D15275
2016-02-15 11:56:35 -08:00
epriestley
f1f8ee8e6a Improve subproject/milestone error handling for users who can't create projects
Summary:
Fixes T10357.

  - Show a better (more descriptive) error message when a user who can't create projects tries to create a subproject or milestone.
  - Disable the subproject actions if you don't have create permission.

All this stuff was already enforced properly: this diff doesn't make any actual policy changes, just improves the UI for users who lack permission.

Test Plan:
  - As an unprivileged user (no "Can Create Projects"), tried to create a subproject or milestone.
  - After patch, got a disabled action, with more specific and helpful error than before.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10357

Differential Revision: https://secure.phabricator.com/D15274
2016-02-15 07:32:42 -08:00
Chad Little
3fdaf229a7 Convert Create/Edit Column pages to dialogs
Summary: Makes these pages a dialog endpoint, keeping you on the Workboard when possible.

Test Plan: Create a Column, Edit a Column, visit hard page. Test letters in the points field.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15270
2016-02-14 12:38:38 -08:00
Chad Little
c1f57605ab Normalize colors a bit better on Profiles/Projects, add Workboard backgrounds
Summary: Cleans up the backgrounds a little on Projects/Profiles and adds a number of colour choices for Workboards.

Test Plan:
Manually add each color for testing. Test new project / profile layouts with and without properties.

{F1109325}

{F1109326}

{F1109327}

{F1109328}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15269
2016-02-13 12:08:29 -08:00
epriestley
329d03661f Use an extended policy to bind column and board policies together
Summary:
Ref T10349. Columns have the same policies as the projects they belong to.

However, the current implementation just returns the policy directly. This usually works, but if the project has a policy like "Members of (This) Project", the policy filter tries to check if the viewer is a member of //the column itself//. That doesn't work, since columns don't have members. This leads to a situation where columns on "Editable By: Project Members" projects can not be edited.

Instead, return a permissive base policy and then use an extended policy to bind the column policy to the project policy.

Test Plan:
  - Edited a column on an "Editable By: Members of Project" board.
  - Added and ran a unit test covering this case.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10349

Differential Revision: https://secure.phabricator.com/D15268
2016-02-13 11:34:54 -08:00
epriestley
3f50ba90f1 On workboards, put older milestone columns on the right
Summary:
Ref T10349. Instead of showing columns in "Backlog, Custom, Sprint 1, Sprint 2, Sprint 3" order, show the sprints in reverse order: 3, 2, 1.

This makes it easier to get to the new stuff, and you don't have to drag over older stuff or archive it immediately.

Trello's own meta-board for Trello development is a good example of this in the wild: older stuff goes out to the right, so you can get to the newer stuff easily:

https://trello.com/b/nC8QJJoZ/trello-development

Test Plan: Saw board in 3, 2, 1 order instead of 1, 2, 3.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10349

Differential Revision: https://secure.phabricator.com/D15267
2016-02-13 08:36:59 -08:00
epriestley
9bab3c25b8 Sort milestones by milestone number, not ID
Summary: Ref T10350. Normally, milestone numbers and IDs have the same order, but they may not if you used the script in T10350 to artificially move a bunch of stuff around.

Test Plan: Milestones now go "1, 2, <thing I artifically moved into position 3>" on local install.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10350

Differential Revision: https://secure.phabricator.com/D15266
2016-02-13 08:36:25 -08:00
epriestley
bec21d80a5 Don't try to import proxy columns
Summary:
Fixes T10346. You finally wrung a clue out of the reporter and I think I figured this out.

Here's the bug:

  - Create a project with a workboard and subprojects/milestones.
  - Create a new project, import columns from the first project.
  - We incorrectly import empty columns for the subprojects/milestons.

Instead, skip proxy columns during import.

Also, allow "hide column" to continue on missing fields, so columns with no name can be hidden.

Test Plan:
  - Did the stuff above.
  - Workboard no longer populated with a bunch of "Unnamed Column" columns.
  - Hid several "Unnamed Column" columns.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10346

Differential Revision: https://secure.phabricator.com/D15265
2016-02-12 13:59:26 -08:00
Chad Little
1e3a5bd2c0 Filter out archived projects from ProjectProfileView
Summary: This just hides them, should still show on "View All".

Test Plan: Hide a Milestone, no longer see it on home. Click "View All", see all Milestones.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15264
2016-02-12 13:10:56 -08:00
epriestley
ca908d7cc4 Don't autoname milestones, but do show the previous milestone name as a hint
Summary: Fixes T10347. In the long run maybe we'll try to guess this better, but for now get rid of the "Milestone X" hardcode and just show what the last one was called.

Test Plan:
  - Created the first milestone for a project.
  - Created the nth milestone for a project.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10347

Differential Revision: https://secure.phabricator.com/D15262
2016-02-12 11:04:46 -08:00
epriestley
68d05934a7 Don't show un-completeable results in people/project autocomplete
Summary:
Fixes T10285.

  - If a result (like a milestone) has no primary hashtag, try to fill in a secondary hashtag.
  - If we can't find any hashtag, don't return the result.

This produces these behaviors:

  - By default, you can't autocomplete milestones.
  - If you give one a hashtag, you can.

We might want to give milestones "special" hashtags eventually (like `#xyz/33`) but this fixes the confusing/broken behavior in the UI and we can wait for a better use case for letting you autocomplete milestones, I think.

Also, don't try to cycle hashtags when renaming milestones. This was a little inconsistent before.

Test Plan:
  - Autocompleted normal projects.
  - Autocompleted milestones with explicit hashtags.
  - No autocomplete entry for milestones with no special hashtags.
  - Used normal typeahead to get tag-less milestones to make sure I didn't break anything.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10285

Differential Revision: https://secure.phabricator.com/D15261
2016-02-12 11:03:21 -08:00
June Rhodes
2f054edfa2 Hide milestone columns when milestone is archived
Summary: Fixes T10310.  This replaces the "Hide Column" / "Show Column" option for milestone columns with one that archives/unarchives, and hides milestone columns when the milestone project is archived.

Test Plan:
  - Hid and unhid a normal column (got normal dialogs).
  - Hid and unhid a milestone column (got "archive project" dialogs, underlying project archived/unarchived, column vanished).

Reviewers: hach-que, #blessed_reviewers, chad

Reviewed By: #blessed_reviewers, chad

Subscribers: jcowgar, Korvin

Maniphest Tasks: T10310

Differential Revision: https://secure.phabricator.com/D15231
2016-02-12 08:10:33 -08:00
epriestley
5e3754828f Fix handling of gzip in VCS responses
Summary:
Fixes T10264. I'm reasonably confident that this is the chain of events here:

First, prior to 8269fd6e, we would ignore "Content-Encoding" when reading inbound bodies. So if a request was gzipped, we would read a gzipped body, then give `git-http-backend` a gzipped body with "Content-Encoding: gzip". Everything matched normally, so that was fine, except in the cluster.

In the cluster, we'd accept "gzip + compressed body" and proxy it, but not tell cURL that it was already compressed. cURL would think it was raw data, so it would arrive on the repository host with a compressed body but no "Content-Encoding: gzip". Then we'd hand it to git in the same form. This caused the issue in 8269fd6e: handing it compressed data, but no "this is compressed" header.

To fix this, I made us decompress the encoding when we read the body, so the cluster now proxies raw data instead of proxying gzipped data. This fixed the issue in the cluster, but created a new issue on non-cluster hosts. The new issue is that we accept "gzip + compressed body" and decompress the body, but then pass the //original// header to `git-http-backend`. So now we have the opposite problem from what we originally had: a "gzip" header, but a raw body.

To fix //this//, we could do two things:

  - Revert 8269fd6e, then change the proxy request to preserve "Content-Encoding" instead.
  - Stop telling `git-http-backend` that we're handing it compressed data when we're handing it raw data.

I did the latter here because it's an easier change to make and test, we'll need to interact with the raw data later anyway, to implement repository virtualization in connection with T8238.

Test Plan: See T10264 for users confirming this fix.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10264

Differential Revision: https://secure.phabricator.com/D15258
2016-02-12 08:08:58 -08:00
Jay Shirley
8af3abc40a Add transactionID to maniphest.gettransactions output
Summary:
This commit adds the `transactionID` field to manphest.gettransactions, to
satisfy the request in T10327

Test Plan: Call the `maniphest.gettransactions` endpoint, verify `transactionID` is present

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: chad, Korvin

Differential Revision: https://secure.phabricator.com/D15250
2016-02-12 07:48:58 -08:00
epriestley
de379c8b61 Allow workboard sorting and filtering to be saved as defaults
Summary:
Fixes T6641. This allows users who have permission to edit a project to use "Save as Default" to save the current order and filter as defaults for the project.

These are per-board defaults, and apply to all users. The rationale is that I think the best default ordering/filtering depends mostly on the board, not the viewer.

This seems to align with most requests in the task, although rationale is a bit light. But, for example, it seems reasonable you might want to change the default filter to "All Tasks" on a sprint board, so you can see what's in the "Done" column.

This also fixes some minor issues I ran into:

  - Herald could hit an issue while checking permissions if the project was a subproject and a non-member had a triggering rule.
  - "Advanced filter..." did not prefill with the current filter.

Test Plan:
  - Set default order and filter on a workboard.
  - Reloaded board, saw settings stick.
  - Tried to edit a board as an unprivileged user (disabled menu items, error).
  - Reviewed transaction log.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T6641

Differential Revision: https://secure.phabricator.com/D15260
2016-02-12 07:47:23 -08:00
epriestley
99af097ff6 Allow task statuses to have claiming disabled
Summary:
Fixes T10343. All solutions here seem basically fine. I think adding this small bit of complexity is OK, and sorrrrt of like this behavior sometimes.

  - Allow disabling this behavior per-status.
  - Disable it by default for "Invalid" and "Duplicate" (I left "wontfix", since that's a resolution?).

Beyond being more flexible, I think this is slightly better?

Test Plan:
  - Closed a task as invalid: no claim.
  - Closed a task as resolved: claim.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10343

Differential Revision: https://secure.phabricator.com/D15257
2016-02-11 20:44:35 -08:00
epriestley
7e94d2f808 Permit users to touch maniphest.points
Summary: Ref T4427. Seems fine / not egregiously broken.

Test Plan: Edited points configuration. Tried to set a bad value. Set a good value. Persued examples and help text.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4427

Differential Revision: https://secure.phabricator.com/D15256
2016-02-11 18:03:12 -08:00
Chad Little
8d1e7c0d5f Minor CSS touches to workboard quest experience
Summary: minor spacing updates, but i need to likely take a more details pass, specifically points look janky with project tags since they are not in the same `li`.

Test Plan: Zoom into tags, see they all are same height and align.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15255
2016-02-11 17:10:43 -08:00
Chad Little
6ae0a62f9f New People Hovercards
Summary: Mimics the Project Hovercards, more custom UI.

Test Plan: Hover over person with and without badges, hover over project.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15253
2016-02-11 15:41:55 -08:00
epriestley
8934dee543 Add "does not match regexp" to Herald
Summary:
Fixes T10330.

  - Anywhere we support "matches regexp", also allow "does not match regexp". Although you can sometimes write a clever negative regexp, these rules are better expressed with "does not match <simple regexp>" anyway, and sometimes no regexp will work.
  - Always allow "does not contain" when we support "contains".
  - Fix some JS issues with certain rules affecting custom fields.

Test Plan:
  - Wrote an "Affected files do not match regexp" rule that required every diff to touch "MANUALCHANGELOG.md".
  - Tried to diff without the file; rejected.
  - Tried to diff with the file; accepted.
  - Wrote a bunch of "contains" and "does not contain" rules against text fields and custom fields, then edited tasks to trigger/observe them.
  - Swapped the editor into custom text, user, remarkup, etc fields, no more JS errors.

{F1105172}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10330

Differential Revision: https://secure.phabricator.com/D15254
2016-02-11 15:29:38 -08:00
Chad Little
a39d0344c6 Add commit id to header in Diffusion
Summary: Also adds the commit to the header underneath the title. Ref T7628

Test Plan: Review a few Diffusion pages.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T7628

Differential Revision: https://secure.phabricator.com/D15246
2016-02-11 11:33:03 -08:00
epriestley
12f131c064 Expose task point counts in maniphest.search
Summary: Ref T4427.

Test Plan: {F1104631}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4427

Differential Revision: https://secure.phabricator.com/D15244
2016-02-11 11:26:17 -08:00
Chad Little
f163d83935 Don't link commit uri in Crumbs
Summary: These are not needed I think? and handy for cut and paste. Fixes T7628

Test Plan: cut and paste easier from commit hash.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T7628

Differential Revision: https://secure.phabricator.com/D15245
2016-02-11 11:21:43 -08:00
epriestley
5383ea9d56 Add points to workboard cards
Summary: Fixes T10328.

Test Plan: {F1104609}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10328

Differential Revision: https://secure.phabricator.com/D15243
2016-02-11 10:04:54 -08:00
epriestley
ad77b014f1 Fix an issue with creating tasks directly into milestone columns
Summary:
These columns were conflating `projectPHID` (the defualt project to add to the task) with `boardPHID` (the board the column appears on).

Separate them to fix the beahvior.

Test Plan: Used "Add Task" from dropdown menu of a milestone column on a parent project's workboard.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15242
2016-02-11 10:01:49 -08:00
epriestley
705c8c956a Fix one straggler milestone URI
Summary: I missed this during cleanup.

Test Plan: Go to a project, then: Subprojects, Create Milestone, Cancel. No longer 404/fatals.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15241
2016-02-11 10:01:35 -08:00
epriestley
968ac76453 Don't adjust task priority after a workboard drag unless we need to
Summary:
Fixes T8197. Currently, if you priority-sort a workboard and drag a card to the top or bottom, we change the priority even if we do not need to.

For example, if the lowest priority in a column is "Low", and you drag a "Wishlist" task underneath it, we incorrectly increase the priority of the task to "Low", when we do not actually need to touch it. This is bad/confusing.

A similar thing happens when dragging a "High" priority task to the top of a column where the highest priority is currently "Normal".

Test Plan:
  - Create a column with a "Normal" task.
  - Sort workboard by Priority.
  - Drag a "High" task above it. After patch: task still "High".
  - Drag a "Wishlist" task below it. After patch: task still "Wishlist".

Also dragged a ton of tasks into the middle of other tasks.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8197

Differential Revision: https://secure.phabricator.com/D15240
2016-02-10 16:03:31 -08:00
epriestley
0b5abf7bb5 Allow "0" to be a valid workboard column point limit
Summary:
Fixes T6580. Now:

  - Empty field means "unlimited".
  - Zero means 0.
  - Nonzero means that number.

(Although you can now have fractional points, I didn't change columns to allow fractional limits, because too bad.)

Test Plan: {F1103688}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T6580

Differential Revision: https://secure.phabricator.com/D15239
2016-02-10 15:10:33 -08:00
epriestley
1fb76655df Restore column point counts to workboards
Summary: Ref T4427.

Test Plan:
  - Dragged a 17 XP task from "Hunting" to "Slain".
  - Saw 17 XP move.
  - Level up!

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4427

Differential Revision: https://secure.phabricator.com/D15237
2016-02-10 14:01:28 -08:00
epriestley
0bf3519045 Rewrite workboards to have way more bugs
Summary:
Ref T4900. Briefly:

  - Much more layout and rendering is now done in Javascript.
  - This should otherwise be identical to the behavior at HEAD, except that:
    - editing a task and removing the current board from it no longer removes the task; and
    - points still don't work.

However, this can now plausibly support realtime workboard updates and other complex state-based behaviors like points calculations in a future change.

Test Plan:
  - Changed card covers.
  - Moved cards.
  - Sorted board by priority and natural.
  - Added new cards.
  - Edited cards in place.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4900

Differential Revision: https://secure.phabricator.com/D15234
2016-02-10 13:08:38 -08:00
epriestley
01084bfe22 Begin making card updates on boards independent of context
Summary:
Ref T4900. To eventually support realtime board updates, we need to be able to perform a board state update without the context of the action which caused it.

For example, if the server says "update card Y", we need to know what to do without being told "card Y was moved from column A to column B" explicitly. Currently, all the update code relies on knowing what happened and which nodes were affected.

This is only a small step forward, but starts making things a bit more independent and consistent.

Test Plan:
  - Moved cards around.
  - Changed card cover images.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4900

Differential Revision: https://secure.phabricator.com/D15228
2016-02-10 13:07:48 -08:00
epriestley
9bca1a56da Begin generalizing Javascript for Workboard state handling
Summary:
Ref T4900. Broadly, workboard state management is fairly ad-hoc now, which makes things like this (where some kind of edit affects global state) difficult:

  - Updating points header to reflect a sum change after dragging a task.
  - Changing progress bars after editing a task to change resolution or points value.
  - Moving a card to the correct column after editing it and changing subprojects/iterations.
  - Responding to real-time notifications about other users moving cards.

This begins rewriting the code in a way that can better accommodate these kinds of far-reaching state update.

This change just moves cover image stuff. I'll continue moving features one at a time until boards work better.

Test Plan: Updated some cover images.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4900

Differential Revision: https://secure.phabricator.com/D15224
2016-02-10 13:04:27 -08:00
epriestley
7bca452fad Fix two issues with unusual milestone workboard initialization orders
Summary: Fixes T10316. Fixes T10311.

Test Plan:
  - Create a project, create a milestone, go back to the parent, go to the workboard. Previously, fatal. Now, prompts you to create workboard.
  - Create a project, create a milestone, create the parent workboard, put a task in the milestone's column, go to the milestone workboard. Previously, fatal. Now, prompts you to create workboard.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10311, T10316

Differential Revision: https://secure.phabricator.com/D15232
2016-02-10 12:30:57 -08:00
Chad Little
c2502f1beb Add fullscreen mode to Workboards
Summary: Cleans up Crumb Actions on Workboards. Adds fullscreen option. Fixes T6066

Test Plan:
Clicky Clicky. Test icon does not display on tablet, mobile.

{F1102458}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T6066

Differential Revision: https://secure.phabricator.com/D15230
2016-02-10 15:31:02 +00:00
epriestley
aa6c993848 Fix two minor points UI issues
Summary:
Ref T4427.

  - When points are configured, show them on the task detail page (just a simple property, at least for now).
  - Typecast points better to avoid "joe changed points from 12 to 12." beacuse we compare the stored value (as a string) to the new value (as a double).

Test Plan:
  - Saw points on detail view.
  - Created task with points, then edited it without touching points. No more spurious "changed from 12 to 12" transaction.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4427

Differential Revision: https://secure.phabricator.com/D15223
2016-02-09 11:57:36 -08:00
Aviv Eyal
4c1140a3a7 unbreak exception handling
Summary: fix T10306

Test Plan: ¯\_(ツ)_/¯

Reviewers: chad, #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Maniphest Tasks: T10306

Differential Revision: https://secure.phabricator.com/D15229
2016-02-09 18:20:22 +00:00
epriestley
735b722cb2 Fix a bad parameter in a parent::shouldHideForMail() call in Maniphest
Fixes T10303.

Auditors: chad
2016-02-09 04:17:35 -08:00
epriestley
0782652a80 Add a basic progress bar for milestones
Summary: Ref T4427. This kind of works.

Test Plan: {F1100578}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4427

Differential Revision: https://secure.phabricator.com/D15221
2016-02-08 18:50:22 -08:00
epriestley
f84130f9cd Support enabling a formal points field in Maniphest
Summary:
Ref T4427.

  - New config option for labels, enabling, etc., but no UI/niceness yet.
  - When enabled, add a field.
  - Allow nonnegative values, including fractional values.
  - EditEngine is nice and Conduit / actions basically just work with a tiny bit of extra support code.

Test Plan:
  - Edited points via "Edit".
  - Edited points via Conduit.
  - Edited points via stacked actions.
  - Tried to set "zebra" points.
  - Tried to set -1 points.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4427

Differential Revision: https://secure.phabricator.com/D15220
2016-02-08 18:14:44 -08:00
epriestley
86c2f9df2e First cut of progress bars (PHUISegmentBarView)
Summary:
Ref T10288.

I couldn't figure out how to reasonably get the interior right borders to round like the mock, but I think this is otherwise mostly faithful. Feel free to fix stuff.

Test Plan: {F1100415}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10288

Differential Revision: https://secure.phabricator.com/D15219
2016-02-08 15:28:09 -08:00
epriestley
e9f3807cf5 Add a "points" field to tasks
Summary:
Currently never read or written.

Supports fractions.

There's no such thing as an unsigned double so this also supports negative values, technically, although I'll eventually prevent this in the UI.

Test Plan: `bin/storage upgrade`, then created and edited a task. Nothing was different.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15218
2016-02-08 15:28:00 -08:00
epriestley
32225d1dd0 Remove three ancient columns from Maniphest tasks: attached, projectPHIDs, ccPHIDs
Summary:
Before edges, we stored some of this stuff directly on tasks.

  - `attached` was migrated to edges in Jan 2013.
  - `projectPHIDs` was never used, as far as I can tell?
  - `ccPHIDs` was migrated away and dropped more than a year ago.

None of these columns are used in modern code (instead, modern code uses edges).

Test Plan: `grep`, browsed around, `bin/storage upgrade`, unit tests.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15216
2016-02-08 14:10:02 -08:00
epriestley
3682cc9bb2 Allow workboards to be disabled, hiding "(Backlog)" column annotations
Summary:
Fixes T7410.

  - Adds a "Disable Workboard" action to the "Manage Backlog" menu.
  - We'll probably move this somewhere else if/when that column gets too messy.
  - Disabling a board hides it, prevents it from being recreated by non-editors, and hides the "Project (Backlog)" annotations.
  - Resotring a board puts it back in pristine condition.

Test Plan:
  - Disabled a board.
  - Verified "(Backlog)" annotations vanished.
  - Enabled a board.

Reviewers: chad

Reviewed By: chad

Subscribers: mbishopim3

Maniphest Tasks: T7410

Differential Revision: https://secure.phabricator.com/D15215
2016-02-08 14:09:36 -08:00
epriestley
07f1a03262 Fix a bad call when prefilling ApplicationSearch from ?projects=some_slug
Summary: Fixes T10299.

Test Plan:
  - Visited `/maniphest/?projects=x` locally, where `x` is some valid project slug.
  - Before patch: Fatal on `requireViewer()` call.
  - After patch: Works correctly, filling the correct project into parameters.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10299

Differential Revision: https://secure.phabricator.com/D15214
2016-02-08 10:44:33 -08:00
Jeremy Cowgar
604b780953 Fix an issue where 'Attending' would appear on calendar view unnecessarily
Summary:
Ref T10295

* Viewing Upcoming Events in the calendar would display 'Attending: ' even if there were not attendees. This caused confusion, such as 'Is it telling me I am "Attending?"'
* When a calendar event has no attendees, simply do not display the 'Attending: ' label

Test Plan:
* Add a new event with no one attending.
* Add a new event with one or more attendees.
* View the Upcoming Events query of the Calendar app.
* Notice how the one with no attendees does not show 'Attending: ' while the other with attendees will show the already existing 'Attending: jdoe, ssmith' label.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T10295

Differential Revision: https://secure.phabricator.com/D15207
2016-02-07 10:00:14 -08:00
epriestley
d9bd062bba Fix an issue with viewing an empty board with milestone columns
Summary:
Ref T10010.

  - Viewing an empty board with milestone columns did a meaningless edge query. Don't do that.
  - When creating the first milestone of a parent, force the indexing engine to rematerialize it inline. This sets `hasMilestones` properly. Otherwise, the daemons may take some time to fix this in the indexer.

Test Plan:
  - Viewed an empty board of a project with a milestone.
  - Viewed a normal board.
  - Created the first milestone of a project with a big queue of daemons, saw project state immediately fully reflect the project having milestones.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10010

Differential Revision: https://secure.phabricator.com/D15206
2016-02-07 02:35:58 -08:00
epriestley
a45fe337a1 Link proxy column headers on workboards to proxied projects
Summary: Ref T10010. Allows you to click "Milestone 99" to jump directly to that project.

Test Plan:
  - Clicked milestone header, went to milestone.
  - Clicked normal column header, nothing happened. Wow!

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10010

Differential Revision: https://secure.phabricator.com/D15204
2016-02-06 16:33:42 -08:00
epriestley
4974e8487b Scale up small cover images instead of surrounding them with empty space
Summary: This makes small cover images full-width instead of teeny tiny dots in the middle of an island of whitespace.

Test Plan: Uploaded a small cover image.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15203
2016-02-06 16:09:38 -08:00
epriestley
78c248d330 Support drag-and-drop to set cover images on workboard cards
Summary: This was slightly more complex than I believed, but not too terrible.

Test Plan:
{F1096126}

  - Also used some normal file uploaders to make sure I didn't break that.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15202
2016-02-06 15:58:43 -08:00
epriestley
b6a38b403c Add storage and read logic for workboard card cover photos
Summary:
No way to set photos yet, but if you magic them in they work.

Primarily, this consolidates rendering logic so the move + edit + view controllers all run the same code to do tags / cover photos.

Test Plan: {F1095870}

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15201
2016-02-06 15:34:41 -08:00
epriestley
f097c9c595 Disable "Subprojects" menu item for milestone projects
Summary:
Ref T10010. Milestones can't have subprojects, so this item isn't very useful.

I think there is also an argument for disabling "Members", but that panel is a little less useless and explains the membership rule, so I'm less certain about removing it. I do generally lean toward removing it at some point, though.

Test Plan:
  - Viewed a milestone, no "Subprojects" menu item.
  - Viewed a normal project, saw item.
  - Edited both menus, saw consistent UI.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10010

Differential Revision: https://secure.phabricator.com/D15200
2016-02-06 12:55:05 -08:00
epriestley
7550557e44 Don't show archived projects by default in policy control
Summary:
When filling in filler projects, only select active ones.

Also use a slightly more modern method signature.

Test Plan: Disabled a project, saw it vanish from the control.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15199
2016-02-06 12:41:58 -08:00
epriestley
1db4de7dbc Provide "Initial Members" instead of default joining projects
Summary:
Ref T10010. Instead of autojoining projects, provide "Initial Members: [___]" that the user can fill in.

This is only available in the web UI when creating a (non-milestone) project.

Test Plan:
  - Created a new project with no members.
  - Created a new project with some members.
  - Created a new milestone (no control).
  - Created a new project with myself as a member and an "Editable By: Project Members" policy, to verify this use case still works properly.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10010

Differential Revision: https://secure.phabricator.com/D15195
2016-02-05 14:31:49 -08:00
Chad Little
d92353930f Add a map marker icon for Milestones
Summary: Never got added.

Test Plan: Select a Milestone Project, edit Picture, see marker.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15194
2016-02-05 13:40:52 -08:00
Chad Little
a69cc99250 Add getDisplayName to cards and profiles
Summary: Show on hovercards and the profile page itself.

Test Plan: Review a Milestone.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15193
2016-02-05 13:13:48 -08:00
Chad Little
e2668a5fd0 Normalize icon color on user/project lists.
Summary: Minor, just fall back to the grey icon in all cases (too much color for me).

Test Plan: Review a Project and a Profile

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15190
2016-02-05 13:06:26 -08:00
epriestley
a19be7697c Add user profile icons to Phame authorship
Summary: Huge omission.

Test Plan: {F1093955}

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15192
2016-02-05 13:05:21 -08:00
epriestley
4132ba0853 Improve type and icon information in typeahead
Summary:
Ref T10289. This probably doesn't cover everything but should do a little bit better.

Although we should mabye just exlude milestones from this menu completely?

Test Plan: {F1093937}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10289

Differential Revision: https://secure.phabricator.com/D15191
2016-02-05 12:48:20 -08:00
epriestley
5092bcf533 Fix dead column link and provide more milestone UI context
Summary:
Fixes T10287. Ref T10286.

  - Link stuff properly.
  - Generally, show "Parent (Milestone)" instead of "Milestone".
  - This probably doesn't get 100% of `getName()` -> `getDisplayName()` swaps, but we can get those as we catch them.

Test Plan: See T10286. Also clicked stuff.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10286, T10287

Differential Revision: https://secure.phabricator.com/D15189
2016-02-05 12:25:52 -08:00
epriestley
e1c934ab22 De-garbage the horrible garbage project section of the policy selection control
Summary:
Fixes T4136.

When listing projects in the "Visible To" selector control:

  - Instead of showing every project you are a member of, show only a few.
  - Add an option to choose something else which isn't in the menu.
  - If you've used the control before, show the stuff you've selected in the recent past.
  - If you haven't used the control before or haven't used it much, show the stuff you've picked and them some filler.
  - Don't offer milestones.
  - Also don't offer milestones in the custom policy UI.

Test Plan:
{F1091999}

{F1092000}

  - Selected a project.
  - Used "find" to select a different project.
  - Saw reasonable defaults.
  - Saw favorites stick.
  - Tried to typeahead a milestone (nope).
  - Used "Custom Policy", tried to typeahead a milestone (nope).
  - Used "Custom Policy" in general.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4136

Differential Revision: https://secure.phabricator.com/D15184
2016-02-05 09:50:06 -08:00
Chad Little
8a9f760975 Add ProjectCardView, use on Hovercards
Summary: Builds a new ProjectCardView, starts basic Project Hovercard redesign (needs milestone, subproject support). Ref T10055

Test Plan:
View all the colors.

{F1092622}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T10055

Differential Revision: https://secure.phabricator.com/D15186
2016-02-05 09:12:39 -08:00
Chad Little
b9585f29fa Add icon / grey text when task is closed on workboards
Summary: Fixes T10281. Adds the closed icon (resolved, dupe, ect) as an attribute and makes the text grey again.

Test Plan:
View workboard with "All Tasks"

{F1092738}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T10281

Differential Revision: https://secure.phabricator.com/D15187
2016-02-05 16:05:41 +00:00
epriestley
c01f23adfb Improve some column behaviors for Milestone/Subproject columns
Summary:
Ref T10010.

  - Don't allow milestones to be reordered.
  - Hide phantom subproject columns when reodrering.
  - Don't allow subproject/milestone columns to be renamed.
  - Force milestones to be ordered at the end, and in the correct order.
  - Add some missing crumbs.

Test Plan: Reordered columns, renamed columns, made a new column, viewed column details.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10010

Differential Revision: https://secure.phabricator.com/D15183
2016-02-04 08:07:45 -08:00
epriestley
42954bc5ac Fix bad rendering pathway on user profiles for viewers without Badges application
Summary: Fixes T10275. We'd fatal on `$flex` not being defined.

Test Plan: Uninstalled badges, viewed profile. Before: fatal; now: no badges element appears but profile renders properly.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10275

Differential Revision: https://secure.phabricator.com/D15182
2016-02-04 07:17:31 -08:00
Chad Little
2f0571923c Add project list to user profiles
Summary: Adds which Projects a user is a member of to their profile, with a link to more. Build fallback states for no badges or no projects.

Test Plan:
Review a user with projects, without projects, with badges, without badges.

{F1084127}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15150
2016-02-04 02:22:34 +00:00
epriestley
2bdbd7833d Don't show any subproject tags on workboard cards
Summary: Ref T10010. This gets rid of, e.g., the "Iteration I" tag in the column for that milestone, as it is redundant with the column itself.

Test Plan: {F1090427}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10010

Differential Revision: https://secure.phabricator.com/D15181
2016-02-03 17:29:59 -08:00
epriestley
90a0459821 Roughly implement milestone columns on workboards
Summary:
Ref T10010. These aren't perfect but I think (?) they aren't horribly broken.

  - When a project is a parent project, destroy (as far as the user can tell) any custom columns.
  - When a project has milestones, automatically generate columns on the project's workboard (if it has a workboard).
  - When you move tasks between milestones, add the proper milestone tag.
  - When you move tasks out of milestones back into the backlog, add the proper parent project tag.
  - (Plenty of UI / design stuff to adjust.)

Test Plan:
  - Dragged stuff between milestone columns.
  - Used a normal workboard.
  - Wasn't able to find any egregiously bad cases that did anything terrible.

{F1088224}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10010

Differential Revision: https://secure.phabricator.com/D15171
2016-02-03 16:37:59 -08:00
epriestley
00165424d0 Add some test coverage for board moves
Summary: Ref T10010. This isn't totally comprehensive, and a lot of behaviors aren't testable (e.g., all the Javascript stuff) but at least covers the basic create/move/reorder operations.

Test Plan: `arc unit`

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10010

Differential Revision: https://secure.phabricator.com/D15178
2016-02-03 15:08:01 -08:00
epriestley
9961de0e80 Remove old position-on-read board column code
Summary: Ref T10010. This retires the old way of doing things inside ColumnPositionQuery. It is now obsolete and lives in BoardLayoutEngine instead.

Test Plan:
  - Moved cards, created cards, swapped filters, orders, etc.
  - Some degree of unit testing coming in the next diff.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10010

Differential Revision: https://secure.phabricator.com/D15177
2016-02-03 15:07:24 -08:00
epriestley
e25a40236f Nearly complete lifting card-move code out of workboards
Summary: Ref T10010. This gets rid of the last dependency on the weird ColumnPositionQuery code.

Test Plan:
  - Viewed workboards.
  - Used batch editor.
  - Created a new workboard.
  - Dragged stuff around.
  - Created new tasks into columns.
  - Changed order from natural to priority, dragged things around.
  - Switched filter to custom filter, "all tasks", etc.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10010

Differential Revision: https://secure.phabricator.com/D15176
2016-02-03 15:06:15 -08:00
epriestley
a9e98e42f5 Continue lifting column layout logic out of ColumnPositionQuery
Summary:
Ref T10010. See D15174. This gets rid of the "actually apply the change" callsite and moves it to layout engine.

Next up is to make the board view use the layout engine, then throw away all the whack code in ColumnPositionQuery, then move forward with D15171.

Test Plan:
  - Dragged tasks within a column.
  - Dragged tasks between columns.
  - Dragged tasks to empty columns.
  - Created a task in a column.
  - Swapped board to priority sort, dragged a bunch of stuff all over.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10010

Differential Revision: https://secure.phabricator.com/D15175
2016-02-03 15:05:43 -08:00
epriestley
23b835b647 Begin lifting column layout logic out of ColumnPositionQuery
Summary:
Ref T10010. This is a precursor to D15171, which I'll eventually rebuild on top of these changes.

Currently, ColumnPositionQuery does a lot of "column layout" stuff that's very similar to the Milestone/Subproject stuff that needs to happen in D15171. The current approach there ended up splitting this layout stuff across two unrelated classes (ColumnPositionQuery + BoardViewController), neither of which is a particularly great place to do it -- the Query is too low-level, and the Controller is too high-level.

Instead, introduce a new "LayoutEngine" which does all this layout stuff. Swap two of the four places that we query this stuff over to the new engine:

  - "Project (Column)" on tasks.
  - Transaction generation when moving cards.

These sites aren't swapped by this diff, but will be by the next one:

  - Actually applying transactions.
  - Main layout for boards (this could swap easily now, but applying transactions currently relies on position writes having taken place, so it can't swap until the other one swaps).

Once everything is swapped over, I should be able to add the D15171 logic to LayoutEngine instead of BoardViewController and end up with a cleaner approach overall.

One particularly benefit is that //looking// at a board won't do a bunch of position writes anymore, which wasn't a big deal, but which I was a bit uneasy with.

Test Plan:
  - Viewed tasks that are on boards, saw column annotations in project list.
  - Moved cards between columns on a board.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10010

Differential Revision: https://secure.phabricator.com/D15174
2016-02-03 15:05:32 -08:00
epriestley
0a735694ae Give project tags hovercards
Summary: I don't think these ever had hovercards, but they should with subprojects/new design.

Test Plan: pointey pointey, got a card

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15180
2016-02-03 14:50:49 -08:00
epriestley
68254a046f Fix mishandling of chunk threshold in Diffusion for installs with no chunk engines available
Summary: Fixes T10273. The threshold is `null` if no chunk engines are available, but the code didn't handle this properly.

Test Plan: Disabled all chunk engines, reloaded, hit issue described in task. Applied patch, got clean file content.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10273

Differential Revision: https://secure.phabricator.com/D15179
2016-02-03 14:46:21 -08:00
Chad Little
6bb24e1d0c Move PhabricatorHovercard to PHUIHovercard
Summary: No UI changes, just some search and replace for UI consistency.

Test Plan: Test person and object hovercards still work. UIExamples too.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15172
2016-02-03 16:26:30 +00:00
Chad Little
95af3624d7 Flip layout on PhameHome
Summary: Centers the page for consistency for the rest of Phame, puts blog list on right for better mobile support.

Test Plan: Review PhameHome at all breakpoints.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15170
2016-02-02 15:11:02 -08:00
epriestley
268a9ced78 Implement subproject/milestone conflict resolution rules
Summary:
Ref T10010. When you try to add "Sprint 35" to a task, remove "Sprint 34", etc. Briefly:

  - A task can't be in Sprint 3 and Sprint 4.
  - A task can't be in "A" and "A > B" (but "A > B" and "A > C" are fine).
  - When a user makes an edit which would violate one of these rules, preserve the last tag in each group of conflicts.

Test Plan:
  - Added fairly comprehensive tests.
  - Added a bunch of different tags to things, saw them properly exclude conflicting tags.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10010

Differential Revision: https://secure.phabricator.com/D15167
2016-02-02 13:12:27 -08:00
Chad Little
5263c5bea4 Fix setting of default project tab
Summary: I don't PHP. Fixes T10256

Test Plan: Test many menus.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T10256

Differential Revision: https://secure.phabricator.com/D15166
2016-02-02 12:45:27 -08:00
epriestley
9d125b459e Use large text columns to store IP addresses
Summary: Fixes T10259. There was no real reason to do this `ip2long()` stuff in the first place -- it's very slightly smaller, but won't work with ipv6 and the savings are miniscule.

Test Plan:
  - Ran migration.
  - Viewed logs in web UI.
  - Pulled and pushed.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10259

Differential Revision: https://secure.phabricator.com/D15165
2016-02-02 10:13:14 -08:00
Chad Little
1d939e0bd8 Add project icon/type to Project Profile
Summary: Adds basic icon/type to header on Project profiles

Test Plan:
View different projects, see header. Mobile, Deskop, Tablet.

{F1087460}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15164
2016-02-02 09:58:33 -08:00
epriestley
61318a8119 Improve minor workboard drag behaviors
Summary:
Ref T5240.

  - Add proper class when dropping cards.
  - Add proper class when creating new cards.
  - Make X-drag explicit so that it works if there's only one column.
  - Stop tootips when dragging, resume them after dropping.
  - Move CSS rule for consistency.
  - Allow user to hit "Escape" to cancel an in-progress drag.

Test Plan:
  - Dropped cards.
  - Created new cards.
  - X-dragged on a workboard with one column and a dashboard.
  - Dragged over a tooltip (no tip), dropped, moused over tooltip (tip).
  - Hit escape during a drag.

Reviewers: chad

Reviewed By: chad

Subscribers: cspeckmim

Maniphest Tasks: T5240

Differential Revision: https://secure.phabricator.com/D15163
2016-02-02 06:42:41 -08:00
cburroughs
a019f16518 increase team productivity with feline facts
Summary: {F1087124}

Test Plan: https://en.wikipedia.org/wiki/Cat

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D15162
2016-02-02 14:37:12 +00:00
epriestley
ffb7978528 Make all CSS rules for draggable cards/items independent of container classes
Summary:
Ref T5240. With the new approach, the draggable clones lose their containers, so they don't get affected by rules like `.container .item`.

Put classes on the cards/items and use `.board-item.item` and `.standard-item.item` to apply rules instead.

This didn't turn out //too// gross, and seems relatively OK / not obviously broken.

Test Plan:
  - Dragged cards on a workboard.
  - Dragged items in normal lists (tasks, pinned apps).

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T5240

Differential Revision: https://secure.phabricator.com/D15161
2016-02-01 18:48:39 -08:00
Chad Little
7dfe044426 Add ownerheads to workboard cards
Summary: Reworks cards to add an assignee head and tooltip on workboards. This feels like a reasonable starting point, but they may move depending on feedback.

Test Plan:
View a lot of boards. Assign and unassign a task.

{F1085739}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Luke081515.2, Korvin

Differential Revision: https://secure.phabricator.com/D15158
2016-02-01 16:27:49 -08:00
Mike Riley
d41aaba2a1 Fix coverage line index lookup in diffusion browser
Summary: I believe this got clobbered in rP8b6edaa4e238a809fe78e6d14ad0705545f8179f. This index doesn't seem to be present in the line dictionary and we're now relying on `$line_index` for the current position.

Test Plan:
before {F1085522}
after {F1085521}

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D15156
2016-02-01 19:19:52 +00:00
epriestley
f5c686d6a4 Swap charts from gRaphael to D3
Summary:
Mostly, this has just been sitting in my sandbox for a long time. I may also touch some charting stuff with subprojects/milestones, but don't have particular plans to do that.

D3 seems a bit more flexible, and it's easier to push more of the style logic into CSS so you can fix my design atrocities. gRaphael also hasn't been updated in ~3+ years.

Test Plan:
{F1085433}

{F1085434}

Reviewers: chad

Reviewed By: chad

Subscribers: cburroughs, yelirekim

Differential Revision: https://secure.phabricator.com/D15155
2016-02-01 10:36:59 -08:00
epriestley
18f34fab73 Always give users "fa-user" icons in tokenizers
Summary: Fixes T10247. The flavor icons are unhelpful/confusing in these contexts; show a boringer icon instead.

Test Plan: Used tokenizer to select user with custom profile icon. Reloaded page. Saw boringer icon in both cases.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10247

Differential Revision: https://secure.phabricator.com/D15154
2016-02-01 09:49:12 -08:00
epriestley
08e7b6f79f Fix object extraction from user profile blurbs
Summary: Fixes T10242. Currently, we don't extract files, mentions, etc., properly from user profile blurbs.

Test Plan: Uploaded a file to my profile blurb, saw it attach properly.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10242

Differential Revision: https://secure.phabricator.com/D15153
2016-02-01 09:46:45 -08:00
epriestley
fc9db6e2a2 Put subprojects and milestones back into the Project UI
Summary: Ref T10010. Restores subprojects and milestones to the UI with a more modern style and more warnings.

Test Plan:
{F1085207}

{F1085208}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10010

Differential Revision: https://secure.phabricator.com/D15152
2016-02-01 09:18:11 -08:00
epriestley
354858e434 Disambiguate isEmpty()
Summary:
Fixes T10250.

Rename the one I added to `hasAnyProperties()` for clarity.

Test Plan:
  - Viewed a project profile with content.
  - Viewed a project profile with no properties.
  - Viewed a workboard with tasks that had a mixture of additional projects and no additional projects.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10250

Differential Revision: https://secure.phabricator.com/D15151
2016-01-31 15:20:04 -08:00
Chad Little
080d838c69 Add project tags to workboard cards
Summary: Ref T4863. Add project tags to workboard cards.

Test Plan: {F1053509}

Reviewers: joshuaspence, #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Luke081515.2, Korvin

Maniphest Tasks: T4863

Differential Revision: https://secure.phabricator.com/D14935
2016-01-31 13:44:01 -08:00
Chad Little
e2da571734 Add additional icons for User Profiles
Summary: Designer, Musician, Spy, Robot

Test Plan: Click Choose Icon, see that I am a designer.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15147
2016-01-31 20:09:06 +00:00
epriestley
e5947e08d3 Apply phutil_utf8ize() to stderr output from VCS commands prior to logging
Summary: Ref T10228. Commands like `git-http-backend` can emit errors with raw bytes in the output. Sanitize these if present so we can log them in JSON format.

Test Plan: Edited this into production. >_> sneaky sneaky <_<

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10228

Differential Revision: https://secure.phabricator.com/D15144
2016-01-30 16:46:23 -08:00
Chad Little
b8139e6946 Add basic fields back to Manage pages
Summary: It feels wierd to edit a project or profile and not see the changes. For now add them back to the Manage page.

Test Plan: Edit a Profile, Edit a Project. See updates on Manage page.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15140
2016-01-29 11:52:00 -08:00
Chad Little
27e21b0107 Remove PHUITextView
Summary: Never used.

Test Plan: grep `PHUITextView`

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15139
2016-01-29 11:42:56 -08:00
Chad Little
5e639feab4 Minor tweaks to Profile/Project
Summary:
- Redirect to profileview when new image is uploaded.
- Add ProfileNav to EditPicture on Profile
- Add ProfileNav to EditProfile on Profile

Test Plan: Set new images on Profiles and Projects. See new redirect. See new navs.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15132
2016-01-28 22:45:19 +00:00
epriestley
a5f6223553 Show blame colors on all lines, instead of only the first affected line
Summary: Fixes T10226. I just made a mistake here when rewriting this recently.

Test Plan: {F1079166}

Reviewers: chad, avivey

Reviewed By: avivey

Maniphest Tasks: T10226

Differential Revision: https://secure.phabricator.com/D15131
2016-01-28 11:17:15 -08:00
Aviv Eyal
8f0d9c3295 Remove email prefixes from doorkeeper titles
Summary: Fixes T10176. The prefix is not useful in the JIRA context, and doubtfully useful in Asana.

Test Plan: Load, make comment on revision, see link in JIRA is pretty.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Maniphest Tasks: T10176

Differential Revision: https://secure.phabricator.com/D15119
2016-01-28 18:48:28 +00:00
Chad Little
fe5cd4ca2c Move FontIcon calls to Icon
Summary: Normalizes all `setFontIcon` calls to `setIcon`.

Test Plan: UIExamples, Almanac, Apps list, etc.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, hach-que, yelirekim

Differential Revision: https://secure.phabricator.com/D15129
2016-01-28 08:48:45 -08:00
epriestley
30473549ac Add a basic pull event log for debugging repository cloning
Summary:
Ref T10228. This is currently quite limited:

  - No UI.
  - No SSH support.

My primary goal is to debug the issue in T10228. In the long run we can expand this to be a bit fancier.

Test Plan:
Made various valid and invalid clones, got sucess responses and not-so-successful responses, viewed the log table for general corresponding messages and broad sanity.

Ran GC via `bin/phd debug trigger`, no issues.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10228

Differential Revision: https://secure.phabricator.com/D15127
2016-01-28 08:18:34 -08:00
epriestley
c00cd5c2a3 Make hidden and locked configuration even more explicit
Summary:
A user in IRC seemed very confused by this, and worked extremely hard to shoot themsevles in the foot by manually writing locked configuration to the database.

Try to explain why configuration is locked better.

Test Plan:
Mostly reading.

{F1078905}

{F1078906}

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15128
2016-01-28 08:18:24 -08:00
Chad Little
8900f36326 Fix backdrop color
Summary: All our builtin images use #c4cde0 for the backdrop. This makes generation match the builtins.

Test Plan:
Build a new bug icon in Maniphest

{F1077934}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15126
2016-01-27 21:20:41 -08:00
Chad Little
36158dbdc0 Convert all calls to 'IconFont' to just 'Icon'
Summary: Mostly for consistency, we're not using other forms of icons and this makes all classes that use an icon call it in the same way.

Test Plan: tested uiexamples, lots of other random pages.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15125
2016-01-27 20:59:27 -08:00
Chad Little
43b8581d72 Fix some spelling errors in Icons
Summary: Some minor spelling mistakes.

Test Plan: Read

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15122
2016-01-27 20:59:14 -08:00
Chad Little
c9119306d7 Extend PHUITheme to include Profile Nav
Summary: Reasonable first pass, removes the "light" header, due to pain of upkeep. Reinforces UI color into the Profile Nav (and later likely dropmenu hovers). Most of this is reasonably easy to maintain now, but I may do a more accurate color pass after I get some more time together with it. For now this feels pretty good if you're developing in a different color UI.

Test Plan:
Switch between all the colors, hover over all the states.

{F1076766}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15120
2016-01-27 13:56:04 -08:00
Chad Little
a599aed9e2 Clean up Project Members UI
Summary:
 - Better spacing for images
 - Remove border
 - White BG on Members page

Test Plan: Review Projects / Project Home / Project Members

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15118
2016-01-26 21:41:24 +00:00
epriestley
49a44a0b1f Make project menus unconditionally configurable
Summary: Fixes T10213. I think the "Edit" item was originally conditional (or maybe I just forgot to add that part), but that got dropped when we swapped how it worked. This is all stable now anyway and can be available without needing prototypes enabled.

Test Plan: Edited a project menu.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10213

Differential Revision: https://secure.phabricator.com/D15117
2016-01-26 08:26:33 -08:00
Chad Little
6349741760 First pass at new Workboard UI
Summary: Cleans up Workboards to match the mocks. No new functionality, just more consistent colors/spacing/common components.

Test Plan:
Visit a few workboards, drag and drop items. Mobile, Tablet, Desktop

{F1070733}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15115
2016-01-25 13:35:23 -08:00
epriestley
1e69f06d74 Remove redundant restructured text entry in default Paste highlighting options
Summary: Fixes T10217. This extra entry is just a mistake because of `rst` + `rest` both being valid suffixes. We don't need both entries.

Test Plan: Edited a paste, only saw one entry in dropdown for restructured text.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10217

Differential Revision: https://secure.phabricator.com/D15114
2016-01-25 06:47:53 -08:00
epriestley
c11c7f2900 Prevent "Manage" profile menu items from being hidden
Summary: Ref T10054. Prevent users from removing this item and locking themselves out of the system unless they can guess the URI.

Test Plan: Tried to disable "Manage", wasn't permitted to.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10054

Differential Revision: https://secure.phabricator.com/D15113
2016-01-25 06:43:03 -08:00
Mike Riley
e7195628d5 Use correct transaction types when creating diffs
Summary: See T10214 for context.  These transaction types are obviously wrong as far as I can tell.

Test Plan:
Created a revision and didn't see an error in the daemon log.

```lang=php
<?php

require_once dirname(__FILE__).'/phabricator/scripts/__init_script__.php';

$yelirekim = (new PhabricatorPeopleQuery)
  ->setViewer(PhabricatorUser::getOmnipotentUser())
  ->withUsernames(['yelirekim'])
  ->executeOne();

$raw_diff = (new PhabricatorDifferenceEngine)
  ->generateRawDiffFromFileContent('oldfile', 'newfile');
$diff = (new ConduitCall('differential.createrawdiff', [
      'diff' => $raw_diff,
    ]))
  ->setUser($yelirekim)
  ->execute();

$xactions = (new DifferentialDiffTransactionQuery)
  ->setViewer($yelirekim)
  ->withObjectPHIDs([$diff['phid']])
  ->execute();

foreach ($xactions as $xaction) {
  echo $xaction->getPHID().':'.$xaction->getTitle().PHP_EOL;
}
```

for sanity

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: michaeljs1990, epriestley

Differential Revision: https://secure.phabricator.com/D15112
2016-01-25 02:17:42 -08:00
Chad Little
a9e2e6c5aa Update Profiles to look like Project UI
Summary: Updates People profiles to look more like Project profiles. This removes Conpherence and Flag links. Don't think you like Conpherence links much and for Flags maybe we can put them in the quick create menu?

Test Plan:
View profiles with and without Badges.

{F1069365}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15111
2016-01-24 17:42:57 -08:00
Chad Little
19f4e8631f Add an edit link on hover for Project profile images
Summary: Minor point of polish, but feels really nice. Hover over photo and edit a link to change the picture.

Test Plan:
hover hover, clicky clicky

{F1069179}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15109
2016-01-24 13:20:54 -08:00
epriestley
cb1c3424a8 Use "tag" more consistenty when referring to associating a project with an object
Summary:
Ref T10144. This isn't comprehensive, but we can give it a try and see how it feels?

  - EditEngine forms now say "Tags" instead of "Projects".
  - Modern SearchEngine forms now say "Tags" instead of "Projects".
  - For clarity, replaced as much "in project" language as I could find with "tagged with project" language.

Test Plan: reading / grepping + used "not tagged with any project" token

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10144

Differential Revision: https://secure.phabricator.com/D15108
2016-01-24 10:02:42 -08:00
epriestley
9c28ae9ba7 Add more information (colors, members, watchers) to project.search
Summary: Fixes T6501. This adds more API information to the newish `project.search` API method.

Test Plan: Called `project.search`, used attachments.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T6501

Differential Revision: https://secure.phabricator.com/D15105
2016-01-24 10:02:05 -08:00
epriestley
8efaaa188f Move user editing/management actions to a separate "Manage" item, like projects
Summary: This improves consistency (by making this UI more similar to the projects UI) and gives us more flexibility the next time we update user profiles.

Test Plan:
{F1068889}

Took all the actions (probably?) to check that all the redirects were updated.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15104
2016-01-24 10:01:31 -08:00
epriestley
06aa207960 Allow users to have profile icons
Summary: Ref T10054. This primarily improves aesthetics and consistency for member/wathcher lists in projects.

Test Plan:
{F1068873}

{F1068874}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10054

Differential Revision: https://secure.phabricator.com/D15103
2016-01-24 09:58:01 -08:00
Chad Little
bba14118c7 Add setProfileHeader to PHUIHeaderView for reuse
Summary: Moves some profile css into PHUI, cleans up mobile view and desktop spacing.

Test Plan: Test Project at desktop and mobile breakpoints.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15106
2016-01-24 09:39:41 -08:00
epriestley
710fc0ce7f Don't render anything on project homepages if there are no properties at all
Summary: Ref T10054.

Test Plan:
{F1068420}

Also looked at a project which did have stuff to make sure the stuff still worked.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10054

Differential Revision: https://secure.phabricator.com/D15102
2016-01-23 17:19:39 -08:00
epriestley
b53d61c909 Fix bad call to getShortName()
Summary: Fixes T10212. This method was removed in D14990, but I missed a callsite.

Test Plan: Disabling blame now works nicely.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10212

Differential Revision: https://secure.phabricator.com/D15100
2016-01-23 17:07:27 -08:00
Chad Little
a0a3ac51f6 Fix project image redirect in files
Summary: I moved history to manage and missed this callsite.

Test Plan: Use present icon/color quick select.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15099
2016-01-23 16:46:12 -08:00
Chad Little
b381265d92 First cut of new Project Home
Summary:
First pass at a new Project Home page. This is starting to sprawl, so punting this up now before it gets too large.

 - Project homes now have "large header"
 - Custom Fields / Descriptions are in the main column
 - Feed is simpler visually
 - new "Background" option for PHUIObjectBoxView
 - move header buttons globally to "Grey" instead of "Simple"
 - New color and hover states for "Grey"
 - Transitions on Buttons haha
 - Edit Icon on Nav is now under "Manage" panel
 - New "Manage" Panel

TODO:
 - More testing of bad cases of Custom Fields
 - Members Page in flux, needs design
 - Um still not sure how to make Custom Field not show UI

Test Plan:
Lots of random Project page visits. Save project, watch project, edit project, etc.

{F1068191}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15097
2016-01-23 16:11:45 -08:00
epriestley
0b4ed94cc6 Fix text for Passphrase credential destruction transaction when restoring credentials
Summary:
Fixes T10211. This transaction can either be setting or removing the "destroyed" flag, but we show "destroyed" in both cases.

Instead, if the transaction is clearing the flag, render "restored".

Test Plan: {F1068142}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10211

Differential Revision: https://secure.phabricator.com/D15096
2016-01-23 12:25:59 -08:00
epriestley
0b67e89904 Add a "make the workboard the default view" checkbox when creating a workboard
Summary: Ref T10054. Since we no longer have the "workboard default if it exists" rule, provide a quick way to make it the default.

Test Plan: Created a new workboard with the box checked, saw menu change appropriately.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10054

Differential Revision: https://secure.phabricator.com/D15092
2016-01-23 04:52:47 -08:00
epriestley
66ef506808 Redirect to profile after watching a project, not default page
Summary: Ref T10054.

Test Plan: watched project o_O

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10054

Differential Revision: https://secure.phabricator.com/D15095
2016-01-22 17:30:32 -08:00
Sbastien Santoro
b1f3e02d82 Fixed typo in PhabricatorMotivatorProfilePanel
Summary: racooons → racoons

Test Plan: Read again the sentence.

Reviewers: #blessed_reviewers, chad

Reviewed By: #blessed_reviewers, chad

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D15094
2016-01-22 20:19:46 +00:00
epriestley
9f56a014e2 Migrate existing projects to retain "Workboard" as default item
Summary:
Ref T10054. Ref T6961.

  - Existing projects with workboards had "Workboard" as the default menu item. Retain this behavior.
  - Populate the recently-added `hasWorkboard` flag so we can do a couple of things a little faster (see T6961).

Test Plan:
  - Ran migration.
  - Verified a bunch of projects looked sensible/correct after the migration.
  - Created a workboard, verified `hasWorkboard` got set properly.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T6961, T10054

Differential Revision: https://secure.phabricator.com/D15093
2016-01-22 09:44:43 -08:00
epriestley
b64d67f47a Frame workboard empty/create states inside profile menu
Summary:
Ref T10054. Uncreated workboards feel a little awkward right now because you lose the menu. Instead, keep the menu.

I also plan to:

  - add a "[X] Make the workboard the default view for this project." checkbox; and
  - resolve T6961.

...which will touch this workflow, so modernize/straighten it out.

Test Plan:
Viewed workboard, no access state, empty state. Created empty board, imported board.

{F1066973}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T6961, T10054

Differential Revision: https://secure.phabricator.com/D15091
2016-01-22 08:15:17 -08:00
epriestley
df4b484a5f Write documentation for profile menus
Summary: Ref T10054. This is all pretty straightforward. Also include some project-specific examples in the project documentation.

Test Plan: Read documentation.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10054

Differential Revision: https://secure.phabricator.com/D15090
2016-01-22 08:15:03 -08:00
epriestley
51ed95c00b Give profile menus more straightforward hide/disable/delete/default interactions
Summary:
Ref T10054.

  - Just let users delete non-builtin items.
  - Let users choose a default item explicitly.
  - Do a better job of cleaning up items which no longer exist or belong to uninstalled applications.

(NOTE) This has one user-facing change: workboards are no longer the default on projects with workboards. I think this is probably OK since we're giving users a ton of new toys at the same time, but I'll write some docs at least.

Test Plan:
  - Deleted custom items.
  - Disabled/enabled builtin items.
  - Made various things defaults.
  - Uninstalled Maniphest, saw Workboards tab disappear entirely.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10054

Differential Revision: https://secure.phabricator.com/D15089
2016-01-22 08:14:39 -08:00
epriestley
c25de5e02f Allow project colors to be relabeled
Summary: Fixes T5819. Adds configuration for setting color labels on projects and changing the default. Options are locked to what we make available.

Test Plan: {F1066823}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T5819

Differential Revision: https://secure.phabricator.com/D15088
2016-01-22 08:13:53 -08:00
epriestley
12a8726783 Fix an issue where the first click on the profile menu collapse link could be swallowed
Summary: `alterClass()` is strict about true/false but we set 0/1 elsewhere.

Test Plan: Collapsed/expanded menu, reloaded expanded menu, clicked collapse, got immediate collapse.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15087
2016-01-22 08:13:44 -08:00
epriestley
6ea9aa39a0 Fix quicksand interaction with HTTP GET prefilling in ApplicationSearch
Summary:
Fixes T10196. This is a weird interaction and this might not be the best long-term fix, but just get it working OK for now.

General problem is that Quicksand doesn't currently use GET for requests. This is a very unusual case where the method is relevant. In the future, I might change Quicksand to use GET.

Test Plan: Clicked "Open Tasks" with Quicksand active, got a results list.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10196

Differential Revision: https://secure.phabricator.com/D15082
2016-01-21 16:29:45 -08:00
Chad Little
6a701c1988 Spiffy up new sidebar, simplify UI
Summary: Mostly a visual spacing pass, also adds in circle icons for edit, collapse. For now removing the fixed position on the icons for simplicity while the basics are being polished.

Test Plan: Projects, Profiles, wide and narrow.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15081
2016-01-21 14:08:59 -08:00
epriestley
d37153f003 Make bin/storage upgrade and bin/storage adjust emit detailed messages if the user has no access to databases
Summary:
Ref T10195. Distinguish between "database does not exist" and "database exists, you just don't have permission to access it".

We can't easily get this information out of INFORMATION_SCHEMA but can just `SHOW TABLES IN ...` every database that looks like it's missing and then look at the error code.

Test Plan:
  - Created a user `limited` with limited access.
  - Ran `bin/storage adjust`.
  - Got hopefully more helpful messages about access problems, instead of "Missing" errors.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10195

Differential Revision: https://secure.phabricator.com/D15079
2016-01-21 13:06:00 -08:00
epriestley
6ebe8db380 Add a missing key to HarbormasterBuildArtifact
Summary: Fixes T10192. This key improves some common queries and is not currently present.

Test Plan: See discussion in T10192. Verified current query plan of real queries is garbage and improved by adding this key.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10192

Differential Revision: https://secure.phabricator.com/D15075
2016-01-21 10:21:19 -08:00
epriestley
b51a859636 Allow diffusion.filecontentquery to load data for arbitrarily large files
Summary:
Fixes T10186. After D14970, `diffusion.filecontentquery` puts the content in a file and returns the file PHID.

However, it does this in a way that doesn't go through the chunking engine, so it will fail for files larger than the chunk threshold (generally, 8MB).

Instead, stream the file from the underlying command directly into chunked storage.

Test Plan:
  - Made a commit including a really big file: 4dcd4c492b
  - Used `diffusion.filecontentquery` to load file content.
  - Parsed/imported commit locally.
  - Used `diffusion.filecontentquery` to load content for smaller files (README, etc).

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10186

Differential Revision: https://secure.phabricator.com/D15072
2016-01-21 09:52:43 -08:00
Chad Little
92ee3e7642 Add basic grey and blue styles for PHUIBoxView
Summary: We plan to use these more in future mocks. Adds base colors and re-uses in Phame.

Test Plan: Phame, mobile and desktop.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15069
2016-01-21 07:14:39 -08:00
epriestley
3f36e498b7 Document the new watcher/member/edit notification mail rules
Summary: Ref T10054. This is mostly for completness so I can reference it when closing all the related tasks.

Test Plan: Read documentation.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10054

Differential Revision: https://secure.phabricator.com/D15066
2016-01-19 19:39:16 -08:00
epriestley
8463ad2659 Replace subscribe/unsubscribe for projects with explicit mail setting
Summary:
Ref T10054. Ref T6113. Users can currently subscribe to projects, which causes them to receive:

  # mail about project membership changes, description changes, etc; and
  # mail to the project, e.g. when the project is added as a subscriber on a task, or a reviewer on a revision.

Almost no one cares about (1), and after D15061 you can use Herald to get this stuff if you really want it. (It will get progressively more annoying in the future with external membership sources causing automated project membership updates.)

A lot of users are confused about (2) and how it relates to membership, watching, etc, and most users who want (2) don't want (1).

Instead, add an explicit option for this and explain what it does.

This is fairly verbose but I've hidden it on the member/watch screen, which is now the "explain how projects work" screen, I guess.

Test Plan:
{F1064929}

{F1064930}

{F1064931}

  - Disabled/enabled mail for a project.
  - Sent mail to a project with mail disabled, verified I didn't get a copy.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T6113, T10054

Differential Revision: https://secure.phabricator.com/D15065
2016-01-19 19:39:02 -08:00
epriestley
5c2e49a812 Allow any user to watch any project they can see
Summary:
Ref T6183. Ref T10054. Historically, only members could watch projects because there were some weird special cases with policies. These policy issues have been resolved and Herald is generally powerful enough to do equivalent watches on most objects anyway.

Also puts a "Watch Project" button on the feed panel to make the behavior and meaning more obvious.

Test Plan:
  - Watched a project I was not a member of.
  - Clicked the feed watch/unwatch button.

{F1064909}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T6183, T10054

Differential Revision: https://secure.phabricator.com/D15063
2016-01-19 19:38:30 -08:00
epriestley
01afb50406 Allow project editors to remove watchers
Summary: Ref T10054. There is no technical or product reason not to support this, and it is largely analogous to removing subscribers.

Test Plan:
  - Removed watchers.
  - Removed members.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10054

Differential Revision: https://secure.phabricator.com/D15062
2016-01-19 19:38:07 -08:00
epriestley
a8dd74d292 Add Herald support for projects
Summary:
Ref T10054. Ref T6113. I'm going to remove subscribers from projects to fix the confusion between "watch" and "subscribe".

Users who have unusual use cases where they legitimately want to know when a project's description is updated or members change can use Herald to follow it.

This is also useful in general and improves consistency, although I don't have too many use cases for it.

Test Plan: Wrote a Herald rule, edited a project, saw the rule fire and send me email about the change.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T6113, T10054

Differential Revision: https://secure.phabricator.com/D15061
2016-01-19 19:37:54 -08:00
epriestley
9f36594100 Put feed on project home, move history to a separate page
Summary:
Ref T10054. This shuffles some stuff around to move us closer to mocks in M1450 in terms of what information is on which pages.

Home now has feed, members, watchers, link to "edit project / project edit history".

History now has edit history, edit details, edit picture, archive/unarchive.

Test Plan:
New home page:

{F1064889}

New edit/history page:

{F1064890}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10054

Differential Revision: https://secure.phabricator.com/D15060
2016-01-19 19:37:38 -08:00
epriestley
6b1b21c999 Move member/watch actions to "Members/Watchers" page
Summary:
Ref T10054. This tries to make the members page a bit more consistent and provide hints to users about subproject/milestone membership rules. In particular:

  - You now join, leave, watch, unwatch, add and remove members, and lock and unlock membership from the members screen.
  - We now explain the membership rule for the project on this screen. There are currently four rules:
    - Normal Project: Join/leave normally.
    - Parent Project: Uses subprojects to determine members.
    - Milestone: Uses parent project to determine members.
    - Locked: Membership is locked.
    - (Future) Imported from LDAP/other external sources: Membership is determined by something else.

Test Plan: {F1064878}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10054

Differential Revision: https://secure.phabricator.com/D15059
2016-01-19 19:37:27 -08:00
Chad Little
b1c77f6527 Add new Project icons, 200px
Summary: Adds 64? or so 200px (retina) icons for better Project organization.

Test Plan: Edit Picture -> Choose Icon -> Retro Camera -> Save.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15057
2016-01-19 13:23:14 -08:00
epriestley
0a554c2ed5 Allow profile menus to be collapsed and expanded
Summary:
Ref T10054. I think this gets everything except:

  - circles on icons;
  - I spent ~15 minutes poking at animations but wasn't able to get anything that looked reasonable whatsoever.

Test Plan:
  - Collapsed menus.
  - Expanded menus.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10054

Differential Revision: https://secure.phabricator.com/D15056
2016-01-19 13:16:54 -08:00
epriestley
c51752b4aa When publishing project transactions, load ancestor members
Summary: Ref T10010. Fixes T10107. When we publish a transaction about a project, we perform visibility checks for many different users. We need to know all of the ancestors' members to perform these checks.

Test Plan:
  - Before patch: when updating a subproject, daemons fatal trying to publish things because they can not test visibility of parent projects.
  - After patch: daemons successfully publish subproject updates.
  - Also added a unit test.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10010, T10107

Differential Revision: https://secure.phabricator.com/D15054
2016-01-19 10:02:47 -08:00
epriestley
99ea7082d6 Add a missing transaction query class for panel transactions
Summary: Ref T10054. The daemons look for this but currently can't find it.

Test Plan: Ran daemons, clean exit on profile menu edits instead of permanent failure.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10054

Differential Revision: https://secure.phabricator.com/D15053
2016-01-19 10:02:29 -08:00
Chad Little
f7646b40aa Remove defunt project image choices
Summary: These are old project image choices, remove and only go with FontAwesome related images.

Test Plan: Project -> Edit Picture -> Save

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15051
2016-01-19 08:50:59 -08:00
Chad Little
550793f9a4 Remove header gradients for flat colors
Summary: Removes header gradient images for flat, CSS controlled colors. I didn't convert the "pony" colors over, going with few options for easier theme-ability.

Test Plan:
Test each color choice.

{F1063828}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15052
2016-01-19 07:17:02 -08:00
epriestley
a9a5991f01 Update project profile image composer for new IconSet code
Summary:
Fixes T6856. Fixes T10164.

  - Make the profile image composer code use the underlying icon name instead of the top-level icon key, so it works instead of 404'ing.
  - Change the button to show a preview of the profile icon instead of the text "Use Icon and Color".
  - When creating a new non-milestone project, automatically set the profile image to the icon + color image.

Test Plan:
  - Created several new projects, saw appropriate default icons.
  - Edited projects, saw icon previews.
  - Clicked icon buttons to set icons.
  - Poked around other applications which use builtins (Pholio, user profiles) to look for anything I broke, but everything seemed fine.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T6856, T10164

Differential Revision: https://secure.phabricator.com/D15050
2016-01-18 15:09:21 -08:00
epriestley
155cb1d2c5 Fix two issues with repository monogram regular expressions
Summary: Ref T4245. Fixes T10172. These regular expressions were simply incorrect: they intend `<start> (form one | form two) <end>` but were written as `(<start> form one) | (form two <end>)` which allowed stuff like "R2/R13" to be interpreted as a monogram because it matches `(<start> form one)`.

Test Plan: Parsed commit `ba46ffa6169c` from RTEMS repository, see T10172. Before patch, got an identical trace; after patch, clean import.

Reviewers: chad, avivey

Reviewed By: avivey

Maniphest Tasks: T4245, T10172

Differential Revision: https://secure.phabricator.com/D15049
2016-01-18 09:46:40 -08:00
epriestley
cadd3f1056 When removing project slugs, try to remove raw slugs too so we can remove old/invalid slugs
Summary:
Ref T10168. When we try to remove an additional hashtag, we remove the normalized version.

Instead, remove both the literal and normalized versions. This allows us to remove old/invalid slugs.

Test Plan: Removed garbage slugs like `[,*,]`.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10168

Differential Revision: https://secure.phabricator.com/D15048
2016-01-18 09:14:30 -08:00
epriestley
10ef973735 Allow older, invalid project tags to continue to function
Summary:
Ref T10168.

Around October 12, T9551 made project hashtags stricter and prevented them from containing characters like comma (`,`).

Around December 27, D14888 changed how hashtags queries work so that the query does normalization instead of requiring the caller to normalize.

After the Dec 27 change, projects from before Oct 12 with now-invalid hashtags will no longer load when queried directly by hashtag, because the page queries for `old,[silly]hash,,tag` or whatever, it gets normalized into `old_silly_hash_tag`, and then there are no hits.

Instead, at least for now, query by both the exact raw text and the normalized hashtag. This should keep older stuff working until we can give users more support for migrating forward.

Test Plan:
  - Forced a project to have a bogus hahstag.
  - Before patch: clicking its tag 404'd.
  - After patch: clicking its tag now works.
  - Visited a project by alternate hashtag.
  - Visited a project by denormalized hashtag and alternate hashtag (e.g., capital letters instead of lowercase letters), saw it redirect/normalize properly.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10168

Differential Revision: https://secure.phabricator.com/D15047
2016-01-18 09:05:04 -08:00
Chad Little
2144d877ee PHUIIconCircleView
Summary: Icon in a circle. Base class, not much in the way of color choices.

Test Plan:
UIExamples, Chrome.

{F1062027}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15034
2016-01-18 09:02:58 -08:00
epriestley
9ae48d4026 Fix smushing of multiple values in Projects "Additional Hashtags" field
Summary: Ref T10168. When we render this control, we currently don't put commas into the value correctly if there are multiple alternative hashtags.

Test Plan: Edited a project with multiple alternate hashtags. Before change: they all got smushed together. After change: properly comma-separated.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10168

Differential Revision: https://secure.phabricator.com/D15045
2016-01-18 08:34:13 -08:00
epriestley
45a4a68628 Distinguish between "no coverage information" and "no test coverage" better
Summary: Fixes T10169. Diffs with no build targets were incorrectly showing as though they had no test coverage, when we actually want to show them having no coverage information available.

Test Plan: Viewed an older revision, saw a column of "Not Executable" before change, now see no column.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10169

Differential Revision: https://secure.phabricator.com/D15044
2016-01-18 08:34:03 -08:00
epriestley
495e1384dd Fix project queries in Ponder
Summary: Fixes T10167. We were dropping infrastructure joins.

Test Plan: Queried for questions by project.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10167

Differential Revision: https://secure.phabricator.com/D15043
2016-01-18 08:33:54 -08:00
epriestley
77447fc945 Add a motivational profile menu panel
Summary: Motivate your employees with inspirational quotes. A new quote every day!

Test Plan: So inspirational.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15026
2016-01-15 09:14:24 -08:00
epriestley
22aebab1c1 Add a visual divider element to profile menus
Summary: Ref T10054.

Test Plan: {F1061529}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10054

Differential Revision: https://secure.phabricator.com/D15024
2016-01-15 09:14:01 -08:00
epriestley
da5d01e542 Convert user profiles to Profile Panels
Summary:
Ref T10054. Primary goal is to be able to remove IconNav from the codebase.

I've made these non-editable so users can't customize them yet. We //might// want administrators to customize these globally instead? In any case, we avoid a bunch of product questions by just locking these down for now.

Test Plan: {F1061348}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10054

Differential Revision: https://secure.phabricator.com/D15020
2016-01-15 09:13:13 -08:00
epriestley
2a6b2dbbfd Prepare Profile Panels for adoption in other applications
Summary: Ref T10054. Take specialization off the objects and put it on Engine subclasses instead. One reason for this is that certain objects (like users) might have multiple different sets of panels in the future (e.g., their user profile and their home page).

Test Plan:
  - No user-visible changes.
  - PanelEngine no longer has any hardcoded "project" stuff.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10054

Differential Revision: https://secure.phabricator.com/D15018
2016-01-15 09:12:53 -08:00
epriestley
c019f76283 Make profile menu full-height
Summary:
Ref T10054. This makes the profile menu full-height. It uses two pieces of dark magic:

  - `calc()`, which allows you to do math in CSS.
  - The `vh` unit, which is CSS for "viewport height".

Apparently this kind of stuff just works now? CSS got good at some point?

Test Plan:
  - Page looks correct in Safari, Chrome, Firefox.
  - Checked `caniuse.com` for `vh` and `calc()`, saw they're supported?

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10054

Differential Revision: https://secure.phabricator.com/D15017
2016-01-15 09:12:34 -08:00
epriestley
468031d1fd Rough initial cut of profile new profile menu
Summary:
Ref T10054. I haven't done any of the big-picture layout stuff yet, but this should get look-and-feel somewhere in the ballpark of reasonablness, I think.

Major missing stuff:

  - No "collapse" state or action yet.
  - Menu is not full-height (requires changes to the rendering pipeline).

Test Plan: {F1060941}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10054

Differential Revision: https://secure.phabricator.com/D15016
2016-01-15 09:12:09 -08:00
epriestley
5d6dd7df7d Add a basic remarkup typeahead for users and projects
Summary: Ref T3725. This probably has 900,000 bugs. This will need updates for subprojects/milestones.

Test Plan:
  - Tested very gently in Safari, Firefox and Chrome.
  - Reasonable inputs appear to work.
  - Clicking, escape, tab, return, arrow keys work OK?

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T3725

Differential Revision: https://secure.phabricator.com/D15029
2016-01-15 09:11:46 -08:00
Aviv Eyal
aadc1b7bf0 Add PHIDType for HeraldTransaction
Test Plan: Paste a HLXS phid to the quick-search box, get transaction page.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D15028
2016-01-15 16:40:48 +00:00
Aviv Eyal
98d2370672 Add link to Herald Transaction when blocking pushes
Summary: Ref T9719.

Test Plan: Tried to push, get dragon and a link.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley

Maniphest Tasks: T9719

Differential Revision: https://secure.phabricator.com/D15027
2016-01-15 03:01:47 +00:00
epriestley
3f439e25bc Remove newFromMenu() from SideNav
Summary: Ref T10054. Just simplifying this a bit before I start laying in the new profile menus.

Test Plan:
  - Viewed Diviner on desktop and checked the mobile menu.
  - Viewed Files on desktop and checked the mobile menu.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10054

Differential Revision: https://secure.phabricator.com/D15015
2016-01-14 05:33:34 -08:00
epriestley
473693786b Allow profile menu items to be disabled
Summary:
Ref T10054.

I made this a dropdown (currently: "Visible" or "Disabled") since I imagine we //miiiight// want to add a "Hidden, but click 'More' to reveal" state or do other special stuff in this vein. Not 100% sold on that but seemed within the realm of plausibility.

Test Plan: {F1060759}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10054

Differential Revision: https://secure.phabricator.com/D15012
2016-01-13 11:46:15 -08:00
epriestley
1c5167dc74 Allow profile menu items to be reordered
Summary: Ref T10054. Allows users to drag menu items to reorder them.

Test Plan: Reordered a project menu.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10054

Differential Revision: https://secure.phabricator.com/D15011
2016-01-13 11:45:57 -08:00
epriestley
f24318f308 Make "profile menu" configuration mostly work
Summary:
Ref T10054. This does a big chunk of the legwork to let users reconfigure profile menus (currently, just project menus).

This includes:

  - Editing builtin items (e.g., you can rename the default items).
  - Creating new items (for now, only links are available).

This does not yet include:

  - Hiding items.
  - Reordering items.
  - Lots of fancy types of items (dashboards, etc).
  - Any UI changes.
  - Documentation (does feature: TODO link for documentation).

Test Plan:
{F1060695}

{F1060696}

{F1060697}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10054

Differential Revision: https://secure.phabricator.com/D15010
2016-01-13 11:45:31 -08:00
epriestley
bb6df2e5f3 Hacks on Hacks
Summary:
hack hack hack

(`class_exists()` no longer throws in a libphutil environment.)

Test Plan: derpaderp

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15013
2016-01-13 11:09:13 -08:00
epriestley
fdd5500fec Change wording of "Show Entire File" to "Show All Context"
Summary: Fixes T10139. This clarification seems reasonable to me.

Test Plan:
  - Viewed a revision with context.
  - Clicked "Show All Context".
  - Saw "All Context Shown".

{F1060624}

{F1060625}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10139

Differential Revision: https://secure.phabricator.com/D15009
2016-01-13 11:09:01 -08:00
epriestley
102eacbfb7 Make project page/navigation construction more consistent, particularly on mobile
Summary: Ref T10054. This mostly makes sure that mobile gets to have the same profile menu that Desktop does.

Test Plan:
  - Viewed menus on mobile, saw all profile menu actions available.
  - Viewed/used changed pages (column detail, edit column, edit picture).

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10054

Differential Revision: https://secure.phabricator.com/D15008
2016-01-13 09:34:57 -08:00
epriestley
7bde92b9c9 Begin modularizing profile panel/link construction
Summary: Ref T10054. This has no product impact, but prepares us for customizable side nav on "profiles" (today, projects; probably users some day; and maybe other stuff down the road).

Test Plan: Clicked all links on a profile, everything was exactly the same as before.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10054

Differential Revision: https://secure.phabricator.com/D15007
2016-01-13 09:34:41 -08:00
epriestley
1eab16c395 Move repository URIs to a dedicated index
Summary:
Ref T4705 (there are also some other adjacent related tasks dealing with URIs).

Currently, we issue a "get repositories matching URIs: ..." query by loading every possible repository and then checking their URIs in PHP.

Instead, put URIs in a separate table. I plan for each repository to potentially have multiple URIs soon, so this prepares for that.

Test Plan:
  - Ran migrations.
  - Looked at index table, made sure it appeared sensible.
  - Ran some queries by `uri` to find repositories, found the repositories I expected.
  - Updated the remote URI of a repository, saw queries / index update appropriately.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4705

Differential Revision: https://secure.phabricator.com/D15005
2016-01-13 09:34:31 -08:00
epriestley
d57c1d6ce2 Make hashtags at the end of bolded text render properly
Summary: Fixes T10096. The `**` was being parsed as part of the hashtag, so `**#asdf**` interpreted `#asdf**` as a hashtag.

Test Plan: Unit test; bolded stuff with hashy contents.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10096

Differential Revision: https://secure.phabricator.com/D15006
2016-01-12 10:03:20 -08:00
epriestley
dd21761df9 Don't return any results for viewerprojects() if the viewer is in no projects
Summary:
Fixes T10135. When the viewer is a member of no projects, specify the constraint type as a new "EMPTY" type.

When a query has an "EMPTY" constraint, fail fast with no results.

Test Plan:
  - Viewed a viewerprojects() query result set as a user in no projects.
    - Before patch: got a lot of hits. After patch: no hits.
  - Viewed a normal result set, no changes.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10135

Differential Revision: https://secure.phabricator.com/D15003
2016-01-12 07:11:14 -08:00
epriestley
39a87f6000 Turn off subprojects and milestones in the UI completely for now
Summary: A lot of confusing stuff happens when you create a milestone or subproject which isn't explained clearly in the UI. This is causing more harm than good on the balance since we're still figuring out how to move forward here. Just turn it off for now until we're closer to pushing it forward.

Test Plan: Viewed a project, no more UI for subprojects or milestones.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D14999
2016-01-11 14:54:23 -08:00
epriestley
7e0558612b Fix excessively harsh validation of certain complex configuration
Summary:
See IRC. We're supposed to repair configuration, but if custom validators throw a generic `Exception` or use `PhutilTypeSpec` to do a check, we may explode way harder than we intend to.

Instead, soften these exceptions into validation exceptions so we repair configuration, raise a setup issue, and continue.

Test Plan: {F1059609}

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D14998
2016-01-11 14:20:11 -08:00
epriestley
8e1b2f9861 Remove "username@phabricator.mycompany.com" creating a Conpherence
Summary:
Ref T10121. This doesn't work at all at HEAD, and even when it did it was mostly just confusing to installs with unexpected setups where Phabricator is receiving mail at `@mycompany.com` and this is colliding with real addresses.

It might make sense to restore it some day after the next Conphernece update, but just strip it out for now. Since it doesn't work anyway, I'm pretty confident no one is using it.

Test Plan:
  - Before patch: send mail to `dog@local.phacility.com`, got a policy error from Conpherece.
  - After patch: sent mail to `dog@local.phacility.com`, got a correct "no routable recipients" error.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10121

Differential Revision: https://secure.phabricator.com/D14997
2016-01-11 10:32:23 -08:00
epriestley
516ba5e6c5 Fix an issue where generation of mail processing error email could fail in the presence of duplicate headers
Summary:
Ref T10121. If a user sends mail with duplicate headers, like:

```
X-Duplicate: A
X-Duplicate: B
```

...and we process it with `mail_handler.php`, we may end up with `array('A', 'B')` as the header value. When we try to write this back into an error response mail, it fails.

Test Plan:
  - Generated a message with duplicate headers.
  - Piped it into `mail_handler.php` with `--process-duplicates` and `--trace` to get a look at it.
  - Faked an exception.
  - Before patch: bad error email.
  - After patch: clean error email showing multiple header values.

```
$ ./bin/mail show-outbound --id 12386
PROPERTIES
ID: 12386
Status: queued
Related PHID:
Message:

PARAMETERS
sensitive: 1
is-error: 1
force: 1
subject: Error Processing Mail (Exception)
raw-to: ["epriestley@phacility.com"]

HEADERS
X-Phabricator-Sent-This-Message: Yes
X-Mail-Transport-Agent: MetaMTA
X-Auto-Response-Suppress: All

TEXT BODY
Your email to Phabricator was not processed, because an error occurred while
trying to handle it:

Exception: TEST

-- Original Message Body -----------------------------------------------------

testy testy

-- Original Message Headers --------------------------------------------------

from: Evan Priestley <epriestley@phacility.com>
content-type: text/plain; charset=us-ascii
content-transfer-encoding: 7bit
x-smtp-server: smtp.gmail.com:epriestley@phacility.com
subject: test outbound mail
message-id: 7isvptmllqvdvtdxthvdwzg3woj5au7csyuh3hopypjv6y6hqb32qm4bcrd4jtid
x-universally-unique-identifier: 4E489E20-F674-49B2-94BA-0DE44F504EAA
date: Mon, 11 Jan 2016 09:50:12 -0800
date: Mon, 11 Jan 2016 09:50:13 -0800
date: Mon, 11 Jan 2016 09:50:14 -0800
date: Mon, 11 Jan 2016 09:50:15 -0800
to: epriestley@yghe.net
mime-version: 1.0 (Mac OS X Mail 8.2 \(2104\))

HTML BODY
(This message has no HTML body.)
```

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10121

Differential Revision: https://secure.phabricator.com/D14996
2016-01-11 10:16:57 -08:00
epriestley
a061bd2d09 Parse and display commit authorship date in Git in Diffusion
Summary: Fixes T8826. Git tracks an "author date", which may be different from the "committed date". We don't currently extract/show this; do so.

Test Plan: {F1059235}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8826

Differential Revision: https://secure.phabricator.com/D14995
2016-01-11 09:32:37 -08:00
epriestley
9fb929dff3 Show repositories in global autocomplete dropdown
Summary: Fixes T9523.

Test Plan: {F1059225}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9523

Differential Revision: https://secure.phabricator.com/D14994
2016-01-11 09:32:23 -08:00
epriestley
add8333b98 Improve behavior of "owner" transaction in "maniphest.edit" endpoint
Summary:
Fixes T10117.

  - I accidentally broke setting `null` to unassign tasks at some point when I added richer validation.
  - Raise a better error if the user passes junk.

Test Plan:
  - Unassigned a task via API and web UI.
  - Reassigned a task via API and web UI.
  - Tried to do an invalid assign via API, got a sensible error.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10117

Differential Revision: https://secure.phabricator.com/D14992
2016-01-11 09:19:18 -08:00
epriestley
b848ab87b3 Introduce "local names" for commits
Summary: Ref T4245. Full commit display names (like `rPaaaa`) are going to be obnoxious soon in some cases (e.g., `rPaaaa` becomes `R123:aaaa`, which is much uglier) so reduce how often we show the repository in cases where it isn't really necessary to include it.

Test Plan:
  - Saw no more `rX` on repository list view for Git/Mercurial (still present for Subversion).
  - Saw no more `rX` on various repository detail views, except when referencing other commits (e.g., mentions).
  - Grepped for removed `getShortName()`.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D14990
2016-01-11 09:18:30 -08:00
epriestley
96ebd35824 Change repository "Clone/Checkout As" to "Short Name"
Summary:
Ref T4245.

  - Rename "Clone/Checkout As" to "Short Name" in the UI.
  - Allow any repository to have a short name, not just hosted repositories.

Test Plan:
  - Ran migration.
  - Reviewed old transactions, saw they looked good.
  - Edited an existing repository's short name.
  - Gave an imported repository a new short name.
  - Removed a repository's short name.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D14989
2016-01-11 09:17:32 -08:00
epriestley
a06715ccdd Allow repository short names to be used as identifiers
Summary:
Ref T4245. This allows `bin/repository update bread` to work, in addition to `rBREAD`, `R123`, `123`, `BREAD`, etc., if a repository has a short name set.

This primarily affects CLI commands (like `bin/repository`) and Conduit API calls. It has no normal user-facing impact.

Test Plan: Ran `bin/repository update bread` and such.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D14988
2016-01-11 09:17:13 -08:00
epriestley
f59ebf4c09 Fix incorrect key handling in extended policy filtering
Summary:
Via HackerOne. The use of `$key` here should be `$extended_key`.

Exploiting this requires a very unusual group of objects to be subjected to extended policy checks. I believe there is no way to actually get anything bad through the policy filter today, but this could have been an issue in the future.

Test Plan:
  - Added a unit test which snuck something through the policy filter.
  - Fixed use of `$extended_key`.
  - Test now passes.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D14993
2016-01-11 07:04:47 -08:00
epriestley
0b3d10c3da Enforce sensible, unique clone/checkout names for repositories
Summary:
Fixes T7938.

  - Primarily, users can currently shoot themselves in the foot by putting `../../etc/passwd` and other similar nonsense in these fields (this is not dangerous, but also does not work). Require sensible names.
  - Enforce uniqueness so these names can be used in URIs and as identifiers in the future.
  - (This doesn't start actually using them for anything fancy yet.)

Test Plan:
  - Gave several repositories clone names: a valid name, two duplicate names, an invalid, name, some with no names.
  - Ran migrations.
  - Got clean conversion for valid names, appropriate errors for invalid/duplicate names.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T7938

Differential Revision: https://secure.phabricator.com/D14986
2016-01-11 02:06:44 -08:00
epriestley
e84693f589 Fix a bad lookup in hovercards
Summary:
If you try to pull the hovercard of something you can no longer see (maybe you loaded the page, then the policy changed) there won't be a value in the array here.

(The rest of the code anticipates this possibility.)

Test Plan: Hovered some stuff.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D14987
2016-01-10 12:12:12 -08:00
epriestley
96b1665eaa Link "continue" action to confirm dialog in bulk jobs that are unconfirmed
Summary: See Q266.

Test Plan: Created a bulk job, clicked "Details" instead of "Confirm", clicked "Continue" to get back to confirmation dialog.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D14985
2016-01-10 10:55:58 -08:00
epriestley
cb08757032 Swap S3 to first-party client
Summary:
Ref T5155. Swaps Phabricator over to the new first-party S3 client using the v4 authentication API so it works in all regions.

The API requires an explicit region, so the new `amazon-s3.region` is now required. I'll write guidance about this.

Test Plan:
  - Uploaded files to S3.
  - Migrated ~1GB of files to S3.
  - Loaded a bunch of files off S3.
  - Browsed around the S3 bucket.
  - Deleted a file, verified the data on S3 was destroyed.
  - Hit new setup warning.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T5155

Differential Revision: https://secure.phabricator.com/D14982
2016-01-10 07:55:27 -08:00
epriestley
ff6bfe387d Don't drop "phabricator-remarkup-embed-image" class from Remarkup images with width or height
Summary: Ref T10110. If an image had `width` or `height`, we would accidentally not give it an `$image_class`.

Test Plan:
{F1057988}

{F1057989}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10110

Differential Revision: https://secure.phabricator.com/D14983
2016-01-09 15:40:45 -08:00
epriestley
67ac356b03 Modernize bin/files migrate and fix behavior on chunk engines
Summary: Ref T9828. Mostly just does a minor modernization pass, but also doesn't migrate chunked files since it's not meaningful (they don't have data, directly).

Test Plan: Ran `bin/files migrate` with various flags. Migrated S3 -> Blob and Blob -> S3.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9828

Differential Revision: https://secure.phabricator.com/D14981
2016-01-09 11:46:23 -08:00
epriestley
efba69a440 Give users an explicit error if they try to upload a too-large diff to Differential
Summary:
Ref T8612. If a change affects more than 10K paths + hunks, tell the user it's too big and don't bother trying to write it. We're mostly bounded by INSERTs here.

Also, fix an issue with file upload errors. The keys are real PHP constants, but were accidentally converted to strings in D12797, causing every error to show as "unknown error".

Test Plan: {F1057509}

Reviewers: joshuaspence

Reviewed By: joshuaspence

Maniphest Tasks: T8612

Differential Revision: https://secure.phabricator.com/D14977
2016-01-08 18:53:33 -08:00
epriestley
2c293bdca8 Fix a missed use of project icons in typehaeads
Summary: I missed this in the recent icon customziation thing.

Test Plan: Typehaead'ed some projects, saw icons properly.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D14975
2016-01-08 14:41:11 -08:00
epriestley
9ab22e21b3 Allow installs to customize project icons
Summary:
Ref T10010. Ref T5819. General alignment of the stars:

  - There were some hacks in Conduit around stripping `fa-...` off icons when reading and writing that I wanted to get rid of.
  - We probably have room for a subtitle in the new heavy nav, and using the icon name is a good starting point (and maybe good enough on its own?)
  - The project list was real bad looking with redundant tag/names, now it is very slightly less bad looking with non-redundant types?
  - Some installs will want to call Milestones something else, and this gets us a big part of the way there.
  - This may slightly help to reinforce "tag" vs "policy" vs "group" stuff?

---

I'm letting installs have enough rope to shoot themselves in the foot (e.g., define 100 icons). It isn't the end of the world if they reuse icons, and is clearly their fault.

I think the cases where 100 icons will break down are:

  - Icon selector dialog may get very unwieldy.
  - Query UI will be pretty iffy/huge with 100 icons.

We could improve these fairly easily if an install comes up with a reasonable use case for having 100 icons.

---

The UI on the icon itself in the list views is a little iffy -- mostly, it's too saturated/bold.

I'd ideally like to try either:

  - rendering a "shade" version (i.e. lighter, less-saturated color); or
  - rendering a "shade" tag with just the icon in it.

However, there didn't seem to be a way to do the first one right now (`fa-example sh-blue` doesn't work) and the second one had weird margins/padding, so I left it like this for now. I figure we can clean it up once we build the thick nav, since that will probably also want an identical element.

(I don't want to render a full tag with the icon + name since I think that's confusing -- it looks like a project/object tag, but is not.)

Test Plan:
{F1049905}

{F1049906}

Reviewers: chad

Reviewed By: chad

Subscribers: 20after4, Luke081515.2

Maniphest Tasks: T5819, T10010

Differential Revision: https://secure.phabricator.com/D14918
2016-01-08 14:01:53 -08:00
epriestley
c7520cd9f2 Improve rendering of commit branching graph
Summary:
Fixes T9323. Two minor fixes:

  - On the first commit, don't render a downward line.
  - Clean up a 1px spacing issue that had cropped up a while ago when we added icons or something, I think.

Test Plan:
Before:

{F1057248}

After:

{F1057249}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9323

Differential Revision: https://secure.phabricator.com/D14974
2016-01-08 11:52:07 -08:00
epriestley
d1fb2f7fb9 Make diffusion.filecontentquery return file PHIDs instead of raw content
Summary:
Fixes T9319. Proxied requests (e.g., in the cluster) for binary files (like images) currently fail because we can not return binary data over Conduit in JSON.

Although Conduit will eventually support binary-safe encodings, a cleaner approach to this is just to return a `filePHID` instead of the raw content. This is generally faster and more flexible, and gives us more opportunities to add caching later.

After making the call, the client pulls the file data separately.

We also no longer need to return a complex data structure because we don't do blame over this call any longer.

Test Plan:
  - Viewed images in Diffusion.
  - Viewed READMEs in Diffusion.
  - Used `bin/differential attach-commit rX Dy` to hit attach pathway.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9319

Differential Revision: https://secure.phabricator.com/D14970
2016-01-08 09:29:16 -08:00
epriestley
da3963b009 Convert a low-level VCS query in Diff extraction to a Conduit call
Summary: Ref T9319. Ref T2783. This won't currently work in a future environment where daemons and repositories are not on the same host. Send it over Conduit instead.

Test Plan: Used `bin/differential attach-commit rX Dy` to force attachment, saw valid content pull over Conduit.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T2783, T9319

Differential Revision: https://secure.phabricator.com/D14969
2016-01-08 09:28:15 -08:00
epriestley
413ca12fda Move commit attachment to a separate CLI command
Summary:
Ref T9319. See D14967. As before, this is making a deeply-buried, complex operation easier to test by providing a CLI command.

This adds `bin/differential attach-commit rXnnnn Dnnnn` to pretend that `rXnnnn` was just committed and matched `Dnnnn`.

Test Plan:
  - Ran `bin/differential attach-commit X Y` for several different values, saw updates in the UI.
  - Faked the message parser to make sure stuff still worked there.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9319

Differential Revision: https://secure.phabricator.com/D14968
2016-01-08 09:27:57 -08:00
epriestley
5592e59f92 Improve error message if local Git working copy directory exists but isn't a working copy
Summary: Fixes T9701. I don't want to try to autofix this because destroying the directory could destroy important files, but we can improve the error message.

Test Plan: Faked a failure, ran `repository update X`, got a more tailored error message.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9701

Differential Revision: https://secure.phabricator.com/D14971
2016-01-08 09:26:40 -08:00
epriestley
2fcf571bfd Use more reassuring UI and copy for removing payment methods
Summary:
The old treatment was fairly technical. Give this UI a more human-friendly flow:

  - Use language "remove" instead of "disable". We keep the record that the card existed around for auditing/historical purposes, but it is no longer a valid payment method going forward and can not be undone. I think this aligns with user expectation and actual behavior better than "disable".
  - Only show active methods on the profile screen.

Test Plan: {F1057153}

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D14973
2016-01-08 09:25:36 -08:00
epriestley
0dd947cced Move diff extraction from commits to a separate test with a CLI command
Summary:
Ref T9319. When we discover a commit, we sometimes update the corresponding revision with a "this is the actual committed change" diff and send out a link to the changes between review and commit.

This is currently very difficult to test, because it only happens the first time and you have to either go set up a bunch of objects or add a bunch of special casing to the parser to hit the workflow.

I'm making some changes to how it pulls file content. To make those changes easier to test, first start extracting this stuff so the code can be run with `bin/differential extract ...` instead of needing to do a bunch of more complicated setup steps.

Test Plan:
  - Ran `bin/differential extract ...` to extract diffs from commits.
  - Forced my way through the daemon workflow by faking out a bunch of flags, got a clean extract + attach + update. After this patch, this should rarely be necessary.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9319

Differential Revision: https://secure.phabricator.com/D14967
2016-01-08 09:22:37 -08:00
epriestley
7ba13edc2e Fix an issue with the Phortune card disable route
I think this got clipped in modernization at some point.

Auditors: chad
2016-01-08 09:08:43 -08:00
epriestley
449da36c2f Use a path digest when building blame cache keys
Keys have a maximum length of 128, and long paths could cause key lengths to exceed this.

Auditors: chad
2016-01-06 19:12:57 -08:00
epriestley
d725dedb1e Fix two minor issues with blame that involves revisions
Summary: I was looking at some random un-revisioney repository for most of my testing and missed these.

Test Plan: Viewed blame of a file with some revisions.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D14965
2016-01-06 18:55:48 -08:00
epriestley
438100691d Don't let blame run for longer than 15 seconds
Summary: Fixes T2450. If we spend more than 15 seconds in blame, just cut it off.

Test Plan:
  - Changed timeout to 0.01 seconds.
  - Did blame on a non-highlighted file, got no blame, saw warning.
  - Did blame on a highlighted file, got no blame.
    - Note: you don't get a warning here because of Ajax stuff. It'd be kind of tricky to add and doesn't seem like a big deal so I'm planning to leave it as-is for now.

Reviewers: chad

Reviewed By: chad

Subscribers: 20after4, chasemp

Maniphest Tasks: T2450

Differential Revision: https://secure.phabricator.com/D14964
2016-01-06 18:44:20 -08:00
epriestley
9ab1b5a22d Make mundane performance improvements to Diffusion browse views
Summary:
Ref T2450. This reorganizes code to improve performance.

Mostly, there are a lot of things which are unique per commit (author name, links, short name, etc), but we were rendering them for every line.

This often meant we'd render the same author's name thousands of times. This is slower than rendering it only once.

In 99% of interfaces this doesn't matter, but blame is weird and it's significant on big files.

Test Plan:
Locally, `__phutil_library_map__.php` now has costs of roughly:

  - 550ms for main content (from 650ms before the patch).
  - 1,500ms for blame content (frrom 1,800ms before the patch).

So this isn't huge, is a decent ~20%-ish performance gain for shuffling some stuff around.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T2450

Differential Revision: https://secure.phabricator.com/D14963
2016-01-06 18:43:51 -08:00
Fabian Stelzer
e8d3071452 Implement a git blame cache
Summary: Ref T2450. Ref T2453. Add a repository_blamecache table and cache git blame information

Test Plan: View files in Diffusion with enabled blame

Reviewers: fabe, chad, #blessed_reviewers

Reviewed By: chad, #blessed_reviewers

Subscribers: joshuaspence, epriestley

Maniphest Tasks: T2453, T2450

Differential Revision: https://secure.phabricator.com/D10600
2016-01-06 18:43:30 -08:00
epriestley
0759b84d77 Improve construction of commit queries from blame lookups
Summary:
Ref T2450. File blame tends to have the same commit a lot of times, and we don't do lookups like this efficiently right now.

In particular, for a file like `__phutil_library_map__.php`, we would issue a query with ~9,000 clauses like this:

```
(repositoryID = 1 AND commitIdentifier LIKE "XYZ%")
```

...but only a few hundred of those identifiers were unique. Instead, issue only one clause per unique identifier.

MySQL also seems to do a little better on "commitIdentifier = X" if we have the full hash, so special case that slightly.

Test Plan:
  - Issuing a query for only unique identifiers dropped the cost from 400ms to 100ms locally.
  - Swapping to `=` if we have the full hash dropped the cost from 100ms to 75ms locally.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T2450

Differential Revision: https://secure.phabricator.com/D14962
2016-01-06 18:43:04 -08:00
epriestley
741118a08f Improve Diffusion behavior for directories with impressive numbers of files
Summary:
Fixes T4366. Two years ago, Facebook put 16,000 files in a directory. Today, the page has nearly loaded.

Paginate large directories.

Test Plan:
  - Viewed home and browse views in Git, Mercurial and Subversion.

I put an artificially small page size (5) on home:

{F1055653}

I pushed 16,000 files to a directory and paged through them. Here's the last page, which rendered in about 200ms:

{F1055655}

Our behavior is a bit better than GitHub here, which shows only the first 1,000 files, disables pagination, and can't retrieve history for the files:

{F1055656}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4366

Differential Revision: https://secure.phabricator.com/D14956
2016-01-06 14:19:55 -08:00
Chad Little
ab27af9fc6 Fix badges edit form
Summary: Make sure to subclass the right controller on badges.

Test Plan: arc liberate, make a custom badges edit form.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14961
2016-01-06 21:13:52 +00:00
epriestley
91a01e5703 Improve Diffusion browse performance for large files
Summary:
When looking at a large file in Diffusion:

  - disable highlighting if it's huge and show a note about why;
  - pick up a few other optimizations.

Test Plan: Locally, this improves the main render of `__phutil_library_map__.php` from 3,200ms to 600ms for me, at the cost of syntax highlighting (we can eventually add view options and let users re-enable it).

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D14959
2016-01-06 09:24:35 -08:00
epriestley
9728c65e93 Drive blame generation through diffusion.blame
Summary:
Ref T2450. Ref T9319. This is still a bit messy, but not quite so bad as it was: instead of using a single call to get both blame information and file content, use `diffusion.blame` for blame information.

This will make optimizations to both blame and file content easier.

Test Plan: Viewed a bunch of blame (color on/off, blame on/off).

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T2450, T9319

Differential Revision: https://secure.phabricator.com/D14958
2016-01-06 09:24:21 -08:00
epriestley
f561dc172d Implement a dedicated "diffusion.blame" API method
Summary:
Fixes T2451. Several motivations here, from strongest to weakest:

  - Currently, getting blame and file content are closely entwined. This makes fixing T9319 more difficult, and I want to fix it. I want to separate blame from content so there's more flexibility in how we approach this issue.
  - This makes pursuing T2450 easier, if it turns out to be a meaningful win.
  - If we can get a win on blame performance, we can do `arc blame` eventually if we want.

Test Plan:
  - Blamed in SVN, Git and Mercurial.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T2451

Differential Revision: https://secure.phabricator.com/D14957
2016-01-06 09:24:03 -08:00
epriestley
d326c6096e Make unsubscribing from a project have an effect
Summary:
Fixes T10089. This did work at one point, but was broken by D12868, which got too aggressive about mailing members.

We don't want to send mail to all members by default, only those who are subscribed. The parent implementation of `getMailCC()` handles this for us.

Test Plan:
Joined a project as users A and B. Unsubscribed with B. Made an edit.

Before patch: both A and B got mail. After patch: only A got mail.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10089

Differential Revision: https://secure.phabricator.com/D14955
2016-01-05 18:16:45 -08:00
epriestley
e068188ea1 Mention !status explicitly in the documentation for !close
Summary: Ref T10088.

Test Plan: {F1055107}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10088

Differential Revision: https://secure.phabricator.com/D14953
2016-01-05 15:08:52 -08:00
Chad Little
744215d5ff Add Herald Adapters to Phame
Summary: Adds a basic HeraldAdapter to Phame Blogs and Posts.

Test Plan: Make a Herald rule to CC me on new posts or blogs automatically.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14897
2016-01-05 14:10:43 -08:00
epriestley
94d79c11a9 Show import progress on repository main page
Summary: Fixes T9192.

Test Plan: {F1055042}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9192

Differential Revision: https://secure.phabricator.com/D14951
2016-01-05 14:02:59 -08:00
epriestley
d0cdf1efdb When a repository is importing, show it on the list view
Summary: Fixes T9191. This is pretty fluff but doesn't hurt anything, I guess.

Test Plan: Viewed repository list, saw an importing repository get a little icon.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9191

Differential Revision: https://secure.phabricator.com/D14950
2016-01-05 14:02:30 -08:00
epriestley
f9a5cd2bbd Fix all remaining weird Diffusion request processing
Summary: Ref T4245. This is the last of it, and covers the clone/push stuff.

Test Plan:
  - Cloned git.
  - Pushed git.
  - Cloned mercurial.
  - Pushed mercurial.
  - Visited a `blah.git` URL in my browser just because; got redirected to a human-facing UI.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D14949
2016-01-05 14:01:53 -08:00
epriestley
38f2008e68 Modernize Diffusion lint controllers
Summary: Ref T4245. On their best day these don't work all that well, but I'm pretty sure I didn't make anything worse.

Test Plan:
  - Viewed global lint.
  - Viewed lint for a repository.
  - Viewed lint details for a particular message.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D14948
2016-01-05 14:01:20 -08:00
epriestley
3cbc239bc6 Modernize most somewhat-weird Diffusion controllers
Summary: Ref T4245. This gets everything else except serving HTTP requests (complicated) and lint (quite weird).

Test Plan:
  - Viewed a diff.
  - Viewed externals.
  - Viewed history table to see last modified.
  - Did path completion and validation in Owners.
  - Did tree path search in Diffusion.
  - Viewed a repository.
  - Created a new repository.
  - Looked up symbols.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D14947
2016-01-05 14:00:57 -08:00
epriestley
649f882720 Slightly modernize all Diffusion edit endpoints
Summary: Ref T4245. Prepares edit endpoints for more flexible repository identifiers.

Test Plan:
  - Added, edited, deleted mirror.
  - Created repository.
  - Edited basic repository information.
  - Edited policies for a repository.
  - Activated/deactivated repository.
  - Updated a repository.
  - Hit "Delete" dialog for a repository.
  - Edited hosting.
  - Toggled dangerous changes.
  - Edited branches.
  - Edited automation.
  - Tested automation.
  - Edited storage.
  - Edited staging.
  - Edited encoding.
  - Edited symbols.
  - Edited branches.
  - Edited actions.
  - Tried to do edits as an unprivileged user.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D14945
2016-01-05 14:00:36 -08:00
epriestley
2bfc5ff92e Modernize more Diffusion controllers
Summary: Ref T4245. Standardize how context is read, minor updates / modernizations / consistency tweaks.

Test Plan:
  - Viewed a change.
  - Viewed brnaches.
  - Edited a commit.
  - Viewed tags.
  - Viewed history.
  - Added, edited and deleted a mirror.
  - Viewed push events.
  - Viewed a particular event.
  - Viewed ref disambiguation.
  - Viewed repository list.
  - Ran automation test.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D14944
2016-01-05 14:00:20 -08:00
epriestley
f1c298203a Return no results from grep repository queries on error
Summary: Fixes T7852. Although `1` could also indicate other kinds of problems, assume it means "no results".

Test Plan: Searched for nonsense strings in Git and Mercurial. Searched for valid strings in Git and Mercurial.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T7852

Differential Revision: https://secure.phabricator.com/D14943
2016-01-05 13:59:12 -08:00
epriestley
8b6edaa4e2 Merge and modernize Browse controllers in Diffusion
Summary:
Ref T4245. Browsing is huge and currently split across 5 files using controller delegation.

Although having a huge file isn't great, I think the way it is split up is currently worse, and it gets weird with more flexible repository identifiers.

So this is mostly merging five controllers into one, then a bit of modernization.

I think this can probably be split up better by pulling some of it out into views, instead of using delegation.

Test Plan: Browsed files, directories, and search results.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D14942
2016-01-05 13:58:55 -08:00
epriestley
7de17fb75e Modernize tag and branch controllers in Diffusion
Summary: Ref T4245. Prepares these controllers to accept alternate identifers, plus minor spacing and layout fixes.

Test Plan: Viewed tags, viewed branches.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D14941
2016-01-05 13:58:36 -08:00
epriestley
fb3b4ee532 Make CommitController more flexible about handling URIs
Summary:
Ref T4245. This adds support for both ID-based and callsign-based routes, although the ID-based routes don't occur anywhere.

Also moves toward simplifying the DiffusionRequest stuff.

Test Plan: Visited normal callsign-based commit pages; visited new ID-based commit pages.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D14940
2016-01-05 13:56:27 -08:00
epriestley
07e2596aa1 Move generateDiffusionURI() into PhabricatorRepository
Summary: Ref T4245. This further reduces the reliance on callsigns in Diffusion.

Test Plan:
  - Pretty reasonable test coverage already exists.
  - Browsed repository list, browse view, history view, content view, change view, commit view, tag view, branch view of repositories.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D14937
2016-01-05 04:47:06 -08:00
epriestley
08de131da5 Begin modularizing main menu items
Summary:
Ref T10077. Ref T8918. The way the main menu is built is not very modular and fairly hacky.

It assumes menus are provided by applications, but this isn't exactly true. Notably, the "Quick Create" menu is not per-application.

The current method of building this menu is very inefficient (see T10077). Particularly, we have to build it //twice// because we need to build it once to render the item and then again to render the dropdown options.

Start cleaning this up. This diff doesn't actually have any behavioral changes, since I can't swap the menu over until we get rid of all the other items and I haven't extended this to Notifications/Conpherence yet so it doesn't actually fix T8918.

Test Plan: Viewed menus while logged in, logged out, in different applications, in desktop/mobile. Nothing appeared different.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8918, T10077

Differential Revision: https://secure.phabricator.com/D14922
2016-01-04 06:57:09 -08:00
epriestley
bcfd6bdd81 Move various other callsites away from callsigns
Summary: Ref T4245. These mostly relate to building URIs.

Test Plan: Tried to hunt down as many of these in the UI as I could. Some are a bit tricky but they should be low-risk.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D14933
2016-01-04 06:54:42 -08:00
epriestley
9febfb26a0 Convert diffusion.looksoon to use repository identifiers instead of callsigns
Summary:
Ref T4245. Like everything else, accept more identifiers.

This needs a change in `arc`, which I've made a note about elsewhere.

Test Plan: Used "Update Now" from web UI, saw update get scheduled.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D14932
2016-01-04 06:54:20 -08:00
epriestley
be5b89687e Separate external editor integration from callsigns
Summary: Ref T4245. Pass the whole repository in so it can do something else in a future change.

Test Plan: Loaded changesets in Diffusion.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D14931
2016-01-04 06:54:01 -08:00
epriestley
b1388c5ca1 Remove diffusion.getcommits Conduit API method
Summary:
Ref T4245. This was obsoleted long ago and has no callers in Phabricator or Arcanist.

Also some minor cleanup.

Test Plan: `grep` for callers everywhere.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D14930
2016-01-04 06:53:45 -08:00
epriestley
35e7a1f3c0 Continue reducing callers to getCallsign()
Summary: Ref T4245. More of the same, just narrowing down the easy cases.

Test Plan:
- Called `diffusion.querycommit`.
- Browsed branches.
- Browsed repository.
- Browsed directory.
- Searched for stuff.
- Viewed a commit.
- Viewed a file diff.
- Edited a commit.
- Viewed history.
- Viewed tags.
- Viewed push log.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D14929
2016-01-04 06:53:32 -08:00
epriestley
9d84eb4c74 Allow Conduit API methods in Diffusion to accept any repository identifier
Summary:
Ref T4245. Broaden support to include "ABCD", "rABCD", "1234", "R1234", etc.

This doesn't change the old behavior, just accepts more stuff.

Test Plan:
  - Browsed Diffusion.
  - Made various calls via API console.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D14928
2016-01-04 06:51:04 -08:00
epriestley
37532a0bf0 Remove various additional calls to getCallsign()
Summary: Ref T4245. These are all straightforward to remove.

Test Plan:
- Edited paths in a package.
- Ran `bin/audit delete --repositories ...` with various identifiers.
- Searched by repository for `R3`, `rAAAA` in Harbormaster.
- Did a Herald dry run on a commit.
- Browsed commits, made comments.
- Viewed a Releeph product list.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D14927
2016-01-02 11:04:22 -08:00
epriestley
d9e034f02c Remove calls to getCallsign() from repository daemons
Summary: Ref T4245. These are all descriptive or UI-facing.

Test Plan:
- Ran `bin/repository pull ...` with various identifiers.
- Ran `bin/repository mirror ...` with various identifiers.
- Ran `bin/repository discover ...` with various identifiers.
- Ran `bin/phd debug pull X Y --not Z` with various identifiers.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D14926
2016-01-02 11:03:51 -08:00
epriestley
1b4f5e38ce Fix an issue with rendering some commit hovercards
Summary: This logic wasn't quite right.

Test Plan: Hovered over a recognized commit, got a valid hovercard

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D14925
2016-01-02 11:03:12 -08:00
epriestley
2328e739b7 Fix an issue where Phame could post to the wrong blog
When you `getInt()` an array, PHP decides the array has value `1`. This would
cause us to post to blog #1 incorrectly. I didn't catch this locally because
I happened to be posting to blog #1.

Stop us from interpreting array values as `1`, and fix blog interpretation.

This approach is a little messy (projects has the same issue) but I'll see
if I can clean it up in some future change.

Auditors: chad
2016-01-02 05:20:41 -08:00
epriestley
edcc3232aa Remove calls to getCallsign() in bin/repository scripts
Summary:
Ref T4245. Prepare these scripts for a callsign-free world. This also makes them more flexible and easier to use.

The following are now valid ways to identify a repository for these scripts: ID (`3`), PHID (`PHID-REPO-wxyz`), R<ID> (`R3`), r<CALLSIGN> (`rSKYNET`), CALLSIGN (`SKYNET`).

In the future, a human-readable label (`skynet`) may also become valid.

Test Plan:
- Ran `bin/repository reparse --all ...` with `rX`, `X`, `3`, `R3`.
- Ran `bin/repository reparse --change ...` with `rXaaa`, including short versions.
- Ran `bin/repository update ...` with `rX`, `X`, `3`, `R3`.
- Ran `bin/repository refs ...` with various identifiers.
- Ran `bin/repository pull ...` with various identifiers.
- Ran `bin/repository mirror ...` with various identifiers.
- Ran `bin/repository mark-imported ...` with various identifiers.
- Ran `bin/repository list`.
- Ran `bin/repository importing ...` with various identifiers and examined output.
- Ran `bin/repository edit ...` with various identifiers.
- Ran `bin/repository discover ...` with various identifiers.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D14924
2016-01-02 04:23:26 -08:00
epriestley
ff1bfb64dd Reduce the total number of calls to getCallsign()
Summary: Ref T4245. Before doing any hard work here, we can dramatically reduce the number of things that make calls to `getCallsign()` to make navigating things easier. Almost all of them only care about a monogram, URI, or display name.

Test Plan:
- Searched for `r uniquename` in jump nav.
- Ran `bin/repository reparse --change rXXXyyyyy --trace`, observed query against bad commit table.
- Ran `bin/search index rXXXyyyy --trace --force`, observed proper title when indexing commit.
- Browed repository list, saw proper `rXXX` and appropriate link targets.
- Mentioned `rXXX` in Remarkup, got a link to the right place.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D14923
2016-01-02 04:23:06 -08:00
Chad Little
45ccc930ec Convert Badges to use EditEngine
Summary: Moves Badges over to EditEngine

Test Plan: Create a new Badge, Edit a Badge

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14771
2016-01-01 16:12:13 +00:00
Chad Little
fe6224f505 Add Next and Previous UI to PhamePostView
Summary: Creates a new next/previous UI for PhamePosts, and adds a setFoot to PHUIDocumentViewPro for future use in other apps.

Test Plan:
Test first, next, last posts on Phame in mobile, desktop, and tablet breakpoints.

{F1050152}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14919
2015-12-31 13:09:59 -08:00
epriestley
84a570a61b fix broken link for project creating button
Summary: fix T10074

Test Plan: click the "create project" button

Reviewers: joshuaspence, #blessed_reviewers, epriestley

Reviewed By: joshuaspence, #blessed_reviewers, epriestley

Subscribers: joshuaspence, epriestley

Maniphest Tasks: T10074

Differential Revision: https://secure.phabricator.com/D14917
2015-12-31 05:59:05 -08:00
epriestley
389e4d1b1f Lock milestone projects to an automatic color/icon
Summary:
Ref T10010.

Currently, milestone subproject have editable icons/colors, but I don't think this is likely to be used much (the expectation is that milestones will be common and homogenous, and it doesn't make much sense to pick different icons for "Sprint 32" vs "Sprint 33", I think).

Locking the icon and color lets us simplify the form, make milestones more distinct, and potentially reuse the color later for other things (e.g., active/future/past or on time / overdue or whatever else) or just give them a special color to make them more visible.

The best argument for retaining this that I can come up with is that certain milestones may be special (e.g., Sprint 19 is a major release?), but you can just name it "Sprint 19 (v3.0!)" or something, which seems pretty good for now.

Also don't show milestones on task browse/list view.

Test Plan: {F1048532}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10010

Differential Revision: https://secure.phabricator.com/D14912
2015-12-30 14:42:50 -08:00