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

11079 commits

Author SHA1 Message Date
Chad Little
1392872c5c Convert people manage page to two column
Summary: Ref T10545, this brings flags back? and converts the layout to two column w/curtain

Test Plan: View a few manage pages.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T10545

Differential Revision: https://secure.phabricator.com/D15449
2016-03-09 08:57:11 -08:00
epriestley
e5f867e0df Add Nuance daemons and item types
Summary:
Ref T10537. This adds an update daemon for pulling item data (e.g., figuring out who the author of a GitHub comment is) and routing items (e.g., sending them to a queue or applying them directly to a task).

Also adds `bin/nuance update --item X` for doing this manually for debugging.

And adds item types, for specializing item behavior. Previously, sources completely dictated item behavior, but I think we want something a little more flexible.

Test Plan:
  - This still does nothing.
  - Ran `bin/nuance update --item 15`.
  - Saw an item route to a default queue.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10537

Differential Revision: https://secure.phabricator.com/D15441
2016-03-09 03:43:06 -08:00
Chad Little
3d44a5c253 Polish up timeline for PHIUTwoColumnView
Summary: This inverts colors and icons a bit, so they're not as harsh. So instead of a dark green item with white icon, its now light green with a dark green icon. I've also changed all text and comment boxes to be "grey" visually to separate out the UI from converation/actions. Give it a spin and let me know how this feels. I still need to update the comment UI.

Test Plan:
UIExamples, lots of various tasks and diffs.

{F1163837}

{F1163839}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15442
2016-03-08 17:51:53 -08:00
epriestley
5d6bb0ffeb Import raw GitHub event data into Nuance
Summary:
Ref T10537. Ref T10538. This polls the GitHub events API and creates Nuance items from the raw data.

It does nothing useful with them.

Test Plan:
  - Polled GitHub.
  - Saw some items get created.
  - X-Poll-Interval seemed to work.
  - ETag seemed to work.
  - Recognizing when we hit items we've already seen seemed to work.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10537, T10538

Differential Revision: https://secure.phabricator.com/D15440
2016-03-08 12:03:11 -08:00
Chad Little
e3a97e31a0 Update Phurl to PHUITwoColumnView
Summary: Cleaner UI, moved visit to be button.

Test Plan: Make a phurl about cats, click on it.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15385
2016-03-08 19:53:44 +00:00
epriestley
fe01949a5c Add a Nuance GitHub repository source and basic polling
Summary: Ref T10537. Ref T10538. This calls GitHub, sorta?

Test Plan:
```
$ ./bin/nuance import --source poem
<cursor:events.repository> Polling GitHub Repository API endpoint "/repos/epriestley/poems/events".
<cursor:events.repository> This key has 4,988 remaining API request(s), limit resets in 1,871 second(s).
<cursor:events.repository> ETag for this request was ""4abdd3d66ad5ca38f5117b094e76f4ba"".
array(4) {
  [0]=>
  array(7) {
    ["id"]=>
    string(10) "3733510485"
...
```

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10537, T10538

Differential Revision: https://secure.phabricator.com/D15439
2016-03-08 10:33:05 -08:00
epriestley
2a3c3b2b98 Provide bin/nuance import and ngram indexes for sources
Summary:
Ref T10537. More infrastructure:

  - Put a `bin/nuance` in place with `bin/nuance import`. This has no useful behavior yet.
  - Allow sources to be searched by substring. This supports `bin/nuance import --source whatever` so you don't have to dig up PHIDs.

Test Plan:
  - Applied migrations.
  - Ran `bin/nuance import --source ...` (no meaningful effect, but works fine).
  - Searched for sources by substring in the UI.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10537

Differential Revision: https://secure.phabricator.com/D15436
2016-03-08 10:30:24 -08:00
epriestley
3f4cc3ad6e Allow Nuances sources to provide import cursors
Summary:
Ref T10537. Some sources (like the future "GitHub Repository" source) need to poll remotes.

  - Provide a mechanism for sources to emit import cursors.
  - Hook them into the trigger daemon so they'll fire periodically.
  - Provide some storage.

This diff does nothing useful or interesting, and is pure infrastructure.

Test Plan:
  - Ran `bin/storage upgrade -f`, no adjustment issues.
  - Poked around Nuance.
  - Ran the trigger daemon, verified it didn't crash and checked for Nuance stuff to do.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10537

Differential Revision: https://secure.phabricator.com/D15435
2016-03-08 10:30:04 -08:00
epriestley
aa5df5fb07 Convert Nuance Sources to EditEngine
Summary: Ref T10537. Converts sources to EditEngine.

