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

10453 commits

Author SHA1 Message Date
epriestley
bc41c3f5a5 Use DifferentialCommitMessageParser and Modular Transactions to implement "Auditors: ..."
Summary:
Ref T10978. Updates how we implement "Auditors: ..." in commit messages:

  - Use the same parsing code as everything else.
    - (Also: parse package names.)
  - Use the new transaction code.

Also, fix some UI strings.

Test Plan: Used `bin/repository reparse --herald <commit>` to re-run this code on commits with various messages (valid Auditors, invalid Auditors, no Auditors). Saw appropriate auditors added in the UI.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10978

Differential Revision: https://secure.phabricator.com/D17262
2017-01-30 15:23:05 -08:00
Sébastien Santoro
e16080ce7e Fix typo in DifferentialRevisionCommandeerTransaction
Test Plan: Check at /applications/mailcommands/PhabricatorDifferentialApplication/revision/

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D17265
2017-01-30 12:23:07 -08:00
Chad Little
7a947947a3 Fix operator error in Pholio with PHP 7.1
Summary: Fixes T12166. We don't actually need this variable, so removing it.

Test Plan: Upload a new mock, edit a mock, view list of mocks.

Reviewers: epriestley, Mnkras, acs-ferreira

Reviewed By: epriestley, Mnkras, acs-ferreira

Subscribers: acs-ferreira, Korvin

Maniphest Tasks: T12166

Differential Revision: https://secure.phabricator.com/D17260
2017-01-28 15:18:47 +00:00
epriestley
1be3ef0227 Make some Audit status comparisons more lax, so state transactions only post once
Summary:
Ref T10978. Currently, too many "This audit now <something something>" transactions are posting, because this strict `===` check is failing to detect that the audit is already in the same state.

This is because audit states are currently integers, and saving an integer to the database and then reading it back turns it into a string. This is a whole separate can of worms. For now, just weaken the comparison. I'd eventually like to use string constants here instead of integer constants.

Test Plan:
Commented on a "no audit required" commit, didn't see a double "this doesn't need audit" transaction anymore.

Also made a legit state change and did see a state transaction.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10978

Differential Revision: https://secure.phabricator.com/D17258
2017-01-27 11:10:32 -08:00
epriestley
9829ecddd6 Clean up "reorder" permissions in MenuEngine for personal favorites
Summary:
Fixes T12159. This is similar to D17228, which fixed this for the main configuration operation.

Most other edit operations only test for edit capability on the MenuItem itself, which we already do correctly. However, because reordering affects all items, we test for capability on the object.

Weaken this when reordering custom items.

Test Plan: Reordered custom items in Favorites as a non-administrator.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12159

Differential Revision: https://secure.phabricator.com/D17257
2017-01-26 19:47:07 -08:00
Christopher Wetherill
bee043b163 Display paste line count alongside snippets
Summary: Fixes T11547. I //think// this mostly gets about addressing @epriestley's comments in D16465 and stores each paste's line count in its snippet so that we can display the actual number of lines in the paste rather than '5 Lines'. Let me know if this is on the right track!

Test Plan: Open /paste and see that each paste's actual line count is reported.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T11547

Differential Revision: https://secure.phabricator.com/D17256
2017-01-26 19:06:23 -05:00
epriestley
2e3e078358 Remove "diffusion.createcomment" Conduit API method
Summary: Ref T10978. This was introduced in D6923 in 2013 as a deprecated method (before methods were extensible) and has only ever been deprecated. It no longer works after D17250 (despite my mistaken claim there that we never had an API for actions), and has been superceded by `diffusion.commit.edit` which is a modern, fully-power method.

Test Plan: Viewed Conduit console, no longer saw method.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10978

Differential Revision: https://secure.phabricator.com/D17254
2017-01-26 12:57:15 -08:00
epriestley
5960b1c8a3 Allow menu items to render their own content; make Dashboard items render on-page
Summary:
Ref T11957. When you click a dashboard item, it now sends you to `/<app>/item/view/123/`, which renders the proper crumbs, navigation, etc., with the dashboard as page content.