Test Plan:
  - Created a new source.
  - Edited an existing source.
  - Submitted a complaint with the complaint form.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10537

Differential Revision: https://secure.phabricator.com/D15434
2016-03-08 10:29:48 -08:00
epriestley
8a7c963908 Allow applications to test if a user could edit a certain field by clicking "Edit Thing"
Summary: See D15432. There, we can use this test to check if the user //could// reassign the task by using "Edit Form" or the stacked actions, so any dedicated "claim" element is consistent with the other permissions.

Test Plan:
  - Added a `var_dump($can_reassign)` after the call.
  - Saw `true`.
  - Edited the edit form, locked and disabled "Assigned To".
  - Saw `false`.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15433
2016-03-08 10:29:34 -08:00
Chad Little
d653b125b5 Add back calendar comment form
Summary: Fix T10544, missed this in testing.

Test Plan: Pull up event, see form, leave comment.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T10544

Differential Revision: https://secure.phabricator.com/D15437
2016-03-08 08:06:54 -08:00
epriestley
86768737c5 Move Nuance Queues to EditEngine
Summary: Ref T10537. Update queue editing to use EditEngine.

Test Plan:
  - Created a new queue.
  - Edited an existing queue.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10537

Differential Revision: https://secure.phabricator.com/D15431
2016-03-07 17:02:05 -08:00
epriestley
6872b96808 Convert Nuance sources and queues to two-column + curtain
Summary: Ref T10537. Update the detail views.

Test Plan:
{F1162212}

{F1162213}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10537

Differential Revision: https://secure.phabricator.com/D15430
2016-03-07 16:34:57 -08:00
epriestley
01ed526527 Modernize Nuance queries and search engines
Summary: Ref T10537. Minor updates to simplify and modernize these codepaths.

Test Plan: Searched for queues and sources.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10537

Differential Revision: https://secure.phabricator.com/D15429
2016-03-07 15:50:47 -08:00
epriestley
98542637a1 Use modern SearchEngine construction in Nuance
Summary: Ref T10537. Minor cleanup of controllers to be more modern / work better on mobile.

Test Plan: Browsed all queue / source pages.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10537

Differential Revision: https://secure.phabricator.com/D15428
2016-03-07 15:50:28 -08:00
epriestley
2ddd78647b Improve "Land Revision" errors for issues related to staging areas
Summary: Ref T10093. Changes must be pushed to staging before they can be landed from the web.

Test Plan:
Changes must be pushed to staging before they can be landed from the web.

{F1161909}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10093

Differential Revision: https://secure.phabricator.com/D15427
2016-03-07 12:46:07 -08:00
epriestley
16a584ac7e Make bin/phd debug quieter by default
Summary:
By default, `bin/phd debug` activates `--trace`, which is incredibly verbose.

Instead, be moderately verbose by default, and only include tracing if `--trace` was passed to `bin/phd debug`.

See also D15422.

Test Plan:
  - Ran `bin/phd debug task`, got moderate amount of most useful debug output.
  - Ran `bin/phd debug task --trace`, got very verbose, detailed low-level debug output.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15423
2016-03-07 08:04:49 -08:00
epriestley
19eee427ad Improve Drydock errors for empty commits and missing changes
Summary: Ref T10093. Show better errors when a commit fails because it has already been merged and when a fetch fails because the ref isn't present in the remote.

Test Plan:
{F1160794}

{F1160795}

Reviewers: chad

Reviewed By: chad

Subscribers: michaeljs1990, yelirekim

Maniphest Tasks: T10093

Differential Revision: https://secure.phabricator.com/D15420
2016-03-07 05:29:25 -08:00
tycho.tatitscheff
821ba8b22e Fix a typo on Almanac User Guide
Summary:
Ref T10527
The lack of a * messed up the remarkup.

Test Plan:
Tested on my instance by pasting the sentence in a phriction document.
See the markup correctly done.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Maniphest Tasks: T10527

Differential Revision: https://secure.phabricator.com/D15421
2016-03-06 15:49:44 -08:00
Chad Little
85b85529ad Minor curtain spacing update
Summary: Removes unused CSS, cleans up curtain spacing.

Test Plan: Test maniphest, etc, in mobile, tablet, desktop

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15418
2016-03-06 13:35:53 -08:00
epriestley
fd9de5d6ec Convert every two-column application except Maniphest to curtain views
Summary: Moves over everything except Maniphest, which has some special behavior.

Test Plan:
  - Viewed a badge.
  - Viewed a calendar event.
  - Viewed a countdown.
  - Viewed a Fund initiative.
  - Viewed a Herald rule.
  - Viewed a macro.
  - Viewed an application.
  - Viewed an owners package.
  - Viewed a credential.
  - Viewed a Ponder question.
  - Viewed a poll.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15416
2016-03-06 10:44:07 -08:00
epriestley
eb1a0799ae Convert Maniphest to curtain view
Summary: Moves Maniphest over, and allows application to provide ad-hoc panels more easily.

Test Plan: {F1160591}

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15417
2016-03-06 10:32:18 -08:00
epriestley
11774ef290 Use curtain views in Almanac
Summary: Convert Almanac interfaces to Curtain views.

Test Plan: Viewed Services, Bindings, Devices, Namespaces and Networks.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15415
2016-03-06 10:31:25 -08:00
epriestley
61f82bb97b Introduce "Curtain" views, panels, and extensions
Summary:
This opens up the new action column to have specialized rendering and behavior. Briefly:

  - Converted applications (right now, only Paste) render a `CurtainView` to build the column content.
  - This view uses new extensions to build panels (projects, subscribers, tokens).
  - The panel extension code and rendering can be changed without breaking old stuff.

Minor changes:

  - Token awards now load their tokens, for consistency/simplicity.
  - Removed the rest of the "fork of" / "forked from" UI in Paste -- I essentially removed these features a while ago, and no one has complained.

Test Plan:
UI is a bit rough, but works, and it's going to get changed now anyway:

{F1160550}

{F1160551}

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15414
2016-03-06 09:27:55 -08:00
epriestley
aaab1011e5 Give AphrontTagView a getViewer(), deprecate getUser()
Summary:
Two minor changes here:

  - Replace `get/setUser()` with `get/setViewer()` for consistency with everything else.
  - `getViewer()` now throws if no viewer is set. We had a lot of code that either "should" check this but didn't, or did check it in an identical way, duplicating work. In contrast, very little code checks for a viewer but works if one is not present.

Test Plan:
  - Grepped for `->user`.
  - Attempted to fix all callsites inside `*View` classes.
  - Browsed around a bunch of applications, particularly Calendar, Differential and Diffusion, which seemed most heavily affected.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15412
2016-03-06 09:27:38 -08:00
epriestley
abb4c03b47 Remove shouldShowSubscribersProperty() from SubscribableInterface
Summary:
Every caller returns `true`. This was added a long time ago for Projects, but projects are no longer subscribable.

I don't anticipate needing this in the future.

Test Plan: Grepped for this method.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15409
2016-03-06 06:01:36 -08:00
Chad Little
220230e08c Fix typo in Phriction contne
Summary: Fix typo in infoview. Fixes T10524

Test Plan: Read.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T10524

Differential Revision: https://secure.phabricator.com/D15410
2016-03-05 19:17:00 -08:00
Chad Little
5a28bff987 Fix variable in StandardPageView
Summary: Found this grepping for `contne`

Test Plan: render any standard page

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15411
2016-03-05 19:16:36 -08:00
Chad Little
6084b7a201 Update Owners for PHUITwoColumn
Summary: Clean up owners a bit, move to two columns.

Test Plan:
Review a package, edit paths, remove all paths. Archive.

{F1139351}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15388
2016-03-05 16:30:06 -08:00
epriestley
0569919eab Fix some visibility issues with inline comments in Diffusion
Summary:
Fixes T10519. Two issues:

First, the acting user wasn't explicitly included in the mail. This usually didn't matter, but could matter if you unsubscribed and then interacted.

Second, we had some logic which tried to hide redundant "added inline comment" transactions, but could hide them inappropriately. In particular, if another action (like a subscribe) was present in the same group, we could hide the inlines because of that other transaction, then //also// hide the subscribe. This particular issue is likely an unintended consequence of hiding self-subscribes.

Instead of hiding inlines if //anything else// happened, hide them only if:

  - there is another "added a comment" transaction; or
  - there is another "added an inline comment" transaction.

This prevents the root issue in T10519 (incorrectly hiding every transaction, and thus not sending the mail) and should generally make behavior a little more consistent and future-proof.

Test Plan:
  - Submitted //only// an inline comment on a commit I had not previously interacted with.
  - Before patch: no mail was generated (entire mail was improperly hidden).
  - After patch: got some mail with my comment.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10519

Differential Revision: https://secure.phabricator.com/D15407
2016-03-05 14:18:49 -08:00
Chad Little
090252a89e Clean up Macro view page
Summary: Sets a header icon, makes "Details" not show if empty, simplifies title.

Test Plan: Review a few Macro pages for changes with and without audio.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15406
2016-03-05 12:42:26 -08:00
Chad Little
010b7811b4 Convert Applications to two column view
Summary: Converts the meta applications application view layout to two column