This works as you'd expect in Projects:

{F2508568}

It's sliiiightly odd in Favorites since we nuke the nav menu, but seems basically fine?

{F2508571}

Test Plan:
  - Created a dashboard panel on a project.
  - Clicked it, saw it render.
  - Made it the default panel, viewed project default screen, saw dashboard.
  - Disabled every panel I could, still saw reasonable behavior (this is silly anyway).

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11957

Differential Revision: https://secure.phabricator.com/D17255
2017-01-26 12:57:03 -08:00
epriestley
97cac83e9b Add a "Needs Verification" state to Audit
Summary:
Fixes T2393. This allows authors to explicitly say "I think I fixed everything, please accept my commit now thank you".

Also improves behavior of "re-accept" and "re-reject" after new auditors you have authority over get added.

Test Plan:
  - Kicked a commit back and forth between an author and auditor by alternately using "Request Verification" and "Raise Concern".
  - Verified it showed up properly in bucketing for both users.
  - Accepted, added a project, accepted again (works now; didn't before).
  - Audited on behalf of projects / packages.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T2393

Differential Revision: https://secure.phabricator.com/D17252
2017-01-25 13:08:59 -08:00
epriestley
ca182c7f48 Clean up "Audit Authority" code, at least mostly
Summary:
Ref T2393. We had three copies of this code ("which packages/projects can a user accept on behalf of?"). I removed one in D17250. This consolidates the other two.

This still isn't perfect and it should probably live in a Query or something some day, but there's some weird stuff going on with the viewer in the editor context, and at least the code handles the viewer correctly now and isn't living somewhere weird and totally unrelated to auditing, and the callsites don't need to do a bunch of extra work.

This also moves towards fixing the "re-accept if you've already accepted but then a new package you have authority over was added" bug, which we fixed recently in Differential. This should be less common in Audit, but should still be fixed.

Test Plan: Viewed and audited commits with a mixture of user, package, and project auditors. Saw actions apply to the expected set of auditors.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T2393

Differential Revision: https://secure.phabricator.com/D17251
2017-01-25 13:08:25 -08:00
epriestley
b3912dd088 Remove old Audit code "Action" transaction editing code
Summary:
Ref T2393. This code is no longer reachable (we never had an API for auditing in Diffusion) and unused. Clean it up before implementing new states/actions.

(Note that code for displaying these transactions still needs to stick around for a bit, we'll just never apply new ones from here on out. They've been replaced with modular transactions.)

Test Plan: Grepped for usage, commentd on / audited a commit.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T2393

Differential Revision: https://secure.phabricator.com/D17250
2017-01-25 13:08:10 -08:00
epriestley
36d936fe8a Remove an unused method in Audit for building comment actions
Summary: Ref T2393. This has been obsoleted by stacked actions and is no longer used.

Test Plan: Grepped for callsites, viwed commits.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T2393

Differential Revision: https://secure.phabricator.com/D17249
2017-01-25 13:07:48 -08:00
epriestley
df939f1337 Fix two issues with embedding other fields inside "Summary" or "Test Plan" in Differential with the web UI
Summary:
Ref T11114. Converting to EditEngine caused us to stop running this validation, since these fields no longer subclass this parent. Restore the validation.

Also, make sure we check the //first// line of the value, too. After the change to make "Tests: xyz" a valid title, you could write silly summaries / test plans and escape the check if the first line was bogus.

Test Plan: {F2493228}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11114

Differential Revision: https://secure.phabricator.com/D17248
2017-01-25 13:07:30 -08:00
Chad Little
ce09ab9b0e Use new menu contsants in home menu item
Summary: Ref T11957, just lays in some minor bug fixes. Sets correct menu, removes sidebar on edit.

Test Plan: Test /menu/ on home with Admin and Normal accounts.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T11957

Differential Revision: https://secure.phabricator.com/D17247
2017-01-25 09:22:05 -08:00
epriestley
ed38642afc Give Audit an informational "This commit now requires (something)..." transaction
Summary: Ref T2393. This adds a state-change transaction hint to Audit, like we have in Differential. This is partly for consistency and partly to make it more clear what should happen next.

Test Plan: {F2477848}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T2393

Differential Revision: https://secure.phabricator.com/D17243
2017-01-25 07:53:18 -08:00
Chad Little
01b35cdc12 Add some sort of sort to Emoji Autocomplete
Summary: Ref T12139. Adds sorting by shortname. Also I sorted everything else. No reason. It didn't help

Test Plan: `:star`

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T12139

Differential Revision: https://secure.phabricator.com/D17246
2017-01-24 20:21:06 -08:00
Chad Little
1fed61cf9d Jiggle Fonts for Windows
Summary: Moves the fonts around for better Windows fallback

Test Plan: Windows 10 Edge / Chrome

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D17245
2017-01-24 15:59:26 -08:00
Chad Little
f930fd2e00 Add an Emoji Typeahead
Summary:
This adds a more complete emoji datasource, with a typeahead and autocomplete. It works by pulling in a raw datasource from EmojiOne (I chose Unicode 8, but they have a Unicode 9 datasource as well) and transforming it for speed/need. If we build more robustness or an actual picker into the Remarkup bar, having the additional keywords, etc, might be important. When Unicode 9 support is more prevalent, we should only need to update the single file.

 Tossing up as a proof of concept on engineering direction. Also I can't quite get the autocomplete to complete.

Test Plan: Test UIExamples, Autocomplete, and TypeaheadSource

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T12139

Differential Revision: https://secure.phabricator.com/D17244
2017-01-24 13:13:10 -08:00
Chad Little
e9e4c6f6a0 Enable color emoji on Windows
Summary: Ref T12139, installs 'Segoe UI Emoji' as a standard font call for color emoji on Windows devices.

Test Plan: Review Emoji on Win 10 Chrome / Edge, Mac Chrome / Safari.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T12139

Differential Revision: https://secure.phabricator.com/D17241
2017-01-24 01:39:59 +00:00
Chad Little
3749ecaa66 Fix fatal saving menu items without custom validation
Summary: Fixes T12142. Correct spelling of method.

Test Plan: Edit the name of a Details menu item in projects, or add a divider.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T12142

Differential Revision: https://secure.phabricator.com/D17240
2017-01-22 08:42:22 -08:00
Chad Little
20d1bb8fdf Remove counts from home navigation
Summary: Ref T12136. This just yanks the band-aid off. Fundamentally these were useful well before Dashboards and advanced bucketing, but not so much any more. They also have some performance hit.

Test Plan: Add some tasks and diffs onto a new instance, see there is no count on the home menu bar.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T12136

Differential Revision: https://secure.phabricator.com/D17238
2017-01-21 13:55:40 -08:00
epriestley
402b6473d8 Move Favorites and User menus to MenuBarExtensions
Summary:
Ref T12140. The major effect of this change is that uninstalling "Home" (as we do on admin.phacility.com) no longer uninstalls the user menu (which is required to access settings or log out).

This also simplifies the code a bit, by consolidating how menus are built into MenuBarExtensions instead of some in Applications and some in Extensions.

Test Plan:
  - While logged in and logged out, saw main menus in the correct order.
  - Uninstalled Favorites, saw the menu vanish.
  - Uninstalled Home, still had a user menu.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12140

Differential Revision: https://secure.phabricator.com/D17239
2017-01-21 08:50:08 -08:00
epriestley
ddf82a815b Remove duplicate setIsRequired()
Summary: See D17235.

Test Plan: tarnation

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D17237
2017-01-20 12:26:50 -08:00
epriestley
d24739ee3c Minor consistency/order updates for menu items which reference other objects
Summary:
See T11957#208140.

  - Let Applications have a custom name, like other object items (for example, so you can call Maniphest "Tasks" if you prefer).
  - Put the optional name field after the required typeahead field for these items.
    - (I left "Link" in "Name, URI" order since both are required, but there's maybe an argument for swapping them?)

Test Plan:
  - Created each type of item, saw "thing, name" order.
  - Created an application with a cusotm name, saw custom name.
  - Removed custom name, saw original name.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D17236
2017-01-20 11:58:39 -08:00
epriestley
8113b76910 Validate menu item fields (links, projects, dashboards, applications, forms, etc)
Summary:
Ref T12128. This adds validation to menu items.

This feels a touch flimsy-ish (kind of copy/paste heavy?) but maybe it can be cleaned up a bit once some similar lightweight modular item types (build steps in Harbormaster, blueprints in Drydock) convert.

Test Plan:
  - Tried to create each item with errors (no dashboard, no project, etc). Got appropriate form errors.
  - Created valid items of each type.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12128

Differential Revision: https://secure.phabricator.com/D17235
2017-01-20 11:58:25 -08:00
Chad Little
58c857a681 Remove motivator panel
Summary: Removes the often funny, but never really used but will cause us bug reports someday.... cat facts.

Test Plan: Install cat facts, run storage upgrade, see no cat facts in menu.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T12126

Differential Revision: https://secure.phabricator.com/D17233
2017-01-19 14:55:19 -08:00
Chad Little
14dfff9c99 Mark fields as required on MenuItems
Summary: Mark required fields as required. Though in testing, none of these work.

Test Plan: Try to save a form without an app/project/dashboard and see success (not expected)

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D17231
2017-01-19 13:41:18 -08:00
Chad Little
1bcc8a3d98 Remove timeline from Profile Manage
Summary: Not sure this page is really providing any value, the timeline always says "edited this object" and there is a list of actions. Seems we could move actions back to the profile proper, but they feel very... engineery to me. Or we could fix the timeline stories, but my guess is they aren't useful or we would have gotten such feedback.

Test Plan: Review manage page, timeline is gone. Page is clean.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D17230
2017-01-19 13:15:25 -08:00
epriestley
a9158d34d4 Show commit audit status in repository history tables, including merge commit lists
Summary:
Fixes T6024. Ref T12121. Currently, we show build status in commit history tables; show audit status alongside it.

Also:

  - Change the "Author/Committer" header to just "Author"; I think it's reasonably obvious what "x/y" means (if you can't guess, you can click the commit and likely figure it out) and this gives us a little more space.
  - Make the audit list look more like the corresponding list in Differential, with similar formatting.

Test Plan:
  - Viewed history of a repostiory, saw audit status.
  - Viewed a merge commit, saw audit status in the list of merged commits.
  - Viewed a commit search results list.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12121, T6024

Differential Revision: https://secure.phabricator.com/D17227
2017-01-19 11:43:21 -08:00
epriestley
b0dfd42eef Don't require edit capability on the Favorites application to edit personal menu items
Summary:
Ref T11096. Currently, editing ProfileMenuItemConfigurations always requires that you can edit the corresponding object.

This is correct for global items (for example: you can't change the global menu for a project unless you can edit the project) but not for personal items.

For personal items, only require that the user can edit the `customPHID` object. Today, this is always their own profile.

Test Plan: As a non-admin, edited personal menu items.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11096

Differential Revision: https://secure.phabricator.com/D17228
2017-01-19 11:15:50 -08:00
epriestley
269dd81f91 Allow users to re-accept or re-reject a revision if they have authority over package/project reviewers not yet in the target state
Summary:
To set this up:

  - alice accepts a revision.
  - Something adds a package or project she has authority over as a reviewer.
  - Because alice has already accepted, she can not re-accept, but she should be able to (in order to accept on behalf of the new project or package).

Test Plan:
  - Created a revision.
  - Accepted as user "dog".
  - Added "dog project".
  - Re-accepted.
  - Could not three-accept.
  - Removed "dog project.
  - Rejected.
  - Added "dog project".
  - Re-rejected.
  - Could not three-reject.

Reviewers: chad, eadler

Reviewed By: chad, eadler

Differential Revision: https://secure.phabricator.com/D17226
2017-01-18 13:16:01 -08:00
epriestley
b8e04fe041 Improve handle batching behavior for commit list view
Summary: Ref T10978. Handle loads can be batched a bit more efficiently by doing them upfront.

Test Plan: Queries dropped a bit locally, but I mostly have the same autors/auditors. I'm seeing 286 queries on my account in production, so I'll check what happens with that.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10978

Differential Revision: https://secure.phabricator.com/D17225
2017-01-18 13:15:45 -08:00
Chad Little
35f4514e3f Fancier user menu
Summary: Builds out more UI to reinforce just who you are in this world... A perfect person.

Test Plan:
Look at myself a lot.

{F2435202}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D17224
2017-01-18 12:33:31 -08:00
epriestley
545dad319e Add an "Auditors" rule for Commits
Summary: Fixes T5889. You can't write a rule like "if no other Herald rules did anything...", but you can use this rule to check for Owners or an explicit "Auditors" field doing things.

Test Plan: Using the test console, ran an "Auditors" rule against a commit with and without an auditor. Got expected pass/fail outcomes.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T5889

Differential Revision: https://secure.phabricator.com/D17221
2017-01-18 10:05:30 -08:00
epriestley
b21cd24341 When Favorites is uninstalled or not visible to the viewer, hide the menu
Summary: Ref T5867. The `executeOne()` currently raises a policy exception if the application isn't visible to the viewer, or we fatal if the application has been uninstalled.

Test Plan:
  - Viewed pages with the application uninstalled, saw working pages with no favorites menu.
  - Viewed pages with the application restricted, saw working pages with no favorites menu.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T5867

Differential Revision: https://secure.phabricator.com/D17219
2017-01-18 07:45:42 -08:00
epriestley
0513a24235 Fix a bad constant in "audit.query"
Summary: Fixes T12117. I typed or copy/pasted this constant wrong while refactoring during T10978.

Test Plan: Called `audit.query`.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12117

Differential Revision: https://secure.phabricator.com/D17218
2017-01-18 07:45:27 -08:00
Chad Little
2d4eb460ab Fix MenuItem names not getting attached
Summary:
- Attach objects when showing configuration screen
- Fix "Forms" to make more sense
- Alter EditEngine title to load correct name by loading object

Fixes T12116

Test Plan: Load up Apps/Projects/Forms on a configure menu, see proper names

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T12116

Differential Revision: https://secure.phabricator.com/D17217
2017-01-17 21:37:41 -08:00
epriestley
9d3f09ab47 Modularize global quick create builtin items
Summary: Ref T5867. Instead of hard-coding projects, tasks and repositories, let EditEngines say "I want a quick create item" so third-party code can also hook into the menu without upstream changes.

Test Plan: Saw same default items in menu.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T5867

Differential Revision: https://secure.phabricator.com/D17215
2017-01-17 15:56:31 -08:00
epriestley
a886969c48 Make documentation items in user menu update as you navigate in Quicksand
Summary: Ref T5867. I sure love Javascript.

Test Plan: Navigated between Home, Diffusion and Differential, opening the user profile menu. Saw appropraite help items.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T5867

Differential Revision: https://secure.phabricator.com/D17214
2017-01-17 15:55:52 -08:00
epriestley
d7e5a8b978 Load global and custom profile menu items in a single query
Summary: Ref T5867. Use a single query to load both personal and global items, then reorder them and add a divider if both groups have some stuff.

Test Plan: Viewed menu, edited personal and global items, viewed/edited existing project menus.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T5867

Differential Revision: https://secure.phabricator.com/D17213
2017-01-17 13:02:14 -08:00
Chad Little
6f5dab634d Redesign header menus and search
Summary:
Still lots to fix here, punting up since I'm running into a few roadblocks.

TODO:
[] Sort Personal/Global correctly
[] Quicksand in Help Items correctly on page changes

Test Plan: Verify new menus work on desktop, tablet, mobile. Test logged in menus, logged out menus. Logging out via a menu, verify each link works as expected. Help menus get build when using an app like Maniphest, Differential. Check that search works, preferences still save.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T12107

Differential Revision: https://secure.phabricator.com/D17209
2017-01-17 12:13:06 -08:00
epriestley
23721799fd Explicitly warn the user multiple times when they try to register an external account with an existing email
Summary: Ref T3472. Ref T12113. This implements the gigantic roadblock nonsense in T3472.

Test Plan: {F2425916}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12113, T3472

Differential Revision: https://secure.phabricator.com/D17212
2017-01-17 11:35:49 -08:00
epriestley
903e37a21b Show yellow "draft" bubble in Audit
Summary: Fixes T6660. Uses the new stuff in Audit to build an EditEngine-aware icon.

Test Plan: {F2364304}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T6660

Differential Revision: https://secure.phabricator.com/D17208
2017-01-16 10:28:59 -08:00
epriestley
62cf4e6b95 Remove some remnants of the old ways commit mesage fields worked from Differential
Summary:
Ref T11114. Ref T12085. I missed a few pieces of cleanup when moving all this stuff over.

In particular, load all fields which use Custom Field storage before doing commit-message-related stuff, instead of just the ones that claim they appear on commit messages.

Test Plan: Edited revisions and made API calls without apparent issues. See followup on T12085, shortly.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12085, T11114

Differential Revision: https://secure.phabricator.com/D17207
2017-01-13 15:29:07 -08:00
Chad Little
36e53fd5d0 Remove collapsable option from ProfileMenu
Summary: Never really used this to full potential and takes up a lot of code and space. Remove option for now and make all profile nav menus small by default.

Test Plan: Review user, project, workboard. Set new menus.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T5867

Differential Revision: https://secure.phabricator.com/D17206
2017-01-13 15:03:31 -08:00
epriestley
7276af6a81 Make yellow "draft" bubbles more generic
Summary:
Fixes T12095. Ref T6660. The old code for this was specific to Differential, using the `DifferentialDraft` table.

Instead, make the `EditEngine` / `VersionedDraft` code create and remove a `<objectPHID, authorPHID>` edge when a particular author creates drafts.

Some applications have drafts beyond `VersionedDrafts`, notably inline comments. Before writing "yes, draft" or "no, no draft", ask the object if it has any custom draft stuff we need to know about.

This should fix all the yellow bubble bugs I created in T11114 and allow us to bring the feature to Audit fairly easily.

Test Plan: Created and deleted comments and inlines, reloading the list view after each change. Couldn't find a way to break the list view anymore.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12095, T6660

Differential Revision: https://secure.phabricator.com/D17205
2017-01-13 09:02:19 -08:00
epriestley
e684794bf3 Get "Create Revision" out of Quick Create menu for now
Summary:
Ref T12098.

We have two methods (`supportsEditEngineConfiguration()` and `isEngineConfigurable()`) which sort of do the same thing and probably should be merged.

For now, just swap which one we override to get "Create Revision" out of the Quick Create menu.

Test Plan: No more "Create Revision" in Quick Create menu.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12098

Differential Revision: https://secure.phabricator.com/D17204
2017-01-13 09:00:44 -08:00
epriestley
4d0a03e3d0 Improve commit audit status icons
Summary:
Ref T9482. These may need a little more work (feel free to shoot me a counter-diff) but try to:

  - Never use only color to distinguish between states (for colorblind, etc users).
  - Give the "nothing needs to be done" state a more obvious "okay" icon (instead of a question mark).

Test Plan: Looked at some linked commits in Maniphest, the icons made a bit more sense?

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9482

Differential Revision: https://secure.phabricator.com/D17203
2017-01-12 16:35:43 -08:00
epriestley
7ccc4cea43 With APCu 5+, use apcu_* function to examine cache state
Summary: Ref T9640. APCu 5.0+ (for PHP7) uses `apcu_*` functions instead of `apc_` functions. Test for function existence and call the appropriate functions.

Test Plan: {F2352695}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9640

Differential Revision: https://secure.phabricator.com/D17198
2017-01-12 15:59:44 -08:00
epriestley
a2cd3d9a89 Change PHP 7 setup warning to complain about 7.0 only, not 7.1+
Summary: Ref T9640. On 7.0 we had signal handling issues so we can never support it, but async signals should resolve them on 7.1 or newer.

Test Plan: On PHP 7.1, got through the setup warning.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9640

Differential Revision: https://secure.phabricator.com/D17197
2017-01-12 15:59:28 -08:00