Test Plan: click through "Configure" on each application, set up some emails. uninstall Phrequent

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15405
2016-03-05 20:34:56 +00:00
Chad Little
f6127f5835 Convert Almanac Binding View to two columns
Summary: Moves over to the new layout. Fixes T10521

Test Plan: Make a binding, view page, add some properties.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T10521

Differential Revision: https://secure.phabricator.com/D15404
2016-03-05 08:23:49 -08:00
Chad Little
5a43e2040e Fix header tag on Hovercards
Summary: Switch to new method.

Test Plan: Hover over task, see tag in correct place.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15403
2016-03-05 15:25:06 +00:00
Chad Little
fec1a154d5 Expand scope of addActionItem in PHUIHeaderView
Summary: Gives a bit more flexibility to add anything to the right side of PHUIHeaderView.

Test Plan: Test Maniphest, Workboards, Project Home, Differential. Grep for `addActionIcon` use. Fixes T10518

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T10518

Differential Revision: https://secure.phabricator.com/D15402
2016-03-04 18:35:05 -08:00
Chad Little
2b1ac4fcec Update Maniphest for PHUITwoColumnView
Summary: Reworks Maniphest into a two column view. Moves priority and color to header, assignee to sidebar. quest points to header, and author to gutter. may be some confusion since priority only displays on open tickets.

Test Plan: with and without description, custom fields, points, tablet, mobile and desktop.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15396
2016-03-04 17:26:38 -08:00
epriestley
2f14a59b1d Unprototype Drydock
Summary:
Ref T10246. Drydock still has a few outstanding issues, but it's mostly minor UI stuff and the documentation has reasonable caveats about it.

Broadly, I don't expect to make any major changes to Drydock in the future (i.e., all the fundamentals seem sound at this point) and it doesn't have any major technical debt or, like, obsolete APIs or anything.

Test Plan: Saw "Drydock" as not-a-prototype in Applications.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10246

Differential Revision: https://secure.phabricator.com/D15401
2016-03-04 17:23:07 -08:00
epriestley
809646c8d2 Unprototype Almanac
Summary: Fixes T10449. Almanac doesn't do a whole lot for the average user, but is in good shape technically and works well, and exposing it in the cluster won't let installs destroy themselves now.

Test Plan: Re-read documentation; grepped for `TODO` (there are a couple, but reasonable to push off); browsed around all the UI things (new two-column looks great), called API methods.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10449

Differential Revision: https://secure.phabricator.com/D15400
2016-03-04 17:22:49 -08:00
epriestley
85bf04ea02 Use EditEngine for AlmanacDevice
Summary: Ref T10449. Modernize the AlmanacDevice code a bit.

Test Plan:
  - Created a device.
  - Edited a device.
  - Listed devices.
  - Viewed a device.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10449

Differential Revision: https://secure.phabricator.com/D15399
2016-03-04 17:22:33 -08:00
epriestley
167da4ec52 Move Almanac Services to EditEngine
Summary: Ref T10449. This modernizes the service creation/editing flow and updates the list view code a little bit.

Test Plan:
  - Created a service.
  - Edited a service.
  - Browsed services.
  - Hit policy exception for editing cluster services with no permission.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10449

Differential Revision: https://secure.phabricator.com/D15398
2016-03-04 17:22:00 -08:00
Chad Little
13813d2268 Minor Ponder spacing updates
Summary: Fix an issue where you've already answered, moved the summary section.

Test Plan: Review an answer with a wiki that i've already answered

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15395
2016-03-03 15:22:33 -08:00
epriestley
e6158391d2 Make Drydock repository operations a little more modern and consistent
Summary: Ref T10457. Use modern controller and UI tech to build the list view and actions.

Test Plan:
  - Viewed operation list.
  - Viewed operation detail.
  - Checked menus on mobile.

{F1139757}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10457

Differential Revision: https://secure.phabricator.com/D15393
2016-03-03 15:22:15 -08:00
epriestley
fc0dc02bb9 Allow Drydock blueprints to be tagged and searched, and give types some little icons
Summary:
Ref T10457.

  - Let blueprints be tagged so you can search and annotate them a little more easily.
  - Give each blueprint type an optional icon to make things a little easier to parse visually.

Test Plan:
  - Tagged blueprints.
  - Searched by tags.
  - Looked at nice little icons.

{F1139712}

Reviewers: chad

Reviewed By: chad

Subscribers: yelirekim

Maniphest Tasks: T10457

Differential Revision: https://secure.phabricator.com/D15392
2016-03-03 15:21:58 -08:00
epriestley
1bdf988556 Convert DrydockBlueprints to EditEngine
Summary:
Ref T10457. Fixes T10024. This primarily just modernizes blueprints to use EditEngine.

This also fixes T10024, which was an issue with stored properties not being flagged correctly.

Also slightly improves typeaheads for blueprints (more information, disabled state).

Test Plan:
  - Created and edited various types of blueprints.
  - Set and removed limits.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10024, T10457

Differential Revision: https://secure.phabricator.com/D15390
2016-03-03 15:21:25 -08:00
epriestley
01379958fa Allow Drydock blueprints to be searched by name
Summary:
Ref T10457. The ngram indexing seems to be working well; extend it into Drydock.

Also clean up the list controller a little bit.

Test Plan:
  - Ran migrations.
  - Searched for blueprints by name.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10457

Differential Revision: https://secure.phabricator.com/D15389
2016-03-03 15:21:12 -08:00
Chad Little
ba5b32f5bb Add headericons a little more consistently
Summary: I kinda like these to differentiate the headers and different object types. Somethings duplicitive, but helps orient the clean header a bit.

Test Plan: Review each in sandbox.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15394
2016-03-03 22:08:00 +00:00
epriestley
ac72927832 Fix overzealous transactions on dashboard panels
Summary: Fixes T10474. This had the same root cause as T10024 -- a missing call to `didSetValueFromStorage()` because of the way the fields work.

Test Plan:
  - Edited a text panel before change, without changing text: got silly transaction.
  - Made change, edited text panel without changing text, no transaction.
  - Made a real edit, got a good transaction.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10474

Differential Revision: https://secure.phabricator.com/D15391
2016-03-03 07:35:03 -08:00
Chad Little
61c45e4927 Update Calendar for PHUITwoColumnView
Summary: Moves calendar event view to PHUITwoColumnView. Tightened up some phui status spacing.

Test Plan: Review Calendar Events, Differential status list.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15387
2016-03-02 18:12:42 -08:00
Chad Little
e08d70a9a5 Touch up HeraldView a bit more
Summary: Better colors, move description to own box, cleaner spacing.

Test Plan: View a few herald rules

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15386
2016-03-03 00:23:11 +00:00
epriestley
e3ed8b5fe1 Sync up UI with actual policy rules in Phame
Summary: Fixes T10504. The "Create Blog" buttons weren't generated by EditEngine, but should be, so that the UI and policies are in sync.

Test Plan:
  - Viewed blog list as user with and without permission to create blogs. Saw correct button state.
  - Tried to create blogs, saw correct result.
  - Viewed empty state of home, clicked "New Blog" buttons.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10504

Differential Revision: https://secure.phabricator.com/D15384
2016-03-02 11:53:28 -08:00
Chad Little
86d6191633 Update Fund for PHUITwoColumnView
Summary: Updates the Fund application to use a two column layout

Test Plan: Make an initiative.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15383
2016-03-02 11:22:34 -08:00
Chad Little
b9a13e56e4 Update Badges for PHUITwoColumnView
Summary: Updates the layout to two column, moves "Add Receipients" to dialog. Ref T10318

Test Plan: Give badges, revoke badges.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T10318

Differential Revision: https://secure.phabricator.com/D15382
2016-03-02 11:17:04 -08:00
Chad Little
6f481aa84f Convert Macro to PHUITwoColumnView
Summary: Converts Macro to new layout

Test Plan: Add Macro, Edit Macro, Mobile, Desktop layouts

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15372
2016-03-02 10:26:06 -08:00
Chad Little
caadd1025a Give PHUITwoColumnView an addPropertySection method
Summary: Simplifies building pages a little more, adds a helper method to just add a property section to the main column automatically above other content.

Test Plan: Review Ponder, Herald, Passphrase, Countdown.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15377
2016-03-02 09:35:27 -08:00
Chad Little
2c43cccddf Update Almanac for PHUITwoColumnView
Summary: Updates Almanac to the new layout, adds some header icons for interest.

Test Plan: Click on all the different almanac pages.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15381
2016-03-02 08:51:49 -08:00
epriestley
078bf59f59 Compress Harbormaster build logs inline
Summary:
Ref T5822.

  - After a log is closed, compress it if possible.
  - Provide `bin/harbormaster archive-logs` to make it easier to change the storage format of logs.

Test Plan:
  - Ran `bin/harbormaster archive-logs` on a bunch of logs, compressing and decompressing them without issues (same hashes, same decompressed size across multiple iterations).
  - Ran new builds, verified logs were compressed after they closed.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T5822

Differential Revision: https://secure.phabricator.com/D15380
2016-03-01 15:26:12 -08:00
epriestley
6514237c0e Implement an iterator for build log chunks
Summary: Ref T5822. This will make it easier to compress and archive chunks without needing to hold them in memory.

Test Plan: Ran a build, looked at some logs.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T5822

Differential Revision: https://secure.phabricator.com/D15378
2016-03-01 15:25:51 -08:00
epriestley
e174cac1b4 Give HarbormasterBuildLogChunk a real table
Summary:
Ref T10457. Currently, this table is an ad-hoc table, but can easily be turned into a normal table.

This will make iterating over log chunks to compress and archive them easier.

Test Plan: Viewed logs, ran `bin/storage adjust` with no issues.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10457

Differential Revision: https://secure.phabricator.com/D15376
2016-03-01 15:25:34 -08:00
epriestley
0daa9ad987 Use PhutilRope as a buffer in Harbormaster BuildLogs
Summary:
Ref T10457. Currently, every `append()` call necessarily generates queries, and these queries are slightly inefficient if a large block of data is appended to a partial log (they do about twice as much work as they technically need to).

Use `PhutilRope` to buffer `append()` input so the logic is a little cleaner and we could add a rule like "flush logs no more than once every 500ms" later.

Test Plan:
  - Ran a build, saw logs.
  - Set chunk size very small, ran build, saw logs, verified small logs in database.

{F1137115}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10457

Differential Revision: https://secure.phabricator.com/D15375
2016-03-01 15:25:19 -08:00
epriestley
cf0957451e Slightly simplify the Harbormaster build log API
Summary:
Ref T5822. This prepares for inline compression and garbage collection of build logs.

This reduces the API surface area and removes a log from the "wait" step that would just log a message every 15 seconds. (If this is actually useful, I think we find a better way to communicate it.)

Test Plan:
Ran a build, saw a log:

{F1136691}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T5822

Differential Revision: https://secure.phabricator.com/D15371
2016-03-01 15:25:04 -08:00
Chad Little
db4fdf8c2d Update Herald for PHUITwoColumnView
Summary: Updates Herald to new two column layout

Test Plan: View herald rule tablet, desktop, mobile

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15373
2016-03-01 20:11:51 +00:00
Chad Little
21f8323612 Fix spaces UI in PHUIHeaderView
Summary: This should consistenly apply the styling regardless of font or size of the Header. Fixes T10485

Test Plan: Visit a Task and a Countdown in a different Space.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T10485

Differential Revision: https://secure.phabricator.com/D15374
2016-03-01 11:49:09 -08:00
Chad Little
fe7e288cf5 Solidify PHUITwoColumnView as a page layout
Summary:
Rolls out a new "Object Page" design with PHUITwoColumnView. This is reasonably polished, but wanted to post it up for you now for feedback before chasing down minor bugs. This implements TwoColumn in the following applications:

 - Ponder
 - Paste
 - Slowvote
 - Countdown
 - Projects
 - Profile
 - Passphrase

This helped track down display issues and inconsistencies and make sure the layout was flexible for different pages.

Test Plan:
Test each of the applications on mobile, tablet, and desktop breakpoints.

{F1135705}

{F1135706}

{F1135707}

{F1135708}

{F1135709}

{F1135710}

{F1135711}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15366
2016-03-01 07:23:08 -08:00
epriestley
8240e0f727 Treat "skipped" unit tests as less interesting than "passed"
Summary:
Ref T10457. Skipped tests are almost always well-behaved (e.g., `testWindows()`, but the test is running on Linux) and not interesting, and we do not expect well-written, solid systems to necessarily have 0 skips.

Although skips //could// indicate that you have missing dependencies on a build server, and thus be a bit interesting, I think they almost always indicate that a particular test is not expected to run in the current environment.

If we wanted to tackle this problem in granular detail, we could eventually add a "Missing" status or similar which would serve as "a skip you //could// reasonably fix in this environment", but I don't think that's too interesting.

Test Plan:
Here's an example of a build result with skips: B10875

{F1136511}

I think this is clearer as "Passed", as this is the expected production state of the build.

Locally, looked at some builds.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10457

Differential Revision: https://secure.phabricator.com/D15369
2016-03-01 06:52:05 -08:00
epriestley
58cea0714b Fix doubling of unbroken build steps in Build Plan view
Summary: Fixes T10479.

Test Plan: Viewed a valid build plan.

Reviewers: hach-que, tycho.tatitscheff, chad

Reviewed By: chad

Maniphest Tasks: T10479

Differential Revision: https://secure.phabricator.com/D15368
2016-03-01 06:51:45 -08:00
epriestley
383b0bdc04 Fix missing cursor data for paging Projects by creation date
Summary: Fixes T10478.

Test Plan: Paged projects by "Created" without errors.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10478

Differential Revision: https://secure.phabricator.com/D15367
2016-02-29 16:08:28 -08:00
epriestley
181e030535 Give unit test results their own table in Differential
Summary: Ref T10457. This gives unit test results a more first-class treatment in the Differential UI, and consolidates some rendering code.

Test Plan:
Before:

{F1135536}

After:

{F1135537}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10457

Differential Revision: https://secure.phabricator.com/D15365
2016-02-29 14:27:22 -08:00
epriestley
d436fecdab Show additional details for failed builds in Harbormaster
Summary:
Ref T10457. When tests fail, it currently takes several clicks to figure out //why// they failed.

In this project, map rebuilds and `liberate` are fairly common failure conditions, but verifying that they were the root issue requires jumping into a build, then scrolling through a log.

Instead, display details if they're available.

Test Plan:
Before:

{F1135453}

After:

{F1135454}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9951, T10457

Differential Revision: https://secure.phabricator.com/D15363
2016-02-29 14:26:45 -08:00
epriestley
3c19b72ca0 Begin making Harbormaster unit test results a little easier to read
Summary: Ref T10457. These lack color and iconography and are difficult to parse. Make them easier to read.

Test Plan:
Before:

{F1135396}

After:

{F1135399}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10457

Differential Revision: https://secure.phabricator.com/D15362
2016-02-29 14:24:08 -08:00
epriestley
5512e9724f Allow Harbormaster build plans to be tagged with projects and searched by tag
Summary: Ref T10457. This is mostly just for consitency, but I imagine it will make managing large/complex build processes easier, and if we support Herald rules it would eventually let you write "Build plan's tags include [whatever]" to apply behavior to a group of plans.

Test Plan: {F1133107}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10457

Differential Revision: https://secure.phabricator.com/D15360
2016-02-29 05:22:59 -08:00
epriestley
f078fd98d7 Support searching for Harbormater build plans by name substring
Summary: Ref T10457. Allow build plans to be queried by name.

Test Plan:
  - Searched for plans by name.
  - Renamed a plan, searched for new name.

{F1133085}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10457

Differential Revision: https://secure.phabricator.com/D15359
2016-02-29 05:22:24 -08:00
epriestley
2e19b78b8d Don't publish anything for "Disable Mail" / "Enable Mail" on projects
Summary:
Fixes T10466. Currently, clicking "Disable Mail" or "Enable Mail" on a project toggles an edge, but it gets a default "added an edge" story and transaction record.

These are confusing, useless and not interesting, so just hide them.

Test Plan:
  - Before patch: clicked enable/disable mail, saw "added an edge" / "removed an edge" stories in feed and project history.
  - After patch: clicked enable/disable mail, saw nothing in feed or project history.
  - (Note that this patch is not retroactive for feed, so already-published stories won't unpublish.)

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10466

Differential Revision: https://secure.phabricator.com/D15361
2016-02-28 16:32:32 -08:00
epriestley
5295c6ba1e Use EditEngine for Harbormaster Build Plans, fix some crumbs/mobile stuff
Summary:
Ref T10457.

  - Use EditEngine for Build Plans.
  - Fix some minor issues with crumbs being inconsistent.
  - Fix some minor issues with mobile menus not being consistent/available.

Test Plan:
  - Created and edited build plans.
  - Poked around in mobile width, verified mobile menu had the right stuff in it.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10457

Differential Revision: https://secure.phabricator.com/D15357
2016-02-27 07:13:29 -08:00
epriestley
c29ba039bb Update Buildable search in Harbormaster
Summary:
Fixes T10011.

  - Modernize searching for buildables.
  - Prepare for `harbormaster.buildable.search`.
  - Allow users to query by status (see T10011).
  - Collapse the four weird "commit / diff / revision / repository" fields into two slightly less weird fields with more UI hinting?

Test Plan: {F1131918}

Reviewers: chad

Reviewed By: chad

Subscribers: Luke081515.2

Maniphest Tasks: T10011

Differential Revision: https://secure.phabricator.com/D15356
2016-02-27 07:13:10 -08:00
epriestley
fdca684814 Slightly improve Buildable list in Harbormaster
Summary:
Ref T10457. This makes diffs/revisions show the revision as the buildable title, and commits show the commit as the title.

Previously, the title was "Buildable X".

Also makes icons/colors/labels more consitent.

Test Plan: {F1131885}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10457

Differential Revision: https://secure.phabricator.com/D15355
2016-02-27 07:11:30 -08:00
epriestley
220ac48801 Remove buildable handle / container handle logic form Harbormaster buildable queries
Summary:
Ref T10457. We currently have these weird, out-of-place methods on Harbormaster queries that just load handles. These were written before HandlePool, and HandlePool is now more convenient, simpler, and more efficient.

Drop this stuff in favor of using handle pools off `$viewer`.

Test Plan: Looked at buildable list, looked at buildable detail, grepped for removed methods.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10457

Differential Revision: https://secure.phabricator.com/D15354
2016-02-27 07:11:09 -08:00
epriestley
93b8f803a0 Require "Can Edit" on a build plan to abort or pause associated builds
Summary: Fixes T9614. This is kind of silly, but stop users from fighting turf wars over build resources or showing up on an install and just aborting a bunch of builds for the heck of it.

Test Plan:
  - Restarted / paused / aborted / etc builds.
  - Tried to do the same for builds I didn't have edit permission on the build plan for, got errors.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9614

Differential Revision: https://secure.phabricator.com/D15353
2016-02-26 11:38:43 -08:00
epriestley
c64b822bee Remove obsolete, confusing Harbormaster builds steps
Summary: Fixes T10458. These steps are obsolete and have not worked since the last updates to Drydock. They may eventually return in some form, but get rid of them for now since they're confusing.

Test Plan:
  - Created a build plan with these steps.
  - Removed these steps.
  - Verified the build plan showed that the steps were invalid, and that I could delete them.
  - Deleted them.
  - Added new steps, no obsolete steps were available for selection.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10458

Differential Revision: https://secure.phabricator.com/D15352
2016-02-26 10:34:58 -08:00
Chad Little
0290cf0816 Library Map Update
Summary: Our of date, failed harbormaster build

Test Plan: run `arc liberate`

Reviewers: epriestley, nickz

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15351
2016-02-26 09:47:03 -08:00
Nick Zheng
6861af0cbb When the push phase of "Land Revision" fails, show the error in the UI
Summary: T10447

Test Plan: tested on my dev instance

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, yelirekim

Differential Revision: https://secure.phabricator.com/D15350
2016-02-26 09:38:39 -08:00
epriestley
7d4b323da2 Store Almanac "service types" instead of "service classes"
Summary:
Ref T10449. Currently, we store classes (like "AlmanacClusterRepositoryServiceType") in the database.

Instead, store types (like "cluster.repository").

This is a small change, but types are a little more flexible (they let us freely reanme classes), a little cleaner (fewer magic strings in the codebase), and a little better for API usage (they're more human readable).

Make this minor usability change now, before we unprototype.

Also make services searchable by type.

Also remove old Almanac API endpoints.

Test Plan:
  - Ran migration, verified all data migrated properly.
  - Created, edited, rebound, and changed properties of services.
  - Searched for services by service type.
  - Reviewed available Conduit methods.

Reviewers: chad

Reviewed By: chad

Subscribers: yelirekim

Maniphest Tasks: T10449

Differential Revision: https://secure.phabricator.com/D15346
2016-02-26 06:21:50 -08:00
epriestley
4c97d88aa4 Allow Almanac bindings to be disabled and unused interfaces to be removed
Summary:
Fixes T9762. Ref T10246.

**Disabling Bindings**: Previously, there was no formal way to disable bindings. The internal callers sometimes check some informal property on the binding, but this is a common need and deserves first-class support in the UI. Allow bindings to be disabled.

**Deleting Interfaces**: Previously, you could not delete interfaces. Now, you can delete unused interfaces.

Also some minor cleanup and slightly less mysterious documentation.

Test Plan: Disabled bindings and deleted interfaces.

Reviewers: chad

Reviewed By: chad

Subscribers: yelirekim

Maniphest Tasks: T9762, T10246

Differential Revision: https://secure.phabricator.com/D15345
2016-02-26 06:21:23 -08:00
epriestley
5b9d8aeae7 Fix two issues with callsign-free repositories
Summary:
Ref T4245. These callsites don't quite do the right thing if a repository has no callsign.

See also <https://github.com/phacility/phabricator/pull/822>.

Test Plan: Made a comment on a commit in a repository with no callsign.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D15344
2016-02-26 06:13:46 -08:00
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
Sébastien Santoro
a4db6f387d Fix typo: discsussions → discussions
Test Plan: Read again the sentence.

Reviewers: joshuaspence, #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D15316
2016-02-21 01:51:03 -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
de4167d683 Put boundary spaces around crumb names so double-clicking doesn't flip out
Summary: Occasionally, double clicking crumbs to select them is useful.

Test Plan: {F1107226}

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15263
2016-02-12 11:13:38 -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
a5bbe256c8 Fix a couple of missing translation strings
Summary: Clean the UI up a little.

Test Plan: {F1106533}

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15259
2016-02-12 08:10:10 -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