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

4269 commits

Author SHA1 Message Date
Anh Nhan Nguyen
ecfb720713 Adding some filters and queries to Macro application
Summary:
Fixes T2778

Introduces `PhabricatorMacroQuery`, which should consolidate all queries regarding macros

Adds `PolicyInterface` to `PhabricatorImageMacro`, as else the query would fail (we should consider adding it to the ApplicationTransaction instead, if that was ever planned)

Adds `Active Macros` filter, making it the default

Adds `My Macros` filter. You may ask why it overwrites `$authors`. Well, I did not want the page jump to the conclusion that it is a search result. It //is// one more or less, but the filter would jump to `seach` instead of `my`. If you want `My Macros` removed, tell me. It is useful only to heavy-macro-uploaders-and-users though. Five or six people in `http://secure.phabricator.(org|com)`, and an estimated dozen and a half at bigger installs.

Test Plan: created multiple macros from multiple authors, disabled them at will. browsed around, verified that Macros only appeared in the right filters and that nothing else broke.

Reviewers: epriestley, chad, btrahan

CC: aran, Korvin

Maniphest Tasks: T2778

Differential Revision: https://secure.phabricator.com/D5409
2013-03-22 09:46:22 -07:00
epriestley
ae1f0e3b1b Introduce ReleephProjectQuery
Summary:
Adds a policy-aware query class for selecting Releeph projects. This doesn't really change anything.

  - Make `ReleephProject` implment `PhabricatorPolicyInterface`, beginning the long journey to make it policy-aware.
  - Implement `ReleephProjectQuery`, for querying projects using cursor-based, policy-aware paging.
  - Use it on the list view, so we load only ~100 projects instead of all of them.
  - Tweaked some of the URI routing stuff to make it a little more consistent with common practices.

Ref T2714.

Test Plan:
{F36434}
{F36435}

Reviewers: edward

Reviewed By: edward

CC: aran

Maniphest Tasks: T2714

Differential Revision: https://secure.phabricator.com/D5390
2013-03-22 06:29:37 -07:00
Afaque Hussain
0c2147336c File list now shows only files which are explicitly uploaded
Summary: Added explicit tags to files which are explicitly uploaded. Fixes T2749

Test Plan: Tested by checking out the files application.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2749

Differential Revision: https://secure.phabricator.com/D5406
2013-03-22 04:59:51 -07:00
Bryan Cuccioli
cff9843859 Add basic token leader board functionality.
Summary: Implement basic token leader board. No pagination yet.

Test Plan: Assign some tasks tokens and check that they are displayed properly.

Reviewers: epriestley

CC: aran, Korvin, chad

Maniphest Tasks: T2689

Differential Revision: https://secure.phabricator.com/D5379
2013-03-21 16:04:29 -07:00
James Rhodes
4674b88ff6 Added configurable welcome content for Phabricator home page.
Summary:
The welcome.enabled feature is turned on by default; unsure of
whether this is desired by upstream.

Test Plan:
Apply the patch and see the welcome content.  It's configurable
in the config.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5339
2013-03-21 16:02:35 -07:00
Anh Nhan Nguyen
489f9e7dfe Added subscriptions to Phriction documents
Summary:
Fixes T2694

added edge infrastructure for Phriction

added mail subject prefix option for Phriction

added messy mail support for subscribers

adds edges to the phriction db, along with the subscriber interface
which gives us subscriptions for free.

simple display of subscribers, adequate to the current design and
sufficient fallbacks for exceptional cases. @chad may
be mailed about that one more UI element may be added to his redesign

mail support is messy. not generic at all. only sends to subscribed non-authors.

Test Plan:
tried out all kinds of stuff. applied patch, subscribed, unsubscribed with multiple
accs. verified proper

edited documents, verified that mail was sent in MetaMTA. Verified
contents, tos and stuff by looking into the db, comparing PHIDs etc.

functional testing per serious MTA (that is, AWS SES) worked wonderfully.

Here's how the subscription list looks like:
{F36320, layout=link}

Reviewers: epriestley, chad, btrahan

Reviewed By: epriestley

CC: hfcorriez, aran, Korvin

Maniphest Tasks: T2686, T2694

Differential Revision: https://secure.phabricator.com/D5372

Conflicts:

	src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php
2013-03-21 10:28:22 -07:00
Chad Little
72606412e4 New Icons
Summary: New Icons for New Apps.

Test Plan: Photoshop

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5399
2013-03-21 10:02:11 -07:00
Anh Nhan Nguyen
34e134b346 Modernized Phriction's History Controller
Summary:
Refs T2686

Migrated History view over to `PhabricatorObjectItemView`

Change type are currently depicted with object bar colors, switch to icon is planned though implementation remains unclear

Test Plan: Looks pretty good

Reviewers: epriestley, chad, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2686

Differential Revision: https://secure.phabricator.com/D5404
2013-03-21 09:27:33 -07:00
Anh Nhan Nguyen
1253e56352 Optimizations to Phriction's Move and Delete Controllers
Summary: Refs T2868

Test Plan: verified expected behaviours still apply (means everything works).

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5402
2013-03-21 09:09:31 -07:00
epriestley
9a515171f4 Phlux v0
Summary:
Yup, it's sitevars.

No conduit or caching or fancy stuff yet.

Ref T2793.

Test Plan:
{F36525}
{F36526}
{F36527}
{F36528}
{F36529}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2793

Differential Revision: https://secure.phabricator.com/D5397
2013-03-20 18:01:52 -07:00
epriestley
eca49cb91f Exclusion of actor as a mail recipient per preference can be overridden
Summary:
Fixes T2797

Currently, emails are sent in no case to the actor if he has disabled the preference to send emails for his own actions. This won't let us send any test emails from the MetaMTA application to ourselves.

This revision corrects the latter by specifically overriding the option for test emails.

Test Plan:
tried to send emails to myself. verified test mail got blocked with change not applied.

applied the change. verified new change with both preference enabled and disabled did work fine.

Reviewers: epriestley

Reviewed By: epriestley

CC: kai, aran, Korvin

Maniphest Tasks: T2797

Differential Revision: https://secure.phabricator.com/D5398
2013-03-20 15:50:02 -07:00
Lauri-Henrik Jalonen
404d514d0e Pholio inline comment now include a thumbnail and link
Summary: Pholio inline comment now include a thumbnail and link to the Image being commented on

Test Plan: {F36331}

Reviewers: chad, epriestley

Reviewed By: epriestley

CC: aran, Korvin, btrahan

Maniphest Tasks: T2709

Differential Revision: https://secure.phabricator.com/D5375
2013-03-20 05:39:36 -07:00
Bob Trahan
b78fb12324 Conpherence - tweak file display
Summary: using chrome and safari and the mighty "YAYAYAYAYAYAYAYAYAYAYAYAYAYAYAYAYAYAYAYAYAYAYA.gif", tweak _shorten and CSS to get display just right

Test Plan: will upload screenies

Reviewers: epriestley, chad

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2399

Differential Revision: https://secure.phabricator.com/D5383
2013-03-19 15:54:22 -07:00
Nick Harper
3f708710eb Don't barf on bad commit identifiers
Summary:
If someone provides an invalid svn rev number (like providing a git commit
hash instead) for a diffusion commit, we should ignore it like we ignore
other bad input to DiffusionCommitQuery, instead of barfing.

Test Plan:
put an invalid blame rev with rEsomehash (where E is an svn repo), and
differential loads.

Reviewers: epriestley, wez

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5389
2013-03-19 15:30:16 -07:00
Anh Nhan Nguyen
34e0f617a5 Adding trailing slash to 'Edit Mock' URI
Summary: This one kind of annoyed me when debugging for D5345, since I have stop-on-redirect to on. I know that I have missed showtime, but still, better late than never

Test Plan: Verified that I was not stopped when editing a mock

Reviewers: epriestley, chad, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5388
2013-03-19 15:02:43 -07:00
Afaque Hussain
77a8765824 Schema patch to add a column to Phabricator_File.file table
Summary: Added a column called explicit_upload to Phabricator_File.file table

Test Plan: By chekcing locally if the the column has been added in table using mysql commands.

Reviewers: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5384
2013-03-19 15:00:44 -07:00
Anh Nhan Nguyen
3b801fa567 Adding a proper story feed for moving a Phriction Document
Summary: Display a proper feed title when moving Phriction Documents.

Test Plan:
{F36112, size=full}

Descriptions for the feeds you see in the image.

 # New and cool story feed
 # Fallback for the boring old ones
 # Normal story feed, unchanged

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2686

Differential Revision: https://secure.phabricator.com/D5352
2013-03-19 14:22:26 -07:00
Anh Nhan Nguyen
e3a9ddfc4f Made most of People inaccessible for passer-bys
Summary:
Depends on D5360; Refs T2770

See https://secure.phabricator.com/chatlog/channel/6/?at=54481 for discussion.

This will be a sad day, when I will repeatedly continue to hit a glass wall trying to get into `/people/` to browse the user list J4F at http://secure.phabricator.com/.

Test Plan:
verified that I could not access People as some passer-by.

Verified I could still access user profiles (at least I think I got the right controller for that).

Reviewers: epriestley, chad, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2770

Differential Revision: https://secure.phabricator.com/D5386
2013-03-19 13:48:58 -07:00
Anh Nhan Nguyen
d21880530d Migrated People's listing to PhabricatorObjectListView
Summary:
Depends on D5359

Exactly what it says on a tin

made icons white; replaced panel with header

Made People app God-Mode only; did @epriestley's comments

reverted god-mode changes

Test Plan:
{F36157}

tell my if you like

Reviewers: epriestley, chad, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5360
2013-03-19 13:47:05 -07:00
Anh Nhan Nguyen
3b5d9ff79a Disappear PhabricatorObjectItemView's empty tooltips if is empty
Test Plan: removed one or two labels from uiexample, verified expected behaviour

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5382
2013-03-19 11:16:41 -07:00
Afaque Hussain
d43bcdc1ee Adding pro tips to Differential commit message
Summary: Randomly displaying tips about different features of arc.

Test Plan: Will test by running arc diff and seeing if the tips appear in text-based UI of arc

Reviewers: epriestley, AnhNhan

Reviewed By: AnhNhan

CC: aran, Korvin, AnhNhan

Differential Revision: https://secure.phabricator.com/D5351
2013-03-19 09:29:25 -07:00
epriestley
23ec113ac8 Minor, update celerity map. 2013-03-19 06:48:08 -07:00
Anh Nhan Nguyen
04869c6fcc Made declaration of ReleephRequestDifferentialCreateController::willProcessRequest() consistent with AphrontController::willProcessRequest(array $uri_data)
Summary:
When submitting a diff I noticed that the unit test `testEverythingImplemented` threw an error that did not fail a test.

```
[2013-03-18 16:35:16] ERROR 2048: Declaration of ReleephRequestDifferentialCreateController::willProcessRequest() should be compatible with AphrontController::willProcessRequest(array $uri_data) at [/home/anhnhan/dev/vanilla/phabricator/src/applications/releeph/controller/request/ReleephRequestDifferentialCreateController.php:99]
  #0 PhutilBootloader::executeInclude called at [/home/anhnhan/dev/vanilla/libphutil/src/__phutil_library_init__.php:203]
  #1 PhutilBootloader::executeInclude(/home/anhnhan/dev/vanilla/phabricator/src/applications/releeph/controller/request/ReleephRequestDifferentialCreateController.php) called at [/home/anhnhan/dev/vanilla/libphutil/src/__phutil_library_init__.php:193]
  #2 PhutilBootloader::loadLibrarySource(phabricator, applications/releeph/controller/request/ReleephRequestDifferentialCreateController.php) called at [/home/anhnhan/dev/vanilla/libphutil/src/symbols/PhutilSymbolLoader.php:341]
  #3 PhutilSymbolLoader::loadSymbol(Array of size 4 starting with: { type => class }) called at [/home/anhnhan/dev/vanilla/libphutil/src/symbols/PhutilSymbolLoader.php:246]
  #4 PhutilSymbolLoader::selectAndLoadSymbols() called at [/home/anhnhan/dev/vanilla/phabricator/src/infrastructure/__tests__/PhabricatorInfrastructureTestCase.php:15]
  #5 PhabricatorInfrastructureTestCase::testEverythingImplemented()
  #6 call_user_func_array(Array of size 2 starting with: { 0 => Object PhabricatorInfrastructureTestCase }, Array ) called at [/home/anhnhan/dev/vanilla/arcanist/src/unit/engine/phutil/ArcanistPhutilTestCase.php:441]
  #7 ArcanistPhutilTestCase::run() called at [/home/anhnhan/dev/vanilla/arcanist/src/unit/engine/PhutilUnitTestEngine.php:60]
  #8 PhutilUnitTestEngine::run() called at [/home/anhnhan/dev/vanilla/arcanist/src/workflow/ArcanistUnitWorkflow.php:160]
  #9 ArcanistUnitWorkflow::run() called at [/home/anhnhan/dev/vanilla/arcanist/scripts/arcanist.php:271]
```

Test Plan:
`arc unit --everything` before this change gave error.

applied this change. Re-ran `arc unit --everything`, no error.

Reviewers: edward

Reviewed By: edward

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D5373
2013-03-19 06:04:43 -07:00
Anh Nhan Nguyen
038869c056 Fixing D5371
Summary:
Fixes T2765

Wrong brace placement D:

Test Plan: `/api/differential.getcommitmessage` with some set field

Reviewers: epriestley

CC: aran, Korvin

Maniphest Tasks: T2765

Differential Revision: https://secure.phabricator.com/D5376
2013-03-19 06:03:13 -07:00
Bob Trahan
b8c04419f0 Conpherence - fix a few bugs
Summary: fixes the "click edit and it clears title" bug. fixes a "upload the same image again and I get nothing" bug by making the create file codepath also copy dimensions if the file already exists, rather than making a copy sans dimensions. fixes the "title is so long it breaks the widget" bug by truncating the text AND adding some CSS to prevent it from happening.

Test Plan: messed around with a conpherence. changed the title, changed the picture, changed the crop and all worked. uploaded some long file names and verified they were truncated nicely.

Reviewers: epriestley, chad

Reviewed By: chad

CC: aran, Korvin

Maniphest Tasks: T2399

Differential Revision: https://secure.phabricator.com/D5378
2013-03-18 16:31:38 -07:00
Anh Nhan Nguyen
1a92976c14 Deduplicating duplicated field values for Commit Messages / Differential
Summary: Especially when doing 'arc diff' containing multiple commits which have pre-filled template fields. Names would pop up multiple times

Test Plan:
{F36314}

Local `arc diff` with some uber-branch also agrees with me

Reviewers: epriestley, vrana

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5371
2013-03-18 10:37:40 -04:00
Lauri-Henrik Jalonen
23d72d7e24 Implemented a <hr /> remarkup rule to Phabricator
Summary: Implemented a <hr /> remarkup rule to Phabricator

Test Plan: {F36306}

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2744

Differential Revision: https://secure.phabricator.com/D5370
2013-03-18 10:08:59 -04:00
Edward Speyer
66b414188c Remove deprecated call to renderSingleView
Summary: Return an array of renderables instead of rendering things ourselves (which we used to do with `AphrontView->renderSingleView()`.)

Test Plan: View a Releeph branch; gloriously notice no deprecated warnings.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5363
2013-03-18 11:17:02 +00:00
Edward Speyer
c55b866d3c Underp ReleephDefaultFieldSelector
Summary: Oops.  Functions only return stuff when you call the `return()` function on the `lvalue`.

Test Plan: Use `ReleephDefaultFieldSelector` is the field selector in a test Releeph project.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5362
2013-03-18 11:16:23 +00:00
Bob Trahan
f04d3c9e94 fixing file issue -- files can be deleted 2013-03-17 14:36:22 -07:00
Anh Nhan Nguyen
3ad33dbc04 Profile Pictures can only be edited for System Agents
Summary:
I feel pretty disturbed by having the thought of admins,
super-beings among all users, being able to edit my profile picture. So I took away
that capability of theirs.

Test Plan: Tried to edit a sys agent's profile pic, and somebody else's.

Reviewers: epriestley, chad, btrahan, Afaque_Hussain

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5358
2013-03-16 11:44:14 -04:00
Bob Trahan
a161617d8e Conpherence - make the files widget purdy-ish
Summary:
does the title and also a few other small tweaks

- kills the init js behavior; now its part of menu where it belongs.
- adds the underline to the icon when its toggled in the widget menu
- fixed JS initialization errors on the "create conpherence" page. Note I still like keeping all that init stuff in one function because its typing the same data a bunch to be passed over to the JS layer. Other ways to accomplish this obvi...

Only fun wrinkle here is I think Chad intended me to display "when the file was attached". Instead, I display when the file was *uploaded*. I think this jives better with our version where you can't delete and all that. Files are pretty powerful, long-living objects in Phabricator land.

Test Plan: added files to a conpherence and noted widget loaded updated okay. added a file with no author (generated by the system) and verified it still rendered okay. switched between conpherences and verified proper data in each files widget. uploaded image and text files to check the icons were correct.

Reviewers: epriestley, chad

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2530

Differential Revision: https://secure.phabricator.com/D5337
2013-03-15 23:41:36 -07:00
Chad Little
0bd135b1e6 Tweak panel-filter shadow.
Summary: Adds a consistent shadown under crumbs, tweaks filter-panel to look a bit crisper

Test Plan: Tested crumbs with filter, with nothing, and with a header.

Reviewers: epriestley, btrahan

Reviewed By: btrahan

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5353
2013-03-15 17:16:39 -07:00
Chad Little
adca269812 Add gradient to object-list cards
Summary: Adds a gradient, also re-ran sprite generator to attempt to sprite - for some reason all images were un-optimized.

Test Plan: Test on UI Examples page

Reviewers: epriestley, btrahan

Reviewed By: btrahan

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5354
2013-03-15 17:15:57 -07:00
Edward Speyer
2497e5b5ed Releeph (Phabricator part)
Summary: A copy of the Releeph release tool.

Test Plan: Generally, click everything at least once.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, AnhNhan

Maniphest Tasks: T2094

Differential Revision: https://secure.phabricator.com/D4932
2013-03-15 11:28:43 +00:00
Jakub Vrana
daed35e36c Avoid double slash in Celerity path
Summary: Fished from logs, it probably doesn't cause any real problems.

Test Plan: Looked at logs.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5350
2013-03-14 12:03:26 -07:00
epriestley
dc7b25abed Improve Remarkup embed documentation
Summary: Group all the embed documentation together and mention the new Paste features.

Test Plan: {F35993}

Reviewers: ljalonen

Reviewed By: ljalonen

CC: aran

Differential Revision: https://secure.phabricator.com/D5348
2013-03-14 11:52:20 -07:00
Lauri-Henrik Jalonen
1e8d20d9fc Line count can be set for paste
Summary:
Probably not the ideal way to deal showing only certain amount of lines. Size vary by browsers,
zooming will mess it up albeit only a little and will definitely not work with IE.

Test Plan: {F35989}

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1770

Differential Revision: https://secure.phabricator.com/D5347
2013-03-14 10:51:34 -07:00
Lauri-Henrik Jalonen
dcdf207266 Remarkup allows to point a specific image in a Mock set
Summary: One can point to spesific image in a Mock set using {Mxx|yy} syntax

Test Plan: {F35373}

Reviewers: chad, epriestley

Reviewed By: epriestley

CC: aran, Korvin, AnhNhan

Maniphest Tasks: T2710

Differential Revision: https://secure.phabricator.com/D5322
2013-03-14 09:38:56 -07:00
Lauri-Henrik Jalonen
30a17c2039 Embed pastes now support highlight
Summary:
- Added support for highlighting to PhabricatorSourceCodeView
- Added support for highlighting to embed pastes

Test Plan: {F35975}

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1770

Differential Revision: https://secure.phabricator.com/D5346
2013-03-14 09:32:02 -07:00
Anh Nhan Nguyen
2f9c981716 Oversight: Prevent deletion/movement of stub pages
Summary: Refs T2686 - Now you also can't delete / move stubbed pages

Test Plan: tried it out - works wonderful

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2686

Differential Revision: https://secure.phabricator.com/D5341
2013-03-14 06:20:35 -07:00
Anh Nhan Nguyen
76ed21d922 added some more rules for dark remarkup environments
Summary:
Added rules for <tt> (##`## [inline code]) (did bright text on somewhat dark bg), `NOTE:` block and tables. These were all the ones I could think of and found that they required triage.

I did not touch minor things like links etc., which may require refinement. I try to stay away from design details.

Test Plan: {F35940}

Reviewers: chad, epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5345
2013-03-14 06:18:44 -07:00
epriestley
369ff790ff Minor, celerity derps. 2013-03-13 16:28:27 -07:00
Afaque Hussain
69d087a1d7 Replaced AphrontCrumbsView with PhabricatorCrumbsView in PhrictionDiffController
Summary: Same as title

Test Plan: By checking in Phriction UI in Phabricator

Reviewers: epriestley, AnhNhan

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5327
2013-03-13 15:18:18 -07:00
Bob Trahan
9d806b69cb Conpherence - some cleanup type stuff
Summary:
this diff does a few, not so exciting things

- changes "conpher" to "conpherence" where it snuck into CSS, spritemap, etc -- I believe we now consistently call it conpherence. Feel free to change it, just change it everywhere. :D
- puts the widget icons in the right order per M14
- makes the "mobile-only" widgets show the toggles only in the mobile view
 - also made it so clicking them does nothing for now
- removes the tasks widget since we don't want it

...my time is getting chopped up funny (yay puppy) so this is just an attempt at something that can go into the codebase and not make it worse. Next up is making the widgets that show on desktop look right / not say "TODO"

Test Plan: played around in Conpherence

Reviewers: epriestley, chad

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2530

Differential Revision: https://secure.phabricator.com/D5334
2013-03-13 13:03:51 -07:00
Edward Speyer
293607950c Reinstate AphrontFormCountedToggleButtonsControl's CSS
Summary: Undoes accidental delete from https://secure.phabricator.com/D5314

Test Plan: View awesome new toggle-buttons scheme in Releeph.

Reviewers: chad

Reviewed By: chad

CC: epriestley, aran

Differential Revision: https://secure.phabricator.com/D5332
2013-03-13 18:01:15 +00:00
Anh Nhan Nguyen
f1be01527f Wiped ErrorView from PhrictionDeleteController
Summary: Exactly what it says on the tin

Test Plan: deleted an document in all kinds of fashions. No fatalities, no exceptions, all dialogs appeared fine.

Reviewers: epriestley, chad, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2686

Differential Revision: https://secure.phabricator.com/D5331
2013-03-13 10:30:39 -07:00
Afaque Hussain
05c5c43159 Yell at developers if they don't replace the default revision title with thier new revision title.
Summary: Same as the title

Test Plan: Will test locally by running arc diff

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, AnhNhan, starruler

Maniphest Tasks: T2663

Differential Revision: https://secure.phabricator.com/D5297
2013-03-13 09:34:29 -07:00
Edward Speyer
7487c57401 Make Application->isInstalled canonical
Summary: We currently inspect `phabricator.uninstalled-applications` in two places -- when building a list of `getAllInstalledApplications()` and when asking an application if it `isInstalled()`.  This diff moves that all to the latter function, meaning we can override it in clever and subtle ways for applications that want to add extra defensiveness about whether they should be considered installed or not (e.g. Releeph, in D4932.)

Test Plan: Load the main Phabricator page, pick an application, uninstall it, notice it is absent, then install it and notice the launch icon reappear.

Reviewers: epriestley, Afaque_Hussain

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5326
2013-03-13 16:01:23 +00:00
epriestley
33997d43d0 Fix undefined index in ManiphestTaskSummaryView
Summary:
Currently, my homepage raises a couple of these:

  [13-Mar-2013 06:44:38] WARNING: [pool www] child 27678 said into stderr: "NOTICE: PHP message: [2013-03-13 06:44:38] ERROR 8: Undefined index:  at [/INSECURE/devtools/phabricator/src/applications/maniphest/view/ManiphestTaskSummaryView.php:133]"
  [13-Mar-2013 06:44:38] WARNING: [pool www] child 27678 said into stderr: "NOTICE: PHP message:   #0 ManiphestTaskSummaryView::render() called at [/INSECURE/devtools/phabricator/src/applications/maniphest/view/ManiphestTaskListView.php:45]"
  [13-Mar-2013 06:44:38] WARNING: [pool www] child 27678 said into stderr: "NOTICE: PHP message:   #1 ManiphestTaskListView::render() called at [/INSECURE/devtools/phabricator/src/view/AphrontView.php:63]"
  [13-Mar-2013 06:44:38] WARNING: [pool www] child 27678 said into stderr: "NOTICE: PHP message:   #2 AphrontView::producePhutilSafeHTML() called at [/INSECURE/devtools/libphutil/src/markup/render.php:65]"
  [13-Mar-2013 06:44:38] WARNING: [pool www] child 27678 said into stderr: "NOTICE: PHP message:   #3 phutil_escape_html(Object ManiphestTaskListView)"
  [13-Mar-2013 06:44:38] WARNING: [pool www] child 27678 said into stderr: "NOTICE: PHP message:   #4 array_map(phutil_escape_html, Array { 0 => Object ManiphestTaskListView }) called at [/INSECURE/devtools/libphutil/src/markup/render.php:120]"
  [13-Mar-2013 06:44:38] WARNING: [pool www] child 27678 said into stderr: "NOTICE: PHP message:   #5 phutil_implode_html(, Array { 0 => Object ManiphestTaskListView }) called at [/INSECURE/devtools/phabricator/src/view/layout/AphrontPanelView.php:92]"
  [13-Mar-2013 06:44:38] WARNING: [pool www] child 27678 said into stderr: "NOTICE: PHP message:   #6 AphrontPanelView::render() called at [/INSECURE/devtools/phabricator/src/view/AphrontView.php:63]"
  [13-Mar-2013 06:44:38] WARNING: [pool www] child 27678 said into stderr: "NOTICE: PHP message:   #7 AphrontView::producePhutilSafeHTML() called at [/INSECURE/devtools/libphutil/src/markup/render.php:65]"
  [13-Mar-2013 06:44:38] WARNING: [pool www] child 27678 said into stderr: "NOTICE: PHP message:   #8 phutil_escape_html(Object AphrontPanelView)"
  [13-Mar-2013 06:44:38] WARNING: [pool www] child 27678 said into stderr: "NOTICE: PHP message:   #9 array_map(phutil_escape_html, Array of size 8 starting with: { 0 => Object AphrontPanelView }) called at [/INSECURE/devtools/libphutil/src/markup/render.php:85]"
  [13-Mar-2013 06:44:38] WARNING: [pool www] child 27678 said into stderr: "NOTICE: PHP message:   #10 phutil_escape_html(Array of size 8 starting with: { 0 => Object AphrontPanelView })"
  [13-Mar-2013 06:44:38] WARNING: [pool www] child 27678 said into stderr: "NOTICE: PHP message:   #11 array_map(phutil_escape_html, Array of size 2 starting with: { 0 => Array of size 8 starting with: { 0 => Object AphrontPanelView } }) called at [/INSECURE/devtools/libphutil/src/markup/render.php:85]"
  [13-Mar-2013 06:44:38] WARNING: [pool www] child 27678 said into stderr: "NOTICE: PHP message:   #12 phutil_escape_html(Array of size 2 starting with: { 0 => Array of size 8 starting with: { 0 => Object AphrontPanelView } })"
  [13-Mar-2013 06:44:38] WARNING: [pool www] child 27678 said into stderr: "NOTICE: PHP message:   #13 array_map(phutil_escape_html, Array of size 2 starting with: { 0 => null }) called at [/INSECURE/devtools/libphutil/src/markup/render.php:85]"
  [13-Mar-2013 06:44:38] WARNING: [pool www] child 27678 said into stderr: "NOTICE: PHP message:   #14 phutil_escape_html(Array of size 2 starting with: { 0 => null }) called at [/INSECURE/devtools/libphutil/src/markup/render.php:53]"
  [13-Mar-2013 06:44:38] WARNING: [pool www] child 27678 said into stderr: "NOTICE: PHP message:   #15 phutil_tag(div, Array of size 2 starting with: { class => phabricator-nav-content }, Array of size 2 starting with: { 0 => null }) called at [/INSECURE/devtools/phabricator/src/view/layout/AphrontSideNavFilterView.php:297]"
  [13-Mar-2013 06:44:38] WARNING: [pool www] child 27678 said into stderr: "NOTICE: PHP message:   #16 AphrontSideNavFilterView::renderFlexNav() called at [/INSECURE/devtools/phabricator/src/view/layout/AphrontSideNavFilterView.php:184]"
  [13-Mar-2013 06:44:38] WARNING: [pool www] child 27678 said into stderr: "NOTICE: PHP message:   #17 AphrontSideNavFilterView::render() called at [/INSECURE/devtools/phabricator/src/view/AphrontView.php:63]"
  [13-Mar-2013 06:44:38] WARNING: [pool www] child 27678 said into stderr: "NOTICE: PHP message:   #18 AphrontView::producePhutilSafeHTML() called at [/INSECURE/devtools/libphutil/src/markup/render.php:65]"
  [13-Mar-2013 06:44:38] WARNING: [pool www] child 27678 said into stderr: "NOTICE: PHP message:   #19 phutil_escape_html(Object AphrontSideNavFilterView)"
  [13-Mar-2013 06:44:38] WARNING: [pool www] child 27678 said into stderr: "NOTICE: PHP message:   #20 array_map(phutil_escape_html, Array { 0 => Object AphrontSideNavFilterView }) called at [/INSECURE/devtools/libphutil/src/markup/render.php:120]"
  [13-Mar-2013 06:44:38] WARNING: [pool www] child 27678 said into stderr: "NOTICE: PHP message:   #21 phutil_implode_html(, Array { 0 => Object AphrontSideNavFilterView }) called at [/INSECURE/devtools/phabricator/src/view/page/PhabricatorBarePageView.php:58]"
  [13-Mar-2013 06:44:38] WARNING: [pool www] child 27678 said into stderr: "NOTICE: PHP message:   #22 PhabricatorBarePageView::willRenderPage() called at [/INSECURE/devtools/phabricator/src/view/page/PhabricatorStandardPageView.php:104]"
  [13-Mar-2013 06:44:38] WARNING: [pool www] child 27678 said into stderr: "NOTICE: PHP message:   #23 PhabricatorStandardPageView::willRenderPage() called at [/INSECURE/devtools/phabricator/src/view/page/AphrontPageView.php:46]"
  [13-Mar-2013 06:44:38] WARNING: [pool www] child 27678 said into stderr: "NOTICE: PHP message:   #24 AphrontPageView::render() called at [/INSECURE/devtools/phabricator/src/applications/directory/controller/PhabricatorDirectoryController.php:15]"
  [13-Mar-2013 06:44:38] WARNING: [pool www] child 27678 said into stderr: "NOTICE: PHP message:   #25 PhabricatorDirectoryController::buildStandardPageResponse(Object AphrontSideNavFilterView, Array { title => Phabricator }) called at [/INSECURE/devtools/phabricator/src/applications/directory/controller/PhabricatorDirectoryMainController.php:66]"
  [13-Mar-2013 06:44:38] WARNING: [pool www] child 27678 said into stderr: "NOTICE: PHP message:   #26 PhabricatorDirectoryMainController::buildMainResponse(Object AphrontSideNavFilterView, Array of size 8 starting with: { 5 => Object PhabricatorProject }) called at [/INSECURE/devtools/phabricator/src/applications/directory/controller/PhabricatorDirectoryMainController.php:27]"
  [13-Mar-2013 06:44:38] WARNING: [pool www] child 27678 said into stderr: "NOTICE: PHP message:   #27 PhabricatorDirectoryMainController::processRequest() called at [/INSECURE/devtools/phabricator/webroot/index.php:91]"

There two cases here:

  - There's no owner. In this case, we might-or-might-not have loaded the handle for the "empty" PHID, but we shouldn't try to render in either case.
  - There is an owner. In this case, we definitely should have loaded the handle, so it's fine for us to fatal if we didn't (it indicates a serious problem with the program).

Test Plan: Loaded home page, no errors.

Reviewers: chad, btrahan

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D5329
2013-03-13 08:06:10 -07:00
epriestley
5b0e64435b Fix undefined variable on empty Maniphest results pages
Summary: Fixes T2741. If there are no results, `$result_count` is never initialized.

Test Plan: Looked at an empty results page.

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2741

Differential Revision: https://secure.phabricator.com/D5328
2013-03-13 08:05:44 -07:00
Anh Nhan Nguyen
4b6c81a23c adding a warning upon 'creating' a new document on an existing page
Summary: don't remember what I changed except for add that intermediate dialog

Test Plan:
{F35155}

Ugly, ain't it?

you can edit instead, or admit that it was a mistake to take on Phriction's existing documents

Reviewers: epriestley, chad, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2686

Differential Revision: https://secure.phabricator.com/D5295
2013-03-13 07:41:38 -07:00
epriestley
855e085c6f Uninstall Conduit calls when uninstalling applications
Summary: Fixes T2698. When applications are installed, their Conduit calls should drop out. This will also let us land Releeph without exposing Conduit calls.

Test Plan:
  - Viewed Conduit console; uninstalled some applications and verified their calls dropped out.
  - Tried to make an uninstalled call; got an appropriate error.

Reviewers: edward, btrahan

Reviewed By: edward

CC: aran

Maniphest Tasks: T2698

Differential Revision: https://secure.phabricator.com/D5302
2013-03-13 07:09:05 -07:00
Lauri-Henrik Jalonen
1341c8a6c1 Paste embeds look super cool
Summary: Make Paste embeds look super cool

Test Plan: {F35387}

Reviewers: epriestley

CC: aran, Korvin, chad, btrahan, AnhNhan

Maniphest Tasks: T1770

Differential Revision: https://secure.phabricator.com/D5323
2013-03-13 07:03:39 -07:00
Jakub Vrana
9303bf50bf Display full handle name in PHID lookup
Test Plan: Searched for a commit.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5301
2013-03-13 00:55:07 -07:00
Chad Little
df0c3df3cc Modernize Maniphest
Summary:
A few things
- pht Maniphest where I could
- implement dust background
- optimize pages for mobile
- adds aphront-two-column-layout
- reworks maniphest page with two column layout
- tweaks task table for mobile, though we should move to object-list-view

Stopping here as I want to get feedback in. Super excited about mobile and the new tasks views. Only sort of excited about the sidebar filters, they need more UI work, but we should talk about that.

Test Plan: Test Maniphest, Differential, and Homepage views. Sort tasks, make reports

Reviewers: epriestley, btrahan

Reviewed By: btrahan

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5314
2013-03-12 23:30:03 -07:00
Edward Speyer
9804dab799 pht() AphrontNoteView
Summary: Add `pht()` calls throughout `AphrontNoteView` to allow translation of this example.

Test Plan: /uiexample/view/PhabricatorNoteExample/

Reviewers: chad

Reviewed By: chad

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D5325
2013-03-12 13:10:06 +00:00
Edward Speyer
a1b98c5cb7 AphrontFormCountedToggleButtonsControl
Summary: Like AphrontFormToggleButtonsControl, but with mouseover counters.  These counters let you know how many of each thing there are in each category, which is useful when using this control for filtering a list of things in multiple dimensions.

Test Plan: `/uiexample/view/PhabricatorCountedToggleButtonsExample/`

Reviewers: epriestley

CC: aran, Korvin

Maniphest Tasks: T2094

Differential Revision: https://secure.phabricator.com/D5118
2013-03-12 09:43:36 +00:00
epriestley
6ab2db6d4d Minor, fix an extra period in Phriction.
Auditors: anhnhan
2013-03-10 19:48:43 -07:00
Chad Little
f2cec9f973 Apront Two Column View
Summary: Wanted to pull this out in case we don't use it in Maniphest, still useful perhaps in the future. Creates a sidebar that wraps when on mobile.

Test Plan: Tested UIExample

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5321
2013-03-10 19:20:01 -07:00
Chad Little
fbb032c710 Document icons sprite sheet.
Summary: Adds 32 and 64 px images to represent basic documents.

Test Plan: Differential

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5317
2013-03-10 14:16:16 -07:00
epriestley
ca20323b87 Preload images in Pholio and fix dimension rendering
Summary:
Preload all the images when viewing a pholio. Fixes T2692.

We should probably use lower-resolution previews on mobile and only show full resolution when the user taps. We should also suppress the thumbnails from loading on mobile since they aren't visible. But neither is critical for the moment.

Test Plan: Added logging, verified everything loaded.

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2692

Differential Revision: https://secure.phabricator.com/D5316
2013-03-10 13:30:41 -07:00
Jakub Vrana
47f6aecb72 Parse "Depends on" in freeform Differential fields
Summary:
I considered also parsing "Depends On:" field in the commit message but it's more involved and I also prefer having this information in the summary where it's more visible.
I also didn't want the field displayed by default so user would have to write "Depends On:" anyway.

Test Plan: Used "Depends on D1" in summary, saw it in dependencies.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5300
2013-03-10 11:00:02 -07:00
epriestley
71d0465331 Fix two Pholio subscriptions issues
Summary:
  - Grouping inline comments made us render `array(null)` for the content of a single comment. Detect that this corresponds to empty text.
  - Don't try to mention-subscribe automatic subscribers, like the author.

Test Plan: Tried to mention-subscribe the author, saw no "x subscribed y" transaction generate. Added a real subscriber, saw no empty content render.

Reviewers: chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D5315
2013-03-10 10:59:03 -07:00
Lauri-Henrik Jalonen
590f54a20e Pholio inline comments have a minimum size
Summary: Pholio inline comments now have minimum size of 16x16 px

Test Plan: Made some inlines

Reviewers: epriestley

CC: aran, Korvin, AnhNhan

Maniphest Tasks: T2647

Differential Revision: https://secure.phabricator.com/D5250
2013-03-10 09:28:54 -07:00
Anh Nhan Nguyen
45a49b99a9 Pimping PhrictionListController
Summary:
- adding dust
- updating filters, removing stubs and moved
- adding Project of a doc

Test Plan: saw them

Reviewers: epriestley, chad, btrahan

CC: aran, Korvin

Maniphest Tasks: T2686

Differential Revision: https://secure.phabricator.com/D5284
2013-03-09 19:48:57 -08:00
epriestley
eb010b2efc Group inline transactions in Pholio
Summary:
Fixes T2639 by grouping related transactions at display time, so all the inlines merge into a nice block.

(Note that this does not do anything about T2709 yet, so there's still no way to figure out where the inlines actually are.)

Test Plan: {F35262}

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2639

Differential Revision: https://secure.phabricator.com/D5313
2013-03-09 19:23:50 -08:00
epriestley
a858c14791 Implicitly CC inline commenters in Pholio
Summary: Fixes T2722. Both the "comment" (default) and "inline comment" (needs to be specialized) actions should imply CC.

Test Plan: Made an inline on a mock, got implicitly cc'd.

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2722

Differential Revision: https://secure.phabricator.com/D5312
2013-03-09 17:55:14 -08:00
epriestley
b41b1b43db Implement card style and extras for object item lists
Summary:
Initial pass at elements appearing on M10.

Glaring omissions:

  - I cut a single icon out of M10 in a haphazard way.
  - No linear graident texture on the cards.

Test Plan:
{F35248}
{F35249}

Reviewers: chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D5311
2013-03-09 17:55:01 -08:00
epriestley
cd5038e973 Support basic swipe gestures in Pholio
Summary:
Ref 2700. No sexy animation yet, but allows you to swipe left and right to switch photos. Generally feels pretty good to me.

Also fixes a left/right but and a bug where taps could be interpreted as gestures and simplifies some touch code.

derpdog

Test Plan:
Swiped left and right in Pholio.

{F35239}

Reviewers: chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D5309
2013-03-09 13:53:32 -08:00
epriestley
6b5204dca9 Add support for device swipe events
Summary:
Ref T2700. Allow JS to listen for swipes on devices.

There are a bunch of tricky cases here and I probably didn't get them all totally right, but this interaction broadly looks like this:

  - We implement gesture recognition for the mouse in device modes (narrow browser), and for touch events from an actual device.
  - The sigil `touchable` indicates that a node wants to react to touch events.
  - When the user touches a `touchable` node, we start listening for moves. They might be tapping/clicking (in which case we don't care), but they might also be gesturing.
  - Once the user moves their finger/pointer far enough away from the tap origin, we recognize it as a gesture. I hardcoded this at 20px; I wasn't able to find any "official" Apple value, but 20px seems like a common default.
  - At this point, we look at where their finger has moved.
    - If they moved it mostly up/down, we interpret the gesture as "scroll" and just stop listening. The device does its own thing.
    - However, if they moved it mostly left/right, we interpret it as a "swipe". We start killing the moves so the device doesn't scroll.
  - Once we've recognized that a gesture is underway, we send a "gesture.swipe.start" event and then "gesture.swipe.move" events for every move.
  - When the user ends the gesture, we send "gesture.swipe.end".
  - If the user cancels the gesture (currently, only by tapping with a second finger), we send "gesture.swipe.cancel".
  - Gesture events have raw position data and some convenience fields.

Test Plan:
Wrote UI example and used it from the Desktop, iPhone simulator, and a real iphone.

  - The code always seems to get "scroll" vs "swipe" correct (i.e., consistent with my intentions).
  - The threshold feels pretty good to me.
  - Tapping with a second finger cancels the action.

Reviewers: chad, btrahan

Reviewed By: chad

CC: aran

Maniphest Tasks: T2700

Differential Revision: https://secure.phabricator.com/D5308
2013-03-09 13:53:15 -08:00
epriestley
4c914a5c49 Remove all calls to renderSingleView() and deprecate it
Summary: After D5305, this method does nothing since we automatically figure out what we need to do.

Test Plan:
- Viewed a page with the main menu on it (MainMenuView).
- Viewed a revision with transactions on it (TransactionView).
- Viewed timeline UIExample (TimelineView, TimelineEventView).
- Viewed a revision (PropertyListView).
- Viewed a profile (ProfileHeaderView).
- Viewed Pholio list (PinboardView, PinboardItemView).
- Viewed Config (ObjectItemView, ObjectItemListView).
- Viewed Home (MenuView).
- Viewed a revision (HeaderView, CrumbsView, ActionListView).
- Viewed a revision with an inline comment (anchorview).
- Viewed a Phriction diff page (AphrontCrumbsView).
  - Filed T2721 to get rid of this.
- Looked at Pholio and made inlines and comments (mockimages, pholioinlinecomment/save/edit).
- Looked at conpherences.
- Browsed around.

Reviewers: chad, vrana

Reviewed By: chad

CC: edward, aran

Differential Revision: https://secure.phabricator.com/D5307
2013-03-09 13:52:41 -08:00
epriestley
5e41ead7c7 Have AphrontView implement PhutilSafeHTMLProducerInterface
Summary: Allows views to work like tags.

Test Plan: Implemented a few completely arbitrary render() / singleView simplifications. I just picked some that were easy to test. I'll do a more thorough pass on this in a followup; these calls don't really hurt anything.

Reviewers: chad, vrana

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D5306
2013-03-09 13:52:21 -08:00
epriestley
25738e78a1 Harden custom date fields against userland adventures
Summary: Users do things like change the type of a field. Currently, we throw when this happens. Instead, recover somewhat-gracefully.

Test Plan:
Created a "string" field, then changed it to a "date" field.

{F35241}

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D5310
2013-03-09 13:51:58 -08:00
epriestley
c91253c691 Remove "MetaMTA Transcripts" and "Herald Transcripts" links from Differential
Summary: These actions are dumb, and not smart, and no one likes them.

Test Plan: Looked at a revision and saw fewer actions; higher average action quality.

Reviewers: chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D5304
2013-03-09 09:22:10 -08:00
epriestley
8821ab57c0 Allow speical keys to be bound to keystrokes
Summary: Fixes T2711. Allows special keys (arrows, tab, return) to be bound as shortcuts. Binds left and right as shortcuts in Pholio.

Test Plan: Pressed left. Pressed right.

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2711

Differential Revision: https://secure.phabricator.com/D5303
2013-03-08 21:19:24 -08:00
Wez Furlong
eba51d16b9 reduce noise on daemon console
Summary:
this suppresses displaying entries that have not been in the running
state for more than 3 days.

note: We should probably kill off these dead rows similar
to the code at the top of the loop, but without checking to see if we're
the same host and the item is still live, or have some other cruft removal
job to effect the same.

Test Plan: load /daemon/ and rejoice that there are fewer crufty rows.

Reviewers: vrana, nh

Reviewed By: nh

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D5299
2013-03-08 13:08:11 -08:00
vrana
4e535b03e5 Adjust the shade of green in blame
Summary:
We are loading blame on background which confuses me a bit - I'm not sure if it's still loading or it's already loaded and the commit changed lots of lines (so I don't see the author) and it was a long time ago (so I don't see green).
Provide a visual feedback even for very old commits.

I want to point out that I really enjoy this kind of work.
Also, this diff is my masterpiece at least for today.

Test Plan: ?view=blame - verified that the gray changed to a decent shade of green even for very old commits.

Reviewers: epriestley, chad

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5292
2013-03-08 10:49:45 -08:00
Chad Little
c05115b367 Fix link colors.
Summary: Fix the visited state on visited closed tasks.

Test Plan: Create and close tasks, visit them, note state doesnt change. Check hover states.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5298
2013-03-08 10:43:20 -08:00
Bob Trahan
ddf97c0e8a Conpherence - Make the files widget more useful and ajaxify some more stuff
Summary: files widget updates as new files are added. made basically all edits "ajax" except for when you change the conpherence image which just does a reload. I will fix this in a future diff but it was starting to spiral out of control a bit.

Test Plan: commented on a task with files and noted the updated file widget. updated header image via drag and drop and dialogue -- noted a full reload. cropped image and re-titled conpherence - ajax updated as expected.

Reviewers: epriestley, chad

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2530

Differential Revision: https://secure.phabricator.com/D5288
2013-03-08 10:40:06 -08:00
Afaque Hussain
95b84881b7 Enabling Admins to set profile pictures for System Agents
Summary: Added an action in Edit option of People application allowing Admins to set profile pictures for System Agents

Test Plan: By trying to set a profile picture for the sytem agents

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5293
2013-03-08 08:31:25 -08:00
Anh Nhan Nguyen
81334651a9 Fix a name mismatch in PhrictionDocumentQuery
Summary: Fix an oversight in {D5285}

Test Plan: works smoothly again :D

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2686

Differential Revision: https://secure.phabricator.com/D5294
2013-03-08 08:03:06 -08:00
Chad Little
f9bd2e5c65 Add hover color to upload files area.
Summary: Adds the hover color to the upload images area on Create Mock.

Test Plan: Hover image, get background change.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin, AnhNhan

Differential Revision: https://secure.phabricator.com/D5291
2013-03-08 07:47:20 -08:00
Chad Little
b861e0cf86 Remove overflow:hidden from form-view
Summary: Typeaheads that are overflow have their contents hidden inside the form view.

Test Plan: Tested Creating a Mock. Would like guidance on what this was solving so we can find something else.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2690

Differential Revision: https://secure.phabricator.com/D5290
2013-03-08 07:38:54 -08:00
Chad Little
ef33c04322 Remove 'Images' from editing a mock
Summary: For now, remove the images field when editing a mock, can add it back if we decide to allow it.

Test Plan: Check edit mock, field gone, check new mock, field is alive and well.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2552

Differential Revision: https://secure.phabricator.com/D5289
2013-03-08 07:36:55 -08:00
epriestley
b799f5671b Implement PhrictionDocumentQuery
Summary:
Companion for D5284. Move all the query logic to a policy-aware query class. In particular:

  - Currently, anyone can view and edit a project's wiki documents. For callsites using this query class, you must be able to view or edit the project to view or edit its documents.
  - There's some very sketchy logic with the content/document joins. This cleans that up.
  - This cleans up loading projects by moving it inside the query. We need to do this anyway to perform policy checks.

Test Plan: Viewed active/all/updated. Set page size to 2, verified pager works.

Reviewers: AnhNhan, chad

Reviewed By: AnhNhan

CC: aran

Differential Revision: https://secure.phabricator.com/D5285
2013-03-08 07:12:24 -08:00
epriestley
06b3f21b61 Implement "user" and "users" Maniphest custom fields
Summary:
Ref T2575. Implements "user" (zero or one users) and "users" (zero or more users) field types.

Also allows custom fields to participate in the handle pipeline.

Test Plan: {F35071}

Reviewers: hach-que, btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2575

Differential Revision: https://secure.phabricator.com/D5287
2013-03-07 17:24:58 -08:00
epriestley
30d6cd91da Implement remarkup custom control
Summary: Ref T2575. Adds "remarkup" control, which displays a remarkup control and uses the remarkup cache. Grants fields access to remarkup pipeline.

Test Plan:
{F35067}
{F35068}

Used DarkConsole to verify cache interaction with services.

Reviewers: hach-que, btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2575

Differential Revision: https://secure.phabricator.com/D5286
2013-03-07 17:24:33 -08:00
epriestley
3f56ca681f Implement Maniphest auxiliary field 'default' key
Summary: Fixes T404. Ref T2575. Allows default to be set for any field. Date defaults are interpreted by `strtotime()`. Other defaults are interpreted as expected.

Test Plan:
  - Created a string custom field with default value "Orange".
  - Created a date custom field with a fixed default value (my birthday).
  - Created a date custom field with a relative default value ("today 4:59 PM").
  - Created/edited tasks with these fields, verified everything behaved sensibly.

Reviewers: hach-que, btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T404, T2575

Differential Revision: https://secure.phabricator.com/D5282
2013-03-07 17:23:30 -08:00
epriestley
ba4649679c Implement Maniphest "date" auxiliary field type
Summary:
Ref T404. Ref T2575. Adds a "date" type to Maniphest.

This doesn't let you default the date to anything other than `time()`; I'll do that in the next diff.

Test Plan: Created and edited a task with date fields.

Reviewers: hach-que, btrahan

Reviewed By: btrahan

CC: aran, mbishopim3

Maniphest Tasks: T404, T2575

Differential Revision: https://secure.phabricator.com/D5281
2013-03-07 17:23:09 -08:00
epriestley
a3099e27bc Provide Maniphest auxiliary fields access to the viewer and task
Summary:
Maniphest auxiliary fields currently do not have access to the viewing user or task. This is fine for very simple fields, but insufficient for more complex fields. Generally, bring these in line with DifferentialFieldSpecifications.

This supercedes the additional $user/$viewer threading provided by D5247 and provides viewers to all fields, as well as access to the task object itself.

Test Plan: Created, viewed and edited a task with custom fields. Created a similar subtask.

Reviewers: hach-que, btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2575

Differential Revision: https://secure.phabricator.com/D5280
2013-03-07 17:22:36 -08:00
Bob Trahan
e3181fcbe7 make applicationTransactionsCommentView have a "Login to comment." button if user is not logged in
Summary: okay title. other apps can get this by implementing shouldAllowPublic and set(ting)RequestURI on TransactionsCommentView. note i put some css inline -- let me know if that belongs someplace else or needs better design.

Test Plan: viewed a mock logged out and saw new button. used new button and ended up on the mock logged in with a clean URI.

Reviewers: epriestley, chad

Reviewed By: chad

CC: aran, Korvin

Maniphest Tasks: T2653

Differential Revision: https://secure.phabricator.com/D5266
2013-03-07 13:02:36 -08:00
Anh Nhan Nguyen
e6c73a8396 fixing unloaded object handles for project member changes in feed view
Summary: Fixes T2688

Test Plan: verified proper display in `/feed/` and activity streams

Reviewers: epriestley, nevogd

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2688

Differential Revision: https://secure.phabricator.com/D5279
2013-03-07 12:57:39 -08:00
Anh Nhan Nguyen
1797e51428 Fixed Phriction status displays when browsing history
Summary: Refs T2686 - also did some pht()'s except one

Test Plan: browsed around in Phriction, including History. looked fine.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2686

Differential Revision: https://secure.phabricator.com/D5275
2013-03-07 08:33:38 -08:00
Lauri-Henrik Jalonen
76880916d0 Pholio mocks embed in a fancy way
Summary: Pholio mocks are now embed in a fancy way

Test Plan: {F34804}

Reviewers: epriestley

Reviewed By: epriestley

CC: chad, aran, Korvin, AnhNhan

Maniphest Tasks: T2626

Differential Revision: https://secure.phabricator.com/D5249
2013-03-07 08:23:45 -08:00
Anh Nhan Nguyen
048fb35b46 pht() for Flags
Summary: This also includes the "Flag for Later" action items

Test Plan:
did a run with all caps

badassery

Reviewers: epriestley, btrahan, chad

Reviewed By: chad

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5276
2013-03-07 08:22:11 -08:00
Anh Nhan Nguyen
0865ed266d Simplified Phriction Move form
Summary: Refs T2686 - only dialog remains, no wrangling between ajax / non-ajax

Test Plan: verified everything still works

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2686

Differential Revision: https://secure.phabricator.com/D5274
2013-03-07 08:20:55 -08:00
Chad Little
b0aa55b160 Make closed tasks appear grey
Summary: In long list of tasks, its hard to differentiate between open and closed tasks. This adds some color in addition to the strikethrough. Hover will still be blue. I'm open to other suggestions as well if you don't think this is needed.

Test Plan: Test Unbeta Pholio

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5270
2013-03-07 08:16:13 -08:00
Anh Nhan Nguyen
b42b1f6817 'Create Document' pre-fills with current slug
Summary:
Fixes T2667

The 'Create Document' link up in the application crumbs now prefills with the slug of the current document - if available, that is

Test Plan: verified that nothing crashed, that the correct slug was pre-filled, and that pages could be created

Reviewers: alexshtuk, epriestley

CC: aran, Korvin

Maniphest Tasks: T2667

Differential Revision: https://secure.phabricator.com/D5273
2013-03-07 08:12:00 -08:00
James Rhodes
90d0e8a322 Fixing the annoying spacing between project tags.
Test Plan: Apply the changes and refresh the Maniphest task list.

Reviewers: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5272
2013-03-07 08:06:52 -08:00
James Rhodes
868e79b7a7 Implemented option to allow users to view username of repository URIs.
Test Plan:
Enable the checkbox under the Tracking options for a repository.
View the repository in Diffusion, the username should show.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2575

Differential Revision: https://secure.phabricator.com/D5269
2013-03-07 08:06:09 -08:00
Edward Speyer
b88743137b AphrontNoteView
Summary: This is supposed to look a lot like the way Remarkup renders a block of code, so you can render some out of context message inside another container.  For example in Releeph, it renders a message someone has associated with a Releeph request.

Test Plan:
I've added an abstract uiexample, but the use case in Releeph is more explanatory:

{F33900}

Reviewers: epriestley, chad

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2094

Differential Revision: https://secure.phabricator.com/D5125
2013-03-07 10:22:01 +00:00
vrana
b3a63a62a2 Introduce PhabricatorEmptyQueryException
Summary: It's dumb to execute a query which we know will return an empty result.

Test Plan: Looked at comment preview with "11", didn't see "1 = 0" in DarkConsole.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5177
2013-03-06 19:22:00 -08:00
vrana
1091dc7aa1 Save blame info to lint messages
Test Plan:
Applied the patch.
Looked at blame and plain blame of SVN and Git file.
Ran the lint saver.
Looked at lint messages list.
/diffusion/lint/

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5218
2013-03-06 16:19:01 -08:00
Nick Pellegrino
8ec987dd2f Button to ignore setup issues + refractoring
Summary: T2381

Test Plan:
Click on the ignore link in /config/issue/ and respond to the dialog box.

Also, test uninstalling and reinstalling an application in the web UI (to verify that refractoring didn't break anything).

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2381

Differential Revision: https://secure.phabricator.com/D5234
2013-03-06 14:14:10 -08:00
epriestley
457b91f6cb Improve performance of Phabricator unit tests
Summary: Build one fixture total, not one per test case. Depends on D5258.

Test Plan: `arc unit --everything`

Reviewers: vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D5259
2013-03-06 13:53:48 -08:00
Bob Trahan
a7cbcb3495 re-use files if you forget to name a mock
Summary: good title

Test Plan: made a mock with no title and the files i had attached showed up again correctly. named the mock and it worked!

Reviewers: epriestley, chad

Reviewed By: chad

CC: aran, Korvin

Maniphest Tasks: T2642

Differential Revision: https://secure.phabricator.com/D5261
2013-03-06 13:40:50 -08:00
epriestley
e7d34971e0 Generate Phriction URI from saved Project slug, not project name
Summary: We recently changed the slug normalization rules, so project names may now generate a different slug than they used to. We have the correct slug saved, though, so just use that.

Test Plan: Created some projects with various names full of garbage and verified they link correctly.

Reviewers: AnhNhan

Reviewed By: AnhNhan

CC: mbishopim3, aran

Maniphest Tasks: T2632

Differential Revision: https://secure.phabricator.com/D5263
2013-03-06 13:34:46 -08:00
Anh Nhan Nguyen
911d02e2d1 Phriction Documents can be moved
Summary: Refs T1575

Test Plan:
created plenty of pages, did all kind of stuff with them, moved them around, verified expected behaviour.

{F34453}

{F34455}

Reviewers: epriestley, chad, btrahan

Reviewed By: epriestley

CC: aran, epriestley, Korvin

Maniphest Tasks: T1575

Differential Revision: https://secure.phabricator.com/D5198
2013-03-06 13:12:04 -08:00
James Rhodes
cd99850cb8 Increase Maniphest auxiliary storage size.
Test Plan:
Store large amounts of text into a string auxiliary field.  It should
be stored successfully rather than truncated.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2575

Differential Revision: https://secure.phabricator.com/D5246
2013-03-06 10:46:56 -08:00
vrana
e57f209056 Load blame in Diffusion by AJAX
Summary:
I have blame enabled by default and displaying files with long history takes easily over 10 seconds.
Load the blame data by AJAX instead.
This is actually doing more work and the total response time is longer but it's worth it for me as I am interested just in the file contents quite often.

I know you were talking about building blame cache but until we have it...

I'm not sure if the AJAX loading indicator in bottom right corner is enough to inform the user that we are loading it on background.

Test Plan:
?view=highlighted
?view=plainblame
?view=blame

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5244
2013-03-06 07:44:45 -08:00
Edward Speyer
b0e58fadfd Re-run celerity mapper
Summary: D5226 nixed something I put in the celerity map.  This diff adds it back, along with a bunch of other changes that `./scripts/celerity_mapper.php webroot/` decided were super important.

Test Plan: Repeatedly place click actions into the HTML `document`.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5253
2013-03-06 14:18:12 +00:00
Bob Trahan
243b99f39e Conpherence - make pontificate be all ajaxy
Summary: serving up for some feedback -- does anything fancy need to happen when new messages load (say highlight em and fade the highlight out) or just scrolling down okay? in JS I have a TODO about how come it doesn't work; that code works okay in my console if I print out various debugging values and enter them in manually.

Test Plan: pontificate with myself; note new message and message entry updates properly. pontificate as different user then as myself; note two messages load and message entry updates properly. pontificate as a user who isn't the last to reply; note new message and message entry updates properly

Reviewers: epriestley, chad

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2522

Differential Revision: https://secure.phabricator.com/D5214
2013-03-05 15:45:36 -08:00
epriestley
c23a9c9fde Use a policy-aware query for Project typeahead
Summary: Fixes T2677. Currently, you can typeahead projects you can't see.

Test Plan: Typeahead'ed projects. Verified active projects appeared; archived did not.

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2677

Differential Revision: https://secure.phabricator.com/D5242
2013-03-05 14:12:11 -08:00
epriestley
aab0fb0e74 Fix HTTP 400 / 500 errors in Pholio
Summary:
Ref T2650. Possible fix for that issue.

  - "Passthru" got renamed to "passthrough" but a site was missed.
  - Don't try to post an empty comment if the text is empty but we have inlines; this avoids popping a "you can't post an empty comment" error.

Test Plan: Made an empty comment with an inline in Pholio.

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2650

Differential Revision: https://secure.phabricator.com/D5240
2013-03-05 13:23:56 -08:00
epriestley
bd6bb8a3ea In debug mode, log all phabricator bot data to the log
Summary: Dump everything to the debug log for `phd debug phabricatorbot ...`

Test Plan: Ran `phd debug phabricatorbot ...`

Reviewers: chad, AnhNhan

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D5239
2013-03-05 12:56:36 -08:00
epriestley
7d771b4ff7 Support "M" in phid.lookup and ircbot
Summary: Fixes T2651. This could be futher generalized but it's a bit out of the way.

Test Plan: See chatlog.

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2651

Differential Revision: https://secure.phabricator.com/D5236
2013-03-05 12:31:52 -08:00
epriestley
d585c2d745 Always scale images to fit in Pholio
Summary:
Ref T2641. Currently, we scale images to fit horizontally, but let them have arbitrary vertical size. This is nice in theory but kind of sucks in practice because it makes everything below the stage jump around when you switch images. It would also make swiping through images on mobile super weird.

Instead, scale to fit in both dimensions. This feels a lot better and more application-like to me. (I also think most mocks are not especially tall?)

Test Plan:
{F34648}

(Note that the image is enormous.)

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2641

Differential Revision: https://secure.phabricator.com/D5233
2013-03-05 12:31:30 -08:00
epriestley
1f51d023af Improve Pholio on mobile
Summary:
Ref T2644. This isn't perfect, but makes Pholio more-or-less usable on mobile. In particular:

  - Inline comments drop below the image.
  - Clicking the image lightboxes a full size version so you can scroll around it and inspect details.
  - Clicking it again dismisses it.

Things that aren't good:

  - Can't add inline comments. This seems complicated and not critical.
  - Can't easily figure out which inline comments go where since there's no hover. Maybe let you tap them? Not sure if we really need this.
  - Thumbs are between image and image data. I'm planning to get rid of the thumbs and do swipe left/right instead.
  - It would be nice to scroll the lightbox to center on the part of the image you tapped. I just thought of this, though.

Test Plan:
{F34640}
{F34641}
{F34642}

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2644

Differential Revision: https://secure.phabricator.com/D5232
2013-03-05 12:30:58 -08:00
epriestley
2fe3cd72bf Fix thumb selection style
Summary: I broke the code which shows which thumb is currently selected when I made the URLs fancy, by changing the container from `div` to `a`.

Test Plan: Verified current thumb is now highlighted.

Reviewers: chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D5231
2013-03-05 12:30:39 -08:00
epriestley
ec6f566bc1 Improve behavior of inline comment dialog
Summary:
Fixes T2669.

  - Currently, making an inline comment does not focus the textarea. Instead, focus the textarea.
  - Currently, the positioning is kind of buggy. Make it viewport-relative and put the dialog slightly below the inline reticle.
  - Use `JX.Workflow` more and simplify some of the ajax stuff.

Test Plan: Created inline comments.

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2669

Differential Revision: https://secure.phabricator.com/D5229
2013-03-05 12:30:05 -08:00
epriestley
bd4ce3580c Fix inline highlight behaviors for Pholio
Summary:
Some recent CSS change tweaked these out a bit. They were also sort of weird looking after fixing the double-draw thing:

  - Make them work properly;
  - make the implementation a bit simpler;
  - make them clearer visually.

Also fix a bug where "border" and "fill" were accidentally reversed.

Test Plan:
{F34625}

(The highlight on the reticle is a little hard to pick out in the screenshot, but very obvious in practice.)

Reviewers: chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D5228
2013-03-05 12:29:39 -08:00
epriestley
fdc30fc11b Fix drag-inline behavior with pholio stage background
Summary: Currently, if you click and drag in the checkered background, we'll create a 1px-wide or 1px-tall inline comment. Don't start inlines unless the user clicks on the image itself.

Test Plan: Clicked on and off the image.

Reviewers: chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D5227
2013-03-05 12:29:03 -08:00
Afaque Hussain
7acaeee844 Augmented DifferentailDependsOnFieldSpecification to expose its data over conduit
Summary: Implmented conduit methods from base class in DifferentialDependsOnFieldSpecification

Test Plan: Created two test diffs, made one of them dependent on another. Then checked the dependency over conduit interface for differential.query. Dependency is shown but in terms of PHIDs

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5238
2013-03-05 12:28:09 -08:00
epriestley
035067f83c Show information about each image in the right-side gutter
Summary: Fixes T2646. Title and description are placeholders. Styles on this are a bit rough.

Test Plan: {F34623}

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2646

Differential Revision: https://secure.phabricator.com/D5226
2013-03-05 12:23:17 -08:00
Chad Little
8cceea3110 Status icons for pinboards.
Summary: Adds image count and token count under the pinboard image. Extended pinboard-item-view for any icon/count pair.

Test Plan: Review Pholio and Macro, tested Chrome and IE9.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2645

Differential Revision: https://secure.phabricator.com/D5237
2013-03-05 10:43:03 -08:00
Chad Little
6a30324361 Target Pin hover to desktop only
Summary: Better CSS targeting.

Test Plan: Tested Pholio on my desktop

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5235
2013-03-05 09:53:30 -08:00
Chad Little
20201364e5 Add hover state to stackable list.
Summary: Adds a hover state, helpful for large stacked lists. Also applied dust to projects and config to go with the hover changes.

Test Plan: Config, Projects

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5223
2013-03-05 09:48:17 -08:00
Edward Speyer
c2c8c34e84 AphrontBars
Summary: Aphront widgets that render the either a discrete or continuous value as a horizontal shape.  Like a progress bar, or a five-star rating bar.

Test Plan:
`/uiexample/view/PhabricatorAphrontBarExample/` ...which shows this, amongst other things:

{F33898}

Reviewers: epriestley, chad

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2094

Differential Revision: https://secure.phabricator.com/D5122
2013-03-05 16:46:09 +00:00
Chad Little
fd13275f7e Widen pinboard to 280x210.
Summary: This widens pinboard images to 280x210, which neatly fits on an iPhone 4, and gives more visual space to Macros and Mocks.

Test Plan: Test Pinboard in Chrome and iOS simulator.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5224
2013-03-05 08:05:51 -08:00
Afaque Hussain
a521790f13 Ported loadAuxiliaryFields method to differential.query conduit method
Summary: Ported the the loadAuxiliaryfields method from differential.getrevision method to modern conduit differential.query method

Test Plan: Created a test diff in differential to see if nothing has been broken

Reviewers: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5230
2013-03-05 05:58:04 -08:00
epriestley
1bb160a244 Make Pholio URIs aware of which image you are looking at
Summary: Fixes T2658. Map `/Mxx/yy/` to images in a mock. Use HTML5 history stuff to make it work nicely. This also makes right-click-open-in-new-tab work correctly.

Test Plan: Clicked thumbs in a mock. Right-clicked thumbs. Copy and pasted a URI. Used browser back button.

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2658

Differential Revision: https://secure.phabricator.com/D5222
2013-03-04 18:43:29 -08:00
epriestley
7a8b4a21ab Use transaction diffs to show description changes in Pholio
Summary: Fixes T2659. These didn't exist until recently.

Test Plan: {F34556}

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2659

Differential Revision: https://secure.phabricator.com/D5221
2013-03-04 18:07:47 -08:00
epriestley
2ea4d17f71 Add keyboard shortcuts to Pholio
Summary: Fixes T2657. Adds j/k for previous/next image. This is consistent with Differential. We could add left/right later but it needs a little work to make those available.

Test Plan: Mashed j/k, saw images switch.

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2657

Differential Revision: https://secure.phabricator.com/D5220
2013-03-04 17:54:58 -08:00
epriestley
5a7d9fb522 Show loading state and fix reticles in Pholio
Summary:
Fixes T2643. Show a loading state (currently just making the image transparent, but we could do something fancier) when an image is loading.

Fixes T2648. Cleans up the double draws we were previously doing.

Makes thumbnails react to mousedown in addition to click so they feel a little snappier. Make them stop reacting to control click, command click, etc.

Test Plan: Used `setTimeout()` to simulate a 1s image load delay, switched between images.

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2643, T2648

Differential Revision: https://secure.phabricator.com/D5219
2013-03-04 16:59:16 -08:00
epriestley
9aedb3c3c1 Clearly show draft vs nondraft inline comments
Summary: Fixes T2638; mark draft inlines in Pholio in a way similar to Differential.

Test Plan: {F34553}

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2638

Differential Revision: https://secure.phabricator.com/D5217
2013-03-04 16:50:22 -08:00
Chad Little
21db19016c Update PholioMockView Styles.
Summary: Less janky sidebar, new 'photoshop-like' texture for image background.

Test Plan: Tested mocks with and without side comments, hover over marked squares. Tested small and large images.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5216
2013-03-04 16:01:27 -08:00
Chad Little
db35bbcbcc Shorten titles in Pholio
Summary: Shortens the titles to 24 characters. Will likely make the boards bigger than 240px at some point.

Test Plan: Tested normal phrases as well as MMMMMMMms. M's will break, but only slightly. Felt it was a fair tradeoff?

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2660

Differential Revision: https://secure.phabricator.com/D5215
2013-03-04 15:01:53 -08:00
epriestley
454e756019 Minor, update celerity map. 2013-03-04 15:03:54 -08:00
vrana
a56810283a Revert audit queries back to original behavior
Test Plan:
/ - didn't see all my commits
/owners/package/1/ - didn't see all package commits in Needs Attention

Reviewers: AnhNhan, epriestley

Reviewed By: epriestley

CC: aran, epriestley

Maniphest Tasks: T2582

Differential Revision: https://secure.phabricator.com/D5186
2013-03-04 14:03:14 -08:00
vrana
c9838d81e2 Don't reload page after clicking on Diffusion line link
Summary:
For a single line, I can use the right click.
But for highlighting multiple lines, I have to wait for page reload.

It would be nice to track this in history but that's more involved.
This is actually maybe better behavior.

Test Plan: Clicked on the line link, dragged and dropped on it.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5172
2013-03-04 13:46:34 -08:00
epriestley
14569ae491 Add a user-accessible hook for dumping debug code into an install
Summary:
Currently, there's no easy way for me to tell a user "run this code from the webserver and tell me what it says". Sometimes installs can add new .php files to, e.g., `webroot/rsrc/`, but this is setup-dependent and not universal. Generally I resort to saying "put this into index.php", but that's error prone and not acceptable on active installs.

Add a "debug" controller so I can instead say "put this into support/debug.php, then visit /debug/".

Test Plan: Visited /debug/ with and without support/debug.php files. Visited /staus/.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D5212
2013-03-04 13:45:51 -08:00
Chad Little
413c65b608 Fix margin hover issue on pinboard.
Summary: Removes the -1px and tweaks the colors just a bit more.

Test Plan: Review Pholio and Macro.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2664

Differential Revision: https://secure.phabricator.com/D5213
2013-03-04 13:35:27 -08:00
epriestley
67e086bba7 Save disk space
Summary: so many bytes saved

Test Plan:
http://local.aphront.com:8080/maniphest/view/custom/?tasks=12,14
http://local.aphront.com:8080/maniphest/view/custom/?tasks=~

Reviewers: vrana

Reviewed By: vrana

CC: aran, AnhNhan

Differential Revision: https://secure.phabricator.com/D5211
2013-03-04 13:35:41 -08:00
epriestley
a20ba85b75 Fix a missing viewer after D5152
I think this one got mucked up in a merge or I didn't grep properly.

Auditors: vrana
2013-03-04 12:54:20 -08:00
epriestley
8ae718c2aa Require a viewer for Remarkup rendering
Summary:
Provide a viewer to all remarkup engines.

This fixes commit summaries in Diffusion, which were failing to link because they didn't have a user and thus couldn't see/load `D123`, e.g.

Test Plan: Grepped for engine creation.

Reviewers: vrana

Reviewed By: vrana

CC: aran, edward

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D5152
2013-03-04 12:33:05 -08:00
epriestley
1beda30792 Surface token counts for Pholio
Summary: Provide this data so the list view can present it somehow.

Test Plan: {F34520}

Reviewers: chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D5210
2013-03-04 11:47:58 -08:00
vrana
ab5e019b3d Pass user to DifferentialRevisionDetailRenderer
Summary: I know that this code would be replaced by something else but until then...

Test Plan: Used it in our renderer.

Reviewers: epriestley, edward

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5165
2013-03-04 11:32:02 -08:00
vrana
2cd4f2e827 Resolve SVN commit identifier inside Git in lint saver
Test Plan:
  $ git svn find-rev r11

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5173
2013-03-04 11:30:08 -08:00
vrana
cacbfba9f1 Prefill "<?php" in XHPAST view form
Test Plan: /xhpast/

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5176
2013-03-04 11:29:40 -08:00
vrana
507a96130c Set cache granularity for Javelin linter
Test Plan: Made an error, rebuilt the map, linted the file, saw the error.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5113
2013-03-04 11:29:20 -08:00
Chad Little
bb08b8c905 Pinboard view updates and Pholio List
Summary: Adds hover states to pinboard-items, adds date created and author on pholio home mock.

Test Plan: Review Pholio and Macro home pages

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2645

Differential Revision: https://secure.phabricator.com/D5200
2013-03-04 11:04:30 -08:00
Chad Little
3c11d9103e Optional body class for dust background.
Summary: This adds an option dust background for certain application designs, like Macro and Pholio to help make the list views pop more.

Test Plan: Reviewed Macro and Pholio.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5209
2013-03-04 10:35:50 -08:00
epriestley
851d02b30a Define STATUS_MOVED constant ahead of its implementation
Summary: I landed some patches out of order and we haven't landed the one which actually implements this yet. Define the constant for now.

Test Plan: Deleted a page in Phriction without issue.

Reviewers: AnhNhan

Reviewed By: AnhNhan

CC: aran

Differential Revision: https://secure.phabricator.com/D5207
2013-03-04 09:26:02 -08:00
Anh Nhan Nguyen
88bf053ece Reg. D5201 - inlines and overwrites
Test Plan: not yet

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2208

Differential Revision: https://secure.phabricator.com/D5205
2013-03-04 08:51:10 -08:00
Anh Nhan Nguyen
6b0138c1ae prevents users from deleting already deleted/moved phriction documents
Summary:
Deps D5198 since it uses a constant from D5198

accidentalbigdiff

I sure doubled the size of this file ^^

Could be that I added unserious business.

Test Plan:
Created a page. Had it open in two browser windows. Deleted in one. This is the second attempt:

{F34458}

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5202
2013-03-04 08:50:43 -08:00
Anh Nhan Nguyen
0a2a5c7175 added crumbs + create link to Phriction Document Index
Summary: Missed the "Create Document" button, thus added crumbs to Phriction Document Index

Test Plan: verified it appeared and linked accordingly

Reviewers: epriestley, chad, btrahan

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5204
2013-03-04 07:46:40 -08:00
Anh Nhan Nguyen
fd016b5864 Creating (or updating) a Phriction Document creates empty parent documents
Summary:
Fixes T2208

Parent documents get created as stubs - while the action is "parent" - don't ask

Test Plan: Created some documents with somewhat ancestry - verified their parents had pages and stub messages display ({F34456}).

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2208

Differential Revision: https://secure.phabricator.com/D5201
2013-03-04 07:31:59 -08:00
Anh Nhan Nguyen
98615c3540 Phriction Action View won't render weird actions when document does not exist
Summary:
The actions wouldn't behave as I want. Disabled them and display "Create Document" instead, since the others make no sense on a non-existing page.

The linking was error-prone btw. `/phriction/edit//` (how it and others would be linked) wouldn't route to anything, and even if, would result in an error anyway since non-existing docs can't be deleted nor have their history shown.

Test Plan:
verified buttons disappeard when document was not created.

verified at least history button would appear when document existed, but was deleted (should work for move, too)

Reviewers: epriestley, chad, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2384

Differential Revision: https://secure.phabricator.com/D5203
2013-03-04 07:21:47 -08:00
epriestley
92c4dfdfb1 Fix an extra %s in BlogFeedController
Summary: Fished this out of the secure.phabricator.com error log. Introduced in D4869.

Test Plan: Eyeballed it.

Reviewers: chad, vrana

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D5199
2013-03-03 13:57:59 -08:00
Chad Little
74f6c75ae7 Tighten pinboard view.
Summary: Removes a little slop from the top and right of the pinboard view.

Test Plan: Tested Macro and Pholio layouts. Things wrapped less.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5197
2013-03-03 13:32:02 -08:00
Chad Little
561698df60 Add specialcase area to remarkup when on a dark background.
Summary: Remarkup dark wrapper for Pholio/Remarkup, reusable

Test Plan: Tested a blockquote, list, and code segment

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2640

Differential Revision: https://secure.phabricator.com/D5196
2013-03-03 13:10:59 -08:00
epriestley
3f1a78450c Require mysql or mysqli, not both
Summary: We use mysqli if it's available by default. Don't require installs to build with mysql.

Test Plan: Applied to new secure.phabricator.com install.

Reviewers: chad, vrana

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D5194
2013-03-03 11:37:53 -08:00
epriestley
dc8cc123da Fix Maniphest and Config transaction diff rendering
Summary:
I missed this in review of D5155: `wordwrap()` returns a string, but `phutil_utf8_hard_wrap()` returns an array.

Implode the returned arrays so the stuff underneath it doesn't choke.

Test Plan: Clicked "show details" on a maniphest task description change

Reviewers: AnhNhan, kwadwon

Reviewed By: kwadwon

CC: aran

Differential Revision: https://secure.phabricator.com/D5195
2013-03-03 11:37:45 -08:00
epriestley
555c0421bb Allow slugs to contain most utf8 characters
Summary:
Ref T2632. Fixes T1466.

Currently, we normalize slugs (and thus Phriction URIs and canonical project names) to a small number of latin characters. Instead, blacklist a few characters and permit everything else (including utf8 characters).

When generating Phriction URIs, encode any utf8 characters. This means we render URIs encoded, but browsers handle this fine and display them readably in the URI and address bar, etc.

The blacklisted characters are mostly for practical reasons: \x00-\x19 are control characters, `#%?` are meaningful in URIs, `+` is sometimes configured to be interprted as space by apache, etc., `<>\\` are just silly, `&= ` are largely cosmetic.

This allows some silly stuff, like generating URIs with zero-width spaces and RTL markers in them. Possibly we should go blacklist those characters at some point.

Depends on: D5191

Test Plan: {F34402}

Reviewers: AnhNhan, chad, vrana

Reviewed By: chad

CC: aran

Maniphest Tasks: T1466, T2632

Differential Revision: https://secure.phabricator.com/D5192
2013-03-03 10:56:33 -08:00
epriestley
cb2d0adf95 Fix exception in Maniphest task ID filtering
Summary:
Ref T2632. When the user enters task IDs, we filter them to allow the user to write `T123` or `task 123` to mean `123`. This filtering is latin-centric and silly, and cuases an exception when accessing, e.g,, `/maniphest/view/custom/?tasks=~`.

Instead of stripping a select few nondigits, strip all nondigits.

Test Plan: Hit `/maniphest/view/custom/?tasks=~`, no exception.

Reviewers: AnhNhan, chad, vrana

Reviewed By: chad

CC: aran

Maniphest Tasks: T2632

Differential Revision: https://secure.phabricator.com/D5193
2013-03-03 10:56:22 -08:00
Chad Little
0dde637059 Pholio CSS touchups for inline comments.
Summary: Tightened up spaces, made inline area more 'inset', tweaked colors to match timeline view.

Test Plan: Tested mocks with and without inline comments.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5188
2013-03-03 09:19:07 -08:00
Chad Little
752055a45c Update mobile menu icons
Summary: Simplify the look of the mobile menu, provide active states for the menu icons.

Test Plan: iOS Simulator and Chrome.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2426

Differential Revision: https://secure.phabricator.com/D5189
2013-03-03 08:17:57 -08:00
Anh Nhan Nguyen
c9b96f82bf pht() for Settings
Test Plan:
did a run with ALL CAPS through `/settings/` and subpages. This includes changing (and forgetting) my password.

Did not test the following:

 - LDAP

Reviewers: epriestley, btrahan, chad

Reviewed By: chad

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5174
2013-03-03 06:52:42 -08:00
Korvin Szanto
e82a066287 Fix typo in Phabricatorbot config diviner page
Summary: Changed pharicatorbot to phabricatorbot

Test Plan: build diviner and make sure I'm not crazy

Reviewers: epriestley

Reviewed By: epriestley

CC: aran

Differential Revision: https://secure.phabricator.com/D5187
2013-03-03 06:51:37 -08:00
vrana
0ff9ce6963 Don't try to highlight 11 in Remarkup
Test Plan: 11

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5181
2013-03-01 15:49:01 -08:00
Anh Nhan Nguyen
8e51764118 pht() for view and form elements
Summary:
actually just wanted to `pht()` the //Cancel// button.

includes `pht()`ed exceptions.

refrained from `pht()`-ing `phabricator_relative_date()` since I wasn't too sure about the effects.

Test Plan: visited all form elements that I remembered - looks reasonable

Reviewers: epriestley, chad, btrahan

Reviewed By: chad

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5175
2013-03-01 15:37:33 -08:00
Evan Priestley
bedc06b1bc Merge pull request #275 from SwathiMystery/master
UPDATED configuring_outbound_email.diviner : running Postfix + SMTP
2013-03-01 07:37:09 -08:00
Lauri-Henrik Jalonen
4f1ca64159 Fixed rendering markup
Summary:
Description for mock renders now.
Inline comments (on side) render now.

Test Plan: {F34021}

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, chad

Maniphest Tasks: T2597

Differential Revision: https://secure.phabricator.com/D5138
2013-03-01 07:34:09 -08:00
Swathi V
c34d5f6083 Supports Postfix as MTA with SMTP
Summary:
    Install and configure Postfix as MTA, on local host with SMTP works
    for outbound emails. 

TestPlan:
    Configured Postfix on Amazon EC2 instance, where Phabricator is running,
    used SMTP, sent some mail to myself and my team.

[TODO] : Write a documentation of how-to
    configure postfix, running as MTA with SMTP.
2013-03-01 19:26:42 +05:30
vrana
85975084e9 Uncollapse side panel after enabling file tree
Summary:
If user enables file tree but had toggled the side panel with 'F' before, it didn't show up.
It is confusing.

Test Plan: With hidden panel, enabled filetree.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5160
2013-02-28 18:36:37 -08:00
epriestley
f6bba771cb Fix DiffusionBrowseQuery->setUser() vs ->setViewer()
Auditors: vrana
2013-02-28 17:26:43 -08:00
epriestley
31cc78cc35 Fix a missing setActor() on DifferentialNewDiffMail
Auditors: vrana
2013-02-28 17:23:23 -08:00
epriestley
0a069cb55a Require a viewer to load handles
Summary:
Unmuck almost all of the we-sort-of-have-viewers-some-of-the-time mess.

There are a few notable cases here:

  - I used Omnipotent users when indexing objects for search. I think this is correct; we do policy filtering when showing results.
  - I cheated in a bad way in the Remarkup object rule, but fixing this requires fixing all the PhabricatorRemarkupEngine callsites (there are 85). I'll do that in the next diff.
  - I cheated in a few random places, like when sending mail about package edits. These aren't a big deal.

Test Plan:
  - Grepped for all PhabricatorObjectHandleData references.
  - Gave them viewers.

Reviewers: vrana

Reviewed By: vrana

CC: aran, edward

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D5151
2013-02-28 17:15:09 -08:00
epriestley
e3567b2d4d Fix grossness in Herald daemon
Summary: Do this in a reasonably proper / formal way. Leave a TODO for the policy stuff.

Test Plan: Ran `scripts/repository/reparse.php --herald rPnnnnn`

Reviewers: vrana

Reviewed By: vrana

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D5150
2013-02-28 16:38:40 -08:00
epriestley
19d67b778d Fix audit counts in some queries
Summary:
Prior to D5140, "PhabricatorAuditCommitQuery::STATUS_OPEN" was defined as "concern only". This didn't really make sense; we redefined it to "concern or audit required".

However, a couple of queries needed to be updated since they really meant "concern" even though they said "open".

I also switch the order of problem commits / audit required on the Audit homepage to be consistent with the bubbles on home.

Test Plan: Looked at home, /audit/.

Reviewers: chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D5162
2013-02-28 15:01:32 -08:00
epriestley
57cce93e5a Add user omnipotence
Summary:
Daemons (and probably a few other things) need to make queries without having a real user. Introduce a formal omnipotent user who can bypass any policy restriction.

(I called this "ominpotent" rather than "omniscient" because it can bypass CAN_EDIT, CAN_JOIN, etc. "Omnicapable" might be a better word, but AFAIK is not a real word.)

Test Plan: Unit tests.

Reviewers: vrana, edward

Reviewed By: edward

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D5149
2013-02-28 11:01:40 -08:00
epriestley
ea3472e87b Check for pygmentize, not pgymentize
Summary: hehehe

Test Plan: Reloaded /config/, no more bogus setup issuse.

Reviewers: kwadwon, staticshock, chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D5158
2013-02-28 10:46:04 -08:00
kwadwo
37ee66e27f changed wordwrap call to utf8 hard wrap call in multiple places
Summary: using to phutil_utf8_hard_wrap instead of wordwrap

Test Plan: hard_wrap already unit tested

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5155
2013-02-28 09:17:58 -08:00
kwadwo
9891394e80 Phabricator now checks whether pygmentize script can be run when user enables pygments
Summary: Check if pygmentize is runnable if pygments is enabled

Test Plan: Enable pygments with pygmentize unavailable in path

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5157
2013-02-28 09:17:15 -08:00
epriestley
1539b21b45 Fix overescaping for Repositories home screen
Summary: Fixes T2623.

Test Plan:
{F34157}

{F34158}

Reviewers: chad, vrana

Reviewed By: chad

CC: aran

Maniphest Tasks: T2623

Differential Revision: https://secure.phabricator.com/D5156
2013-02-28 08:47:51 -08:00
epriestley
5d2e0ecc8a Remove an unused property from D5140
Summary: Oops, missed this in review.

Test Plan: Searched in the file for the property.

Reviewers: AnhNhan

Reviewed By: AnhNhan

CC: aran

Differential Revision: https://secure.phabricator.com/D5154
2013-02-28 08:07:13 -08:00
epriestley
5754bec293 Gratuitous hacks until D5151 lands
Auditors: vrana
2013-02-28 08:05:43 -08:00
epriestley
ab5ab5a7e5 Unbreak commenting on Reivsions with commits attached until D5151 can land
Auditors: vrana
2013-02-28 08:03:38 -08:00
Anh Nhan Nguyen
7f6ea1cd5e enabled Audit to filter Concern vs. No-Concern status
Summary:
Fixes T2582

You can filter Concern vs. No-Concern status

Choosing a concern filter that's not `all` implies filter `status` to be `open`

Test Plan: fiddled around with it in Audit

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2582

Differential Revision: https://secure.phabricator.com/D5140
2013-02-28 07:57:02 -08:00
Chad Little
362511c3ae Dark description tweaks for Pholio.
Summary: Uses a dark description area and white text for pholio mocks. Also touches up the borders a little bit.

Test Plan: review pholio, files, and macros for visual changes intended or not.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5143
2013-02-27 20:10:30 -08:00
epriestley
88497bf7df Use reverse(x::y) instead of y::x in Mercurial history queries
The revset "x:0" works, but the revset "x::0" is empty. We actually want "reverse(0::x)".

Auditors: DurhamGoode
2013-02-27 20:08:54 -08:00
epriestley
e2c9ebdbc1 Fix DiffusionMercurialHistoryQuery for file history
Summary: When querying history of a path, we should continue past branchpoints. See D5146 for more discussion.

Test Plan:
Viewing history of a file on a branch which never modified the file no longer fatals.

(Arguably we could render something like "this file was never modified on this branch" and maybe link to the branch where the branchpoint stems from, but that seems of limited use.)

Reviewers: DurhamGoode, vrana, chad

Reviewed By: DurhamGoode

CC: aran

Differential Revision: https://secure.phabricator.com/D5148
2013-02-27 19:17:26 -08:00
epriestley
e5122877a5 Fix Mercurial "Last Modified" query
Summary:
To determine when a file was last modified, we currently run `hg log ... -b branch ... file`. However, this is incorrect, because Mercurial does not interpret "-b x" as "all ancestors of the commit named x" like Git does, and we don't care about where the modification happened anyway (we always have a resolved commit as a starting point). I think this got copy-pasta'd from the History query.

Instead, drop the branch-specific qualifier and find the last modification, period.

Test Plan: Mercurial commit views of commits not on the repository's default branch are no longer broken.

Reviewers: DurhamGoode, vrana, chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D5146
2013-02-27 18:41:29 -08:00
epriestley
8fead36615 Implement DiffusionMercurialContainsQuery in Diffusion
Summary:
Currently, we have no implementation, so all Mercurial commits show "None" for "Branches".

Instead, implement this method.

Test Plan: {F34076}

Reviewers: DurhamGoode, vrana, chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D5145
2013-02-27 18:41:21 -08:00
epriestley
3f547d562d Give the fake Herald user a PHID so it counts as logged in and can see commits
See last two commits in this chain.

Auditors: vrana
2013-02-27 11:54:17 -08:00
epriestley
7b76c8ef27 Fix another missing viewer when loading commits
Auditors: vrana
2013-02-27 11:50:33 -08:00
epriestley
69dcd47751 Fix two cases where we load Commit handles without a viewer
I missed these in testing D5139 because they aren't in the web UIs and I am dumb and can not brain today.

Auditors: vrana
2013-02-27 11:44:52 -08:00
epriestley
ed00e37f47 Fix commit policy stuff and anchor handling
Summary:
See discussion in D5121. Fixes T2615.

This might cause us more issues if anything is loading commit handles without passing a viewer, but I think I tested all of those cases.

Test Plan: Looked at feed, audit, maniphest, diffusion, differential, owners, repositories.

Reviewers: vrana

Reviewed By: vrana

CC: aran

Maniphest Tasks: T2615

Differential Revision: https://secure.phabricator.com/D5139
2013-02-27 10:54:39 -08:00
epriestley
8d20e42c1c Fix a MySQL strict issue with auxiliary task storage
Summary: This table has date columns but we don't populate them correctly. In strict mode with custom fields, this throws when creating a task.

Test Plan: Created a task in strict mode with custom fields.

Reviewers: chad, vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D5137
2013-02-27 10:51:34 -08:00
Lauri-Henrik Jalonen
5d30b1b4fb Various highlights
Summary:
Highlight thumb for image user is currently viewing.
Highlight selection when user mouseovers it's inline(on side).

Test Plan: {F33990}

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2446

Differential Revision: https://secure.phabricator.com/D5134
2013-02-27 10:45:51 -08:00
Anh Nhan Nguyen
ff1a679709 added repository filter view to Audit
Test Plan: created some audit requests, browsed around. displayed fine

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2582

Differential Revision: https://secure.phabricator.com/D5135
2013-02-27 08:31:05 -08:00
epriestley
fe78944c9d Prepare Diffusion for hovercards
Summary:
Move Diffusion to be hovercard-ready, and expand our ability to resolve commit references.

  - Link unqualified hashes of 7 characters or more which match a commit.
  - Link qualified hashes of 5 characters or more which match a commit.
  - Support `{...}` syntax.

Test Plan: {F33896}

Reviewers: chad, vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D5121
2013-02-27 08:04:54 -08:00
epriestley
b5da7b3723 Missing change from D5120 which I incorrectly discarded in a merge.
Auditors: vrana
2013-02-27 07:19:57 -08:00
Chad Little
f01213b089 pht for Daemons.
Summary: Scan Daemons app for pht and fix a form or two.

Test Plan: Used Daemons app as much as I could, check all caps language.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5133
2013-02-26 19:51:36 -08:00
Chad Little
82e41e7fa1 Add ImageView to PropertyListView
Summary: Adds imageview (dark background) to Files and Macro.

Test Plan: Test a file and a macro, see darkness.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5131
2013-02-26 16:37:45 -08:00
vrana
40d453d6aa Limit number of affected files in Differential e-mails
Summary: This triggers mainly for SVN branch copy.

Test Plan: Ran this code separately.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5126
2013-02-26 15:00:24 -08:00
epriestley
5e11eb7f72 Prepare for hovercards
Summary:
  - Unify all the reference/embed Remarkup rules for Differential, Maniphest, Paste and Ponder.
  - Add rules for Pholio.
  - Does not yet unify Diffusion or Files (both are a bit more involved).
  - Prepare for hovercards.

Test Plan: {F33894}

Reviewers: chad, vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D5120
2013-02-26 14:59:31 -08:00
Chad Little
7c8b32c6a8 Make icons 2 px taller, 4 px larger.
Summary: Makes the visual size 2px larger and hit area 4px bigger on notification and message icons.

Test Plan: Review icons in sandbox, test new layout with notifications or messages.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5127
2013-02-26 14:56:25 -08:00
epriestley
fe500f4268 Pre-prepare for hovercards
Summary:
D5120 and followups refactor and generalize object references in Remarkup -- notably, they move remarkup rules from a central location to the implementing applications.

Preserve blame by doing moves/renames only first. This change moves application remarkup rules into those applications, and renames the ones D5120 modifies.

Test Plan: Typed some preview text into a textarea, got a valid Remarkup render.

Reviewers: vrana, chad

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D5123
2013-02-26 14:57:41 -08:00
Anh Nhan Nguyen
1b8ac077f5 Fixes T2523 - Comments are being displayed in feed.
Summary:
currently, only comments per se are being displayed. cut after 128 characters (which is the default), means in theory up to 128 newlines ^^

when you for example claim a task with a comment, close it with a comment, or do anything else, it won't be displayed

Test Plan: {F33890}

Reviewers: epriestley, btrahan, hwinkel

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2523

Differential Revision: https://secure.phabricator.com/D5119
2013-02-26 08:59:26 -08:00
epriestley
34db006c4b Attempt to fix IE8 mixed content warning. 2013-02-26 08:00:20 -08:00
Anh Nhan Nguyen
58ef3be1c6 made DiffusionHomeController use commit summaries
Summary: Latest commit in repositories are displayed together with their summaries if available

Test Plan:
Diffusion did not crash - a good sign

commit summaries also only appear on Diffusion Home //only// - as expected

Reviewers: epriestley, btrahan, chad

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5117
2013-02-26 07:12:44 -08:00
epriestley
32d23254c9 Use --user and --password from bin/storage in PHP migrations
Summary:
Fixes T2059. Ref T2517.

Currently, you can run `bin/storage upgrade` with `--user` and `--password` arguments. However, these clownishly apply only to `.sql` patches -- the `.php` migrations still use the default user and password.

This is dumb. Stop doing it. Respect `--user` and `--password` for PHP patches.

(I implemented "override", which is very similar to "repair", but kept them separate since I think they're semantically distinct enough to differentiate.)

Test Plan: Ran `./bin/storage upgrade --user x --pass y --apply phabricator:20130219.commitsummarymig.php`. Verified the correct user and password were used both for the initial connect and patch application.

Reviewers: chad, vrana

Reviewed By: chad

CC: aran

Maniphest Tasks: T2059, T2517

Differential Revision: https://secure.phabricator.com/D5115
2013-02-25 22:20:23 -08:00
epriestley
51a1b76899 Add "phabricator-remarkup" to transaction comments
Summary: Fixes T2596. We currently omit this, so we don't get some styling (lists, e.g.)

Test Plan: Viewed a remarkup list in Macro, Pholio.

Reviewers: chad, vrana

Reviewed By: chad

CC: aran

Maniphest Tasks: T2596

Differential Revision: https://secure.phabricator.com/D5114
2013-02-25 21:10:41 -08:00
Chad Little
7ab7783ad3 Modernize Countdown
Summary: Crumbs, phts, and mobile layouts for Countdown.

Test Plan: Tested new, edit and delete timer. Verified timer works. Unable to get 'remove chrome' to work, will investigate.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5101
2013-02-25 12:48:55 -08:00
Lauri-Henrik Jalonen
1f00f2728b Pholio inline comments appear after comment
Summary: Pholio inline comments now appear after comments. Adding inline comment shows up properly on comments.

Test Plan: {F33723}

Reviewers: epriestley, johann.fridriksson

Reviewed By: johann.fridriksson

CC: aran, Korvin

Maniphest Tasks: T2446

Differential Revision: https://secure.phabricator.com/D5103
2013-02-25 06:19:10 -08:00
vrana
04aa59abc6 Change URL for creating Facebook OAuth app
Summary: The old URL doesn't redirect plus there is no direct link to create a new app.

Test Plan: Visited it.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5100
2013-02-23 09:07:10 -08:00
Chad Little
7ff2c1737c Chatlog pht
Summary: Scan chatlog app for pht's

Test Plan: ALLCAPS

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5098
2013-02-23 07:12:53 -08:00
Chad Little
1c6655cadd Calendar minor pht.
Summary: Minor pht's missed in Calendar.

Test Plan: ALLCAPS

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5096
2013-02-23 07:12:36 -08:00
Chad Little
c3243ef17c Config php
Summary: Found one!

Test Plan: derp

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5099
2013-02-23 07:12:19 -08:00
epriestley
b4b81d0f9a Handle resizing nicely
Summary:
  - For images that aren't too large to fit, keep the stage at about 85% of the viewport height. This prevents it from bouncing around as you switch between images, and generally makes it feel big and important like it should. When the stage is larger than images, we center them vertically.
  - As the viewport is resized, shrink the stage and, if necessary, the images on it.

Test Plan:
{F33617}

{F33618}

Reviewers: chad, ljalonen

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D5089
2013-02-23 06:28:56 -08:00
epriestley
26f8e76ee2 When an image is too wide in Pholio, scale it down
Summary:
Currently, if an image is too wide for the viewport, we freak out. Instead, scale it down.

This means we must also scale down all the rectangles on it, which is why this is tricky. However, all the draw/load separation has made it reasonably straightforward.

We'll possibly need to add some kind of "view full size" thing. I'm planning to add an element which shows "85%" or whatever if it's currently scaled.

Test Plan:
Before:

{F33607}

After:

{F33608}

Reviewers: chad, ljalonen

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D5088
2013-02-23 06:28:34 -08:00
epriestley
8641ef3948 Separate selection editing from selection drawing
Summary:
Currently, we draw the selection immediately after it changes. Instead, update state and then draw out of state.

Also simplify and clean up a few things. Make all the inline endpoints return data in the same format.

Test Plan: Made various inline comments.

Reviewers: chad, ljalonen

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D5085
2013-02-23 06:28:23 -08:00
epriestley
1e1ad070b6 Delete two unused variables
Summary: `image` has been replaced with `active_image`. `imageData` is from a long time ago, I think.

Test Plan: Verified nothing seems to be broken.

Reviewers: chad, ljalonen

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D5084
2013-02-23 06:28:09 -08:00
epriestley
7c49f2bf4f Separate loading inline comments from drawing inline comments
Summary:
Currently, we issue one Ajax request to get inline comments, and then draw them when they come back. This has some limitations:

  - A user could quickly click image 1, and then click image 2. The request for image 1 may take longer to come back than image 2. In this case, we'd draw the image 2 inlines and then draw the image 1 inlines when that request arrived, resulting in image 2 shown with both image 1 and image 2 comments. This is hard to make happen in a sandbox because the requests are so fast, but prevent it by drawing only the currently visible image's inlines.
  - Every time we want to draw inlines, we need to request them -- even if we've already loaded them! This allows us to draw them without reloading them (although we don't actually do this, yet). When we do, it will make it faster to switch between images you've aleady looked at (and we can do other optimizations).

Test Plan: Clicked between images, saw inlines draw correctly. Added a new inline. Moused over inlines.

Reviewers: chad, ljalonen

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D5083
2013-02-23 06:27:45 -08:00
epriestley
a2abbd560a Simplify comment highlight behavior in Pholio
Summary:
  - Currently, we register this behavior every time we load comments. Instead, register it once.
  - We have two very similar behaviors for over/out. Just use one that does the right thing based on the event type.

Test Plan: Waved my mouse over areas of the image with reticles, saw the correct comments highlight.

Reviewers: chad, ljalonen

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D5082
2013-02-23 06:27:35 -08:00
Chad Little
11f6e73328 Fix bubbles on app launch buttons.
Summary: I missed a case where the blue bubble might exist alone without the grey.

Test Plan: Tested Flags.

Reviewers: epriestley, vrana

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5095
2013-02-22 20:33:06 -08:00
epriestley
bd95121b33 Don't try to implicitly subscribe users who are already subscribed
Summary:
Fixes T2587. Specifically:

  - Don't try to implicitly subscribe the actor if they're already subscribed.
  - Since there are like 5 things that need to interact with subscribers, just load them once upfront for Subscribable objects.

Test Plan: Made a comment on a mock I was CC'd on without an error.

Reviewers: vrana

Reviewed By: vrana

CC: aran

Maniphest Tasks: T2587

Differential Revision: https://secure.phabricator.com/D5091
2013-02-22 15:54:56 -08:00
Chad Little
cebe6ac387 Stylize bubble counts.
Summary: Adds colors to bubble counts in app launcher.

Test Plan: Tested with 0 attention counts, 12 attention counts, and thousands of open tasks.

Reviewers: epriestley, vrana

Reviewed By: vrana

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5090
2013-02-22 15:46:29 -08:00
vrana
7d7fa11870 Display two numbers in launch view
Summary: Also don't display title if it's already written.

Test Plan: {F33604, size=full}

Reviewers: chad

Reviewed By: chad

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D5087
2013-02-22 14:37:10 -08:00
Afaque Hussain
c864a73ad2 UI Improvements to Chatlog Application
Summary: Made improvements to the Chatlog application UI. Added Header & crumbs. Added service name and service type to the channel list table.Also made it less ugly :P

Test Plan: By checking out the chatlog application.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5081
2013-02-22 11:12:24 -08:00
epriestley
9b17870611 Always draw images with Javascript
Summary:
Currently, we use two different methods to draw Mock main images:

  - When the page first loads, we draw the image on the server with PHP.
  - When the user clicks a thumbnail, we draw the image on the client with JS.

Since we can't reasonably get rid of the client version of this, move it all to the client. This paves the way for some future features, like:

  - Doing some magic with stage sizing
  - URIs that jump to a specific comment
  - showing "loading" indicators while images are loading
  - Loading lowsrc images first?

Test Plan: Loaded page, clicked thumbs.

Reviewers: ljalonen, chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D5073
2013-02-22 10:34:32 -08:00
epriestley
5fdaebf158 Always show inline comment column in Pholio
Summary:
  - Always show the column so there's no jumping around when comments are added.
  - Set width to 320px so we can mobile it (not 100% sure how this will work yet).
  - When there are too many comments, scroll them internally.

Test Plan: {F33552}

Reviewers: ljalonen, chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D5071
2013-02-22 10:29:56 -08:00
Afaque Hussain
0cdce03b52 UI Improvements to Chatlog Application
Summary: Made improvements to the Chatlog application UI. Added Header & crumbs. Added service name and service type to the channel list table.

Test Plan: By checking out the chatlog application.

Reviewers: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5079
2013-02-22 10:08:26 -08:00
Nick Pellegrino
be7677f211 Config option to ignore setup issues
Summary: T2381

Test Plan:
Include existing setup issues in the ignore config option,
reduces the number of setup issues in the status bar, moves ignored
issues to the bottom of the list, and marks them as ignored.

Also include a string corresponding to no setup issue, and verify that
application does not break.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5072
2013-02-22 10:08:20 -08:00
Nick Harper
894cd13a41 Get rid of null characters
Summary:
We had some null bytes appearing in strings from unit test results, which
caused the PhutilRemarkupEngine to fail at properly generating html for it.
Specifically, the string would get cut off at the null byte, and the closing
</p> tag would never get added. The lack of this tag caused the dom for the
rest of the page to end up inside a hidden td in the unit test results table.

This is a horrible hack of a solution for this - it would be better to fix
PhutilRemarkupEngine (and in the future, strip out null bytes in input in
strings).

Test Plan: load a differential revision and see content after the unittest results

Reviewers: epriestley, vrana

Reviewed By: vrana

CC: aran, Korvin, rm

Differential Revision: https://secure.phabricator.com/D5065
2013-02-22 10:07:09 -08:00
vrana
c1f234759b Prefer MySQLi over MySQL
Summary: Makes sense with `QueryFuture`.

Test Plan: Switched secure.phabricator.com to MySQLi and nothing exploded.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5066
2013-02-22 10:00:26 -08:00
vrana
e9b5eb8609 Fix number of lint count displayed on SVN files
Test Plan: Looked at it.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5064
2013-02-22 09:33:18 -08:00
Afaque Hussain
dd076a813f SQL patch to drop channel field.
Summary: Deleted the channel field and added a sql patch to drop the channel field.

Test Plan: I have messed up my local mysql:P, hence by storage upgrade is failing. Anyways, The chatlog_event table shouldn't contain the channel column now.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5011
2013-02-22 07:29:40 -08:00
Afaque Hussain
3b2aed16c9 Moving code off channel
Summary: Deleted code which used channel. Created PhabricatorChatLogChannelQuery.php

Test Plan: By manually checking in the chatlog application.

Reviewers: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5010
2013-02-22 07:00:50 -08:00
epriestley
53f527f71f Improve thumbnails in pholio mock view
Summary:
  - Use "preview" instead of "thumb" so we don't get a white background.
  - Give this element a darker gutter to separate it a little bit visually.
  - Put every thumb on a square hit target.
  - Add some color/border/hover stuff.
  - Ship down image dimensions.
  - Reduce thumb size to 140 so we can fit 2-up on mobile when we get there.

Test Plan:
Before:

{F33545}

After:

{F33546}

Reviewers: chad, ljalonen

Reviewed By: ljalonen

CC: aran

Differential Revision: https://secure.phabricator.com/D5070
2013-02-22 06:53:54 -08:00
epriestley
88698bec0b Make use of "Mnn" in Pholio more consistent
Summary:
  - Drop it from crumb.
  - Add it to pinboard.
  - Drop it from header.
  - Add it to title.

Test Plan: looked at stuff

Reviewers: chad, ljalonen

Reviewed By: ljalonen

CC: aran

Differential Revision: https://secure.phabricator.com/D5068
2013-02-22 06:53:35 -08:00
Lauri-Henrik Jalonen
b180c3a009 Show editor
Summary: Show editor when user clicks edit button for inline comment.

Test Plan: Verified that editor is shown.

Reviewers: epriestley

CC: aran, Korvin

Maniphest Tasks: T2446

Differential Revision: https://secure.phabricator.com/D5030
2013-02-22 06:45:51 -08:00
Andrei Antonescu
83e4e1ce7f Don't show the DarkConsole preference if is false in the config
Summary: D4549 added a preference option for DarkConsole, but we should only show it if darkconsole.enabled is true. In most installs DarkConsole is not enabled, so now we check before showing it in the display settings so it's not confusing for users.

Test Plan: tested on localhost, when we change the darkconsole.enabled value in ENV the option is not displayed.

Reviewers: epriestley

Reviewed By: epriestley

CC: irinav, aran, Korvin

Differential Revision: https://secure.phabricator.com/D5069
2013-02-22 06:16:48 -08:00
epriestley
222b25f3a2 Allow CCs to be specified and edited for mocks
Summary: Not sure if we're going to do reviewers or whatever, but let mock creators share mocks with lists or individuals.

Test Plan: Created a mock with "duck" and "dog" cc'd, verified they showed up on the email.

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2568

Differential Revision: https://secure.phabricator.com/D5056
2013-02-22 05:44:46 -08:00
vrana
6404fa5c0e Don't display 0 in launch view
Summary: This includes assigned tasks in the Maniphest number.

Test Plan: Looked at it.

Reviewers: chad, epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D5067
2013-02-22 05:01:30 -08:00
epriestley
4dc49f7a93 Unparse/escape macros with commas, etc., correctly
Summary: Fixes T2574.

Test Plan: {F33501}

Reviewers: vrana

Reviewed By: vrana

CC: aran

Maniphest Tasks: T2574

Differential Revision: https://secure.phabricator.com/D5062
2013-02-21 16:36:54 -08:00
vrana
121ec67d0d Avoid double escaping in Remarkup
Summary:
These all work with plain text.

Fixes T2574.

Test Plan:
  lang=remarkup
  > [[ a | <a> ]]

  - [[ /a | <a> ]]

  //a**b**c//

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2574

Differential Revision: https://secure.phabricator.com/D5060
2013-02-21 16:26:26 -08:00
epriestley
2b10173a03 Don't retain "\r\n" when summarizing commits
Auditors: vrana
2013-02-21 15:12:54 -08:00
epriestley
b32bfb6541 Render commit summaries when rendering handles
Summary:
Fixes T2563. Instead of rendering "rPnnnnnn", render "rPnnnnnn: add feature X". Tweak Audit tables to accommodate.

@vrana / @nh, this migration might take a while. You could safely skip it when deploying and then run it after deployment.

I think I fixed all the other places where these render, but might have missed something.

Test Plan:
  - Ran first schema migration, clicked around to make sure nothing broke.
  - Ran `scripts/repository/reparse.php --message rXyyyyy`, verified summary populated.
  - Ran second migration.
  - Checked task/diffusion/audit/differential for weird rendering.

Reviewers: vrana

Reviewed By: vrana

CC: nh, aran, chrisbolt, allixsenos

Maniphest Tasks: T2563

Differential Revision: https://secure.phabricator.com/D5012
2013-02-21 15:09:35 -08:00
vrana
c29fe2deb6 Display application status in tip for needs attention number
Summary:
Also splits blocking and active revisions.

This could display 0 with non-empty tip over it.
It's intentional meaning that 0 objects need your attention but there is still some work to do.

Test Plan: Hovered over number.

Reviewers: epriestley, chad

Reviewed By: chad

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5049
2013-02-21 14:57:24 -08:00
vrana
6cee50d4d6 Link Browse Repository from repo overview
Summary: I need to go to full browse now and then to see pending revisions or lint view.

Test Plan: Clicked it.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5051
2013-02-21 14:45:22 -08:00
epriestley
c73a42a511 Clear mock notifications when viewing mocks
Summary:
- When viewing a mock, clear unread flag on notifications about it.
  - Show the "lcick to reload" version of the popup when you get a notification about the current mock.

Test Plan: Clicked a notification to clear it.

Reviewers: chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D5055
2013-02-21 14:35:07 -08:00
epriestley
60f3780127 Fix token given story hrefs
Summary:
derp to tha derp

Fixes T2578.

Test Plan: click click

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2578

Differential Revision: https://secure.phabricator.com/D5054
2013-02-21 14:24:53 -08:00
epriestley
9912fd08e3 Fix issue when creating a new mock in Pholio
Summary: Fix T2573. The way Lisk works, we try to save "protected" fields to the database. For non-database data, use "private".

Test Plan: Created a new mock.

Reviewers: chad, ljalonen

Reviewed By: chad

CC: aran

Maniphest Tasks: T2573

Differential Revision: https://secure.phabricator.com/D5053
2013-02-21 14:24:45 -08:00
Chad Little
3d6500823c Modernize People
Summary: Adds Crumbs, pht's, and checkout out mobile.

Test Plan: Added, removed people. Changed roles, checked iOS and Chrome.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5052
2013-02-21 14:10:22 -08:00
Matt Robenolt
e6281c3db0 Add the ability to create a macro from a url
Test Plan: Enter in a url and create a macro. :)

Reviewers: epriestley

Reviewed By: epriestley

CC: epriestley, aran, dctrwatson, Korvin

Differential Revision: https://secure.phabricator.com/D5039
2013-02-21 12:51:28 -08:00
vrana
3c989590bf Remove object name from header
Summary: It's displayed right above it in the breadcrumbs including a link.

Test Plan: Looked at the pages.

Reviewers: chad, epriestley

Reviewed By: epriestley

CC: aran, epriestley, s.o.butler

Differential Revision: https://secure.phabricator.com/D5045
2013-02-21 11:00:22 -08:00
vrana
fbd41e4219 Move revisions without reviewers to author's queue
Summary:
If the revision doesn't have reviewers then it's really not waiting on someone else and the author must take an action.
An improvement would be to check if the reviewers are not disabled but that would require loading their handles.

Test Plan:
/
/differential/

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, s.o.butler

Differential Revision: https://secure.phabricator.com/D5046
2013-02-21 10:13:40 -08:00
vrana
d643282385 Allow double click and drag in crossreference
Summary: Also simplifies the code.

Test Plan: Clicked, selected, double clicked, double clicked and dragged.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, s.o.butler

Differential Revision: https://secure.phabricator.com/D5048
2013-02-21 09:56:27 -08:00
vrana
4f5e57283f Fix dynamic string usage as safe input
Summary: I somehow missed it.

Test Plan: /diffusion/PF/lint/master/

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4801
2013-02-21 00:53:34 -08:00
kwadwo
762ace810d Allow files to TTL and and be garbage collected
Summary: Added ttl field to files. Gabage collect files with expired ttl

Test Plan: created file with a ttl. Let garbage collector run

Reviewers: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4987
2013-02-20 13:38:36 -08:00
John Watson
204d6481e4 Fix PhabricatorBot ignore messages from senders
Summary:
PhabricatorBotMessage->getSender returns a PhabricatorBotUser object (which potentially can be null)
So check null and then use getName to get actual name of the sender

Test Plan: Run phabot and add myself to ignore list

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5036
2013-02-20 12:30:54 -08:00
epriestley
28bdeb6d3e Document YYYYMMDD.name.ext format for SQL patches
Summary: This isn't currently documented anywhere.

Test Plan: Read text

Reviewers: kwadwon

Reviewed By: kwadwon

CC: aran

Differential Revision: https://secure.phabricator.com/D4988
2013-02-20 12:18:41 -08:00
epriestley
41b9752ba8 Fix an OAuthServer issue where an attacker could make a link function over HTTP when it should be HTTPS-only
Summary:
Two behavioral changes:

  - If the redirect URI for an application is "https", require HTTPS always.
  - According to my reading of http://tools.ietf.org/html/draft-ietf-oauth-v2-23#section-3.1.2 we need to check both names //and values// for parameters. Add value checking. I think this makes more sense in general? No one uses this, soooo...

iiam

Test Plan: This has good coverage already; added some tests for the new cases.

Reviewers: vrana

Reviewed By: vrana

CC: cbg, aran, btrahan

Differential Revision: https://secure.phabricator.com/D5022
2013-02-19 16:09:36 -08:00
vrana
2191e99b49 Delete unused variable 2013-02-19 16:08:04 -08:00
vrana
ee663afdeb Initialize variable in Next Step
Test Plan: None.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5020
2013-02-19 16:07:09 -08:00
epriestley
2f66138464 Fix an open redirect issue in Phame with "View Live"
Summary: Currently, you can set a blog URI to "evil.com" and then the live controller will issue a redirect. Instead, require a CSRF check. If it fails, pop a "this blog has moved" dialog.

Test Plan:
  - Clicked "View Live" for in-app and on-domain blogs and posts.
  - Hit URI directly.

{F33302}

Reviewers: vrana

Reviewed By: vrana

CC: cbg, aran

Differential Revision: https://secure.phabricator.com/D5021
2013-02-19 16:04:54 -08:00
epriestley
17cabea1bc I am not good at computer
Auditors: vrana
2013-02-19 15:25:44 -08:00
epriestley
fb90d5ffed Add implicit CC rules to ApplicationTransactions
Summary: When you make a comment on an object (or take certain other actions), we want to automatically CC you. Build this into ApplicationTransactions since it's a common behavior shared across multiple apps. Fixes T2215.

Test Plan: Made a comment on a macro, got cc'd.

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2215

Differential Revision: https://secure.phabricator.com/D5019
2013-02-19 15:20:28 -08:00
epriestley
db2c32acdf Don't fatal for diffs with no VCS
Auditors: vrana
2013-02-19 15:19:28 -08:00
Lauri-Henrik Jalonen
f1bd1da062 Moved rendering to PholioInlineCommentView
Summary:
Rendering of inline comments has now been moved to PholioInlineCommentView controller.
Delete almost deletes and edit... well not so much, but replaced google.fi with amazing popup.

Test Plan: Verified that inline comments still show up. Verified that delete almost deletes.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2446

Differential Revision: https://secure.phabricator.com/D4994

Conflicts:

	src/applications/pholio/controller/PholioInlineController.php
2013-02-19 14:14:40 -08:00
vrana
8eb404aea7 Avoid HTML escaping in plain text e-mails
Summary: Seen in e-mail from T2016.

Test Plan: None.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2432

Differential Revision: https://secure.phabricator.com/D5016
2013-02-19 14:02:35 -08:00
epriestley
0d38bca11f Fix function/method declaration lint in Phabricator. Automatic patches.
Auditors: vrana
2013-02-19 13:47:03 -08:00
epriestley
a22bea2a74 Apply lint rules to Phabricator
Summary: Mostly applies a new call spacing rule; also a few things that have slipped through via pull requests and such

Test Plan: `find src/ -type f -name '*.php' | xargs -n16 arc lint --output summary --apply-patches`

Reviewers: chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D5002
2013-02-19 13:33:10 -08:00
vrana
63f35ee94f Suggest branch name in Next Step
Summary: Is this correct for Mercurial?

Test Plan: Saw it.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4957
2013-02-19 12:58:16 -08:00
vrana
9a3d0f71a3 Decrease commit identifier display length
Summary: We are running out of horizontal space, this should help a bit.

Test Plan: Homepage, revision.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4518
2013-02-19 12:43:57 -08:00
vrana
4f5123e253 Make PhabricatorLintEngine extensible
Summary:
It makes sense for Phabricator customizations to use all the Phabricator linters and maybe add some more or delete some.
Doing this as proxy would be PITA as there are lots of methods that would need to be proxied.

Test Plan: Extended it.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4954
2013-02-19 11:37:25 -08:00
epriestley
a5f031835c Notify users when an object they created gets awarded a token
Summary:
  - Publish feed/notification.
  - I think this is too lightweight for an email?
  - We don't tell them which token right now. Laziness? Or intentional aura of mystery?!
  - For tasks, notify both author and current owner.
  - Fixes T2562.

Test Plan: {F33187}

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2562

Differential Revision: https://secure.phabricator.com/D5007
2013-02-18 17:44:45 -08:00
epriestley
8d79c7282d Accommodate long daemon command lines
Summary: Fixes T2559 with an incredibly original patch which I came up with myself.

Test Plan:
  $ ./bin/storage upgrade -f
  Applying patch 'phabricator:20130218.longdaemon.sql'...
  Storage is up to date. Use 'storage status' for details.

Reviewers: edward

Reviewed By: edward

CC: aran

Maniphest Tasks: T2559

Differential Revision: https://secure.phabricator.com/D5006
2013-02-18 11:51:42 -08:00
epriestley
50efcf1043 Fix double nav on Maniphest reports
Summary: Fixes T2311.

Test Plan: {F33161}

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2311

Differential Revision: https://secure.phabricator.com/D5005
2013-02-18 11:44:42 -08:00
Afaque Hussain
61c26463bc Php schema patch to update channel id's of past events.
Summary: Php schema patch to update channel id's of past events.

Test Plan: Having some proxy issues here due to which connection is timing out and bot is not able to log into IRC. Bot connects to IRC in my home though ! So I wasn't able to quite to test this by running storage upgrade.

Reviewers: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5000
2013-02-18 10:53:53 -08:00
epriestley
cd41b834f7 Improve Diviner linking
Summary:
Do this somewhat reasonably:

  - For links to the same documentation book (the common case), go look up that the thing you're linking to actualy exists. If it doesn't, render a <span> which we can make have a red background and warn about later.
  - For links to some other book, just generate a link and hope it hits something. We can improve and augment this later.
  - For non-documentation links (links in comments, e.g.) just generate a query link into the Diviner app. We'll do a query and figure out where to send the user after they click the link. We could pre-resolve these later.

Test Plan: Generated documentation, saw it build mostly-correct links when objects were referenced correctly. Used preview to generate various `@{x:y|z}` things and made sure they ended up reasonable-looking.

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T988

Differential Revision: https://secure.phabricator.com/D5001
2013-02-18 09:44:43 -08:00
Edward Speyer
16accb591c STRICT_ALL_TABLES fix for a Herald column
Summary: Casting a PHP bool to a MySQL `TINYINT(1)`!

Test Plan: This broke during arc diff; with this patch, arc diff now works!

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4999
2013-02-18 16:58:35 +00:00
epriestley
4f2aa99248 Add "serviceName" and "serviceType" to bot and chat logger
Summary:
Make each adapter provide a "serviceType" (campfire, flowdock, IRC) and "serviceName" (irc network / chat server) so that we can disambiguate between, e.g., "#phabricator on EFNet" and "#phabricator on FreeNode".

Make the chatlog handler ship them over Conduit.

Also fix some "policy can not be null" bugs with chatlog recording.

Test Plan:
Verified data inserted correctly:

  mysql> select * from chatlog_channel;
  +----+------------------+-------------+--------------+------------+------------+-------------+--------------+
  | id | serviceName      | serviceType | channelName  | viewPolicy | editPolicy | dateCreated | dateModified |
  +----+------------------+-------------+--------------+------------+------------+-------------+--------------+
  |  1 | irc.freenode.net | IRC         | #phabricator | users      | users      |  1361201689 |   1361201689 |
  +----+------------------+-------------+--------------+------------+------------+-------------+--------------+
  1 row in set (0.00 sec)

  mysql> select * from chatlog_event where channelID = 1;
  +----+--------------+------------+------------+------+---------------+--------------------------------+-----------+
  | id | channel      | epoch      | author     | type | message       | loggedByPHID                   | channelID |
  +----+--------------+------------+------------+------+---------------+--------------------------------+-----------+
  | 45 | #phabricator | 1361201689 | epriestley | mesg | blip blip     | PHID-USER-5bt2phfepag4cdvjtzg5 |         1 |
  | 46 | #phabricator | 1361201700 | epriestley | mesg | boop boop bip | PHID-USER-5bt2phfepag4cdvjtzg5 |         1 |
  +----+--------------+------------+------------+------+---------------+--------------------------------+-----------+
  2 rows in set (0.00 sec)

Reviewers: Afaque_Hussain, indiefan

Reviewed By: Afaque_Hussain

CC: aran

Maniphest Tasks: T837

Differential Revision: https://secure.phabricator.com/D4996
2013-02-18 07:50:41 -08:00
epriestley
57a9c3f07c Improve Diviner handling of paths and remarkup
Summary:
  - Currently, the atomizers don't emit atoms with the right file in all cases. Make them always emit it correctly.
  - Currently, we use absolute paths in some cases and relative paths in other cases. Use them consistently: relative when storing/presenting, absolute when accessing data.
  - Don't preserve linebreaks when marking up documentation (documentation is generally wrapped at 80col, but should not be wrapped in this way when displayed).
  - Markup Diviner link rules (albeit uselesly).

Test Plan:
Before:

{F33044}

After:

{F33045}

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T988

Differential Revision: https://secure.phabricator.com/D4992
2013-02-17 15:40:44 -08:00
epriestley
dba42ec5c7 Allow Diviner to render quasi-documentation
Summary: Take a few more steps forward toward usability.

Test Plan: {F33040}

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T988

Differential Revision: https://secure.phabricator.com/D4991
2013-02-17 15:40:24 -08:00
epriestley
a5fb482a00 Add a ref cache and index construction to Diviner
Summary: Cache refs in a single large index; rebuild the main index from them.

Test Plan: {F32334}

Reviewers: btrahan, vrana, chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T988

Differential Revision: https://secure.phabricator.com/D4900
2013-02-17 15:40:11 -08:00
epriestley
c7e12c6a85 Add a publish cache for the Diviner static publisher
Summary: Keep track of what we've written to disk, and regenerate only new documents.

Test Plan: Changed a small number of files, saw that number of files get regenerated. Ran with "--clean" and saw everything regenerate.

Reviewers: btrahan, vrana, chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T988

Differential Revision: https://secure.phabricator.com/D4897
2013-02-17 15:40:00 -08:00
epriestley
bcc082a01e Move Diviner further toward usability
Summary:
  - Complete the "project" -> "book" stuff. This is cleaner conceptually and keeps us from having yet another meaning for the word "project".
  - Normalize symbols during atomization. This simplifies publishing a great deal, and allows static documentation to link to dynamic documentation and vice versa, because the canonical names of symbols are agreed upon (we can tweak the actual algorithm).
  - Give articles a specifiable name distinct from the title, and default to something like "support" instead of "Get Help! Get Support!" so URIs end up more readable (not "Get_Help!_Get_Support!").
  - Have the atomizers set book information on atoms.
  - Implement very basic publishers. Publishers are basically glue code between the atomization process and the rendering process -- the two we'll have initially are "static" (publish to files on disk) and "phabricator" (or similar -- publish into the database).
  - Handle duplicate symbol definitions in the atomize and publish pipelines. This fixes the issue where a project defines two functions named "idx()" and we currently tell them not to do that and break. Realistically, this is common in the real world and we should just roll our eyes and do the legwork to generate documentation as best we can.
  - Particularly, dirty all atoms with the same name as a dirty atom (e.g., if 'function f()' is updated, regnerate the documentation for all functions named f() in the book).
  - When publishing, we publish these at "function/f/@1", "function/f/@2". The base page will offer to disambiguate ("There are 8 functions named 'f' in this codebase, which one do you want?").
  - Implement a very very basic renderer. This generates the actual HTML (or text, or XML, or whatever else) for the documentation, which the publisher dumps onto disk or into a database or whatever.
  - The atomize workflow actually needs to depend on books, at least sort of, so make it load config and use it properly.
  - Propagate multilevel dirties through the graph. If "C extends B" and "B extends A", we should regenerate C when A changes. Prior to this diff, we would regnerate B only.

Test Plan: Generated some documentation. Named two articles "feedback", generated docs, saw "article/feedback/@1/" and "article/feedback/@2/" created.

Reviewers: btrahan, vrana, chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T988

Differential Revision: https://secure.phabricator.com/D4896
2013-02-17 15:39:36 -08:00
epriestley
26aac16346 Garbage collect TTL'd cache entries from the general cache
Summary: We currently garbage collect general cache entries after a set period of time (30 days by default), but the recent changes to DarkConsole have left us writing a lot of large, short-TTL data to the cache. In addition to a maximum age, GC cache entires after they TTL out.

Test Plan: Ran GC daemon, saw TTL'd entries get collected. Inserted a TTL'd entry, saw it get collected by GC. Saw non-ttl'd entries not get collected.

Reviewers: chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D4990
2013-02-17 09:13:49 -08:00
epriestley
c2642c8a40 Remove redundant translations
Summary:
  - Remove some redundant copies of translations after D4985.
  - Make some %d more grammatical, "run this command" reads better than "run this 1 command". In context, these numbers are always very small, so counting them even in the >1 variants aren't useful.
  - Fix subscriber(s).

Test Plan: Looked at an unsubscribe story, saw translation.

Reviewers: chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D4989
2013-02-17 09:13:40 -08:00
epriestley
0ca7c77c10 Integrate subscriptions with ApplicationTransactions
Summary: Fixes T2214. For objects which support ApplicationTransaction, use ApplicationTransactions to apply subscription action changes. Principally, this makes clicking "Subscribe" / "Unsubscribe" appear correctly in the transaction log.

Test Plan: Clicked "Subscribe" and "Unsubscribe" a on Macros and Mocks.

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2214

Differential Revision: https://secure.phabricator.com/D4986
2013-02-17 06:37:09 -08:00
epriestley
2231e5200a Implement basic transaction detail blocks
Summary:
Some transactions (like editing configuration values, task descriptions, or Conpherence images) can't be simply explained and need an additional larger element to show them fully (like a text diff).

Support change details like this in ApplicationTransactions. Implements the element in Config, so you can see changes.

Test Plan: {F32974}

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2213

Differential Revision: https://secure.phabricator.com/D4984
2013-02-17 06:37:02 -08:00
indiefan
5fb56f859c Added Flowdock protocol adapter for the bot. Refactored campfire bot into a base streaming protocol adapter for common functionality.
Summary: First pass. Flowdock supports interesting message types (like replies to messages), but for now implementing a standard messaging interface.

Test Plan: Ran both a Flowdock bot and a Campfire bot. Made sure both still connected and responded properly to the Object Handler.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4983
2013-02-15 20:24:24 -08:00
epriestley
0e7382b102 Fix conpherence sprites
Summary:
The map had "conph" but everything else refers to "conpher". The "conph" sprite thing won when I regenerated sprites for tokens.

I should just fix this so it can't happen, but unbreak for now. Renamed "conph" -> "conpher", regenerated sprites, nuked all the "conph" stuff.

Test Plan: Looked at Conpherence, saw icons.

Reviewers: chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D4982
2013-02-15 19:04:25 -08:00
epriestley
dad7c65bf5 Fix some bot issues
Summary:
  - Deprecate differentialnotification in favor of feednotification; it's strictly better.
  - Fix feed notification + channels.
  - Fix rendering of new-style stories (pholio, macro), which currently fatal.

Test Plan: See chatlog.

Reviewers: codeblock, indiefan

Reviewed By: codeblock

CC: aran

Differential Revision: https://secure.phabricator.com/D4981
2013-02-15 17:10:51 -08:00
epriestley
02f7ece868 Fix overescaping in Paste
Summary:
Two issues:

  - When we read the content out of cache, it has lost its "safe html" flag, since the cache is raw-string oriented. Restore it.
  - explode() isn't safe-html-safe. Use phutil_split_lines() instead, which is.

Test Plan: Looked at /paste/

Reviewers: codeblock, chad

Reviewed By: codeblock

CC: aran

Differential Revision: https://secure.phabricator.com/D4980
2013-02-15 16:38:46 -08:00
Afaque Hussain
6c1043cf58 Populating Channel Id's
Summary: Modified the conduitAPI_chatlog_record method to populate channel Id's

Test Plan: Check if the new chatlog channel table is getting populated with entries

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4979
2013-02-15 16:01:06 -08:00
Deedy
638d1b4447 Renders the last 100 conpherence transactions only
Summary: Fixed T2428 a little bit

Test Plan: On trial, only the last n transactions loaded as hardcoded in ConpherenceViewController.php. Button was rendered.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2428

Differential Revision: https://secure.phabricator.com/D4898
2013-02-15 14:06:41 -08:00
Chad Little
9da0a460b6 Add 'My Mocks' filter to Pholio
Summary: Add the ability to filter Pholio on Mocks I added.

Test Plan: Went to test user account, no mocks, went to my account, saw mocks.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4974
2013-02-15 10:52:41 -08:00
Chad Little
b80f5e9105 Pholio touchups
Summary: Added crumbs, phts some things, made mobile menus work.

Test Plan: Review Pholio in sb and ios.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2531

Differential Revision: https://secure.phabricator.com/D4973
2013-02-15 10:17:31 -08:00
epriestley
ef7cc5df24 Increase pholio thumb size
Summary: Fixes T2548.

Test Plan: {F32894}

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2548

Differential Revision: https://secure.phabricator.com/D4972
2013-02-15 08:19:24 -08:00
epriestley
6124865c56 Minor phutil_tag/HTML fixes
Summary:

  - In stack traces, a `,` should clearly be a `.`.
  - In Calendar, a 'td' got swapped with a 'p' somewhere.
  - In old-style transaction views, strlen() is no longer a sufficient test.

Test Plan:

  - Verified stack traces render correctly.
  - Verified calendar renders correctly.
  - Verified Maniphest transactions with no comment no longer have a little empty div a few pixels high.

Reviewers: chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D4971
2013-02-15 08:14:31 -08:00
kwadwo
d8d16ece5e data in PhabricatorFile hashed using sha1
Summary: Hash file content using sha1

Test Plan: None provided

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4969
2013-02-15 07:47:50 -08:00
epriestley
49c40d209d Tokens v1
Summary:
Features!

  - Giving tokens.
  - Taking tokens back.
  - Not giving tokens.

Test Plan: See screenshots.

Reviewers: chad, vrana

Reviewed By: chad

CC: aran, btrahan

Maniphest Tasks: T2541

Differential Revision: https://secure.phabricator.com/D4964
2013-02-15 07:47:14 -08:00
Chad Little
f9f29253e4 Tweak pinboard styles
Summary: Curves, gradients, black and white designs. Some of those are in here.

Test Plan: Tested Macro and Pholio, better, tighter spacing. We could probably use bigger images. Checked iOS and Chrome.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4970
2013-02-15 07:45:50 -08:00
Chad Little
2c5c6f5915 Fix layout when no project blurb exists.
Summary: If no description, just move other attributes up.

Test Plan: Add a Project with no description, layout looks normal now.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4962
2013-02-14 13:55:48 -08:00
epriestley
f5aa92ecda Fix Phame escaping issue
Summary: Fixes blog.phacility.com, etc. There's bascially no plausible way we can do better here, especially once we get the Wordpress "API" up and running.

Test Plan: patched secure.phabricator.com live

Reviewers: vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D4958
2013-02-14 13:09:47 -08:00
epriestley
176ee9a889 Fix {Fnnn} rule in Remarkup
Summary:
Remarkup rule callbacks now get SafeHTML matches instead of string matches. If they call:

  $some_lisk_dao->load($matches[1]);

..as is the case with the `{F123}` rule, we reject the SafeHTML as an invalid ID and return null.

Allow load() to string convert any object (which will either succeed or fatal in an obviously-broken way).

(Long ago we threw instead of returning null here, but it meant we had to do a lot of redundant checks.)

Test Plan: `{F123}` shows an image again. `{C1}` embeds a countdown.

Reviewers: vrana, chad

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D4961
2013-02-14 13:09:19 -08:00
Chad Little
fb32a64d84 Convert Projects to use ObjectItemList
Summary: Converts the old table to a new item list, also added ability to link icons on right side of item stack.

Test Plan: Tested adding removing, sorting of projects both active and inactive.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4960
2013-02-14 13:07:35 -08:00
epriestley
1e5d1f6534 Improve some documentation/examples for bot stuff
Summary: This doesn't fully update the docs, but at least removes the most blatant lies.

Test Plan: looked at the document with my eyeballs

Reviewers: indiefan, staticshock

Reviewed By: staticshock

CC: aran

Differential Revision: https://secure.phabricator.com/D4959
2013-02-14 12:47:39 -08:00
Afaque Hussain
73991bb262 Added channel ID to events
Summary: Added a column channelID column to phabricator_chatlog.chatlog_event

Test Plan: Checked through mysql to see if table is updated

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4956
2013-02-14 12:27:18 -08:00
Afaque Hussain
9baada1571 Schema Patch to Add a New Table
Summary: Added 20130214.chatlogchannel.sql in resources/sql/patches to add a new table

Test Plan: Hmmmmm .......

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4952
2013-02-14 11:37:05 -08:00
Evan Priestley
dea1a9585c Merge pull request #237 from dmrenie/master
Fix 'View Full Commit History' link
2013-02-14 07:25:47 -08:00
Evan Priestley
60cb9e1cfb Merge pull request #267 from taichi/escape_file_path
escape svn repository file paths.
2013-02-14 07:00:29 -08:00
epriestley
0a8b0d1392 Merge IRCProtocolHandler into IRCAdapter
Summary:
Clearly silly to have a separate handler for this. I also made most of the protocol stuff direct writes so we don't need to ship them through handlers, and made the adapter ignore message it does not understand by default instead of sending them to IRC, and added PASTE "support".

We could still let handlers react to these messages by emitting them all as 'RAWIRC' or similar, but there's currently no need for that so I didn't bother.

Also fix an issue in D4924 with nickpass.

Test Plan: Had bot join IRC, talked to it.

Reviewers: indiefan

Reviewed By: indiefan

CC: aran

Differential Revision: https://secure.phabricator.com/D4925
2013-02-14 05:13:55 -08:00
epriestley
d5995d574d Formalize targets (users and channel) into objects
Summary:
Make users/channels/rooms into objects, so we can later sort out stuff like Campfire user IDs, Phabricator vs chat accounts, etc.

The only change here is that I removed output buffering from the macro handler. We should move throttling/buffering to adapters instead and have it apply globally.

Test Plan: Ran IRC and Campfire bots and interacted with them.

Reviewers: indiefan

Reviewed By: indiefan

CC: aran

Differential Revision: https://secure.phabricator.com/D4924
2013-02-14 05:13:38 -08:00
epriestley
ec306497f5 Lock down bot adapter API slightly
Summary:
  - Reduce visibiliy of config.
  - Add a typehint.

Test Plan: Ran campfire/irc bots and chatted with them.

Reviewers: indiefan

Reviewed By: indiefan

CC: aran, amerigomasini

Differential Revision: https://secure.phabricator.com/D4923
2013-02-14 05:07:50 -08:00
Afaque Hussain
7b133b8bf2 Added a new storage object
Summary: Added a new storage object. Created PhabricatorChagLogChannel

Test Plan: Will be specified by Evan :P

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4943
2013-02-14 05:07:36 -08:00
Chad Little
a05ee0d743 Moderize Slowvote
Summary: phts everywhere, crumbs, and mobile views.

Test Plan: Created Questions, Voted, tested Chrome and iOS, Looked at ALLCAPS

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4938
2013-02-13 16:47:24 -08:00
vrana
6ae4066d18 Kill phutil_render_tag()
Summary: Fixes some double escaping.

Test Plan: None.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2432

Differential Revision: https://secure.phabricator.com/D4945
2013-02-13 16:32:13 -08:00
epriestley
4f42d85c1c Use a serialize()-based cache instead of a JSON-based cache for changesets
Summary: These are full of PhutilSafeHTML objects now, which are destroyed by JSON serialization.

Test Plan: Dropped cache, then reloaded pages.

Reviewers: vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D4942
2013-02-13 14:45:57 -08:00
epriestley
262abd39bc Fix undefined variable "none"
Summary: Assuming this is right?

Test Plan: No more exception error when viewing a revision.

Reviewers: vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D4937
2013-02-13 13:40:46 -08:00
vrana
b08cdf4599 Add missing hsprintf() after merge
Summary: rP4bd2ad

Test Plan: None.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4939
2013-02-13 13:30:13 -08:00
epriestley
4bd2ad9270 Merge branch 'master' into phutil_tag
Auditors: vrana
2013-02-13 12:42:57 -08:00
vrana
4eb84149c2 Convert everything to safe HTML
Summary: Sgrepped for `"=~/</"` and manually changed every HTML.

Test Plan: This doesn't work yet but it is hopefully one of the last diffs before Phabricator will be undoubtedly HTML safe.

Reviewers: epriestley

CC: aran, Korvin

Maniphest Tasks: T2432

Differential Revision: https://secure.phabricator.com/D4927
2013-02-13 12:35:40 -08:00
vrana
718d22d607 Convert Remarkup to safe HTML
Test Plan: None.

Reviewers: epriestley

CC: aran, Korvin

Maniphest Tasks: T2432

Differential Revision: https://secure.phabricator.com/D4919
2013-02-13 12:34:49 -08:00
Afaque Hussain
2dab1c1e42 Made conduit permanently installed
Summary: Made conduit permanently installed

Test Plan: Tried to uninstall conduit from applications app and I couldn't :)

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4935
2013-02-13 12:21:50 -08:00
Chad Little
2591b4bc77 pht for Paste
Summary: Fill in missing pht's for Paste

Test Plan: Review Paste in ALLCAPS.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4934
2013-02-13 11:47:31 -08:00
vrana
5ad526942b Convert AphrontPanelView to safe HTML (except children)
Summary: Fixes some double escaping and potential XSS.

Test Plan: Looked at homepage.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2432

Differential Revision: https://secure.phabricator.com/D4917
2013-02-13 10:30:32 -08:00
Chad Little
b4d69800f9 Moderize Projects
Summary: Add mobile menus, PHTs and clean up panels. There is a litle more to do, but will tackle feed, etc in another diff.

Test Plan: Test Project filters on Chrome and iOS browser.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4931
2013-02-13 09:22:14 -08:00
Afaque Hussain
829fa6664f Created Chat log application class
Summary: Created a chat log application which displays on the home page.

Test Plan: Loaded the home page to see if the chat log application really shows up on the home page.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4930
2013-02-13 07:28:14 -08:00
Lauri-Henrik Jalonen
29d6180e35 Show drafts and inline comments
Summary:
Show drafts for users that made them.
Show inline comments beside image, highlights them when user mouseovers selection.
Allow users that can view mock to add inline comment instead of only allowing users that can edit mock to add inline comment.

Test Plan:
Verified that inline comments are shown beside image. Verified that only drafts for current user are shown. Verified that inline comment is
highlithed when user mouseovers their selection.

Reviewers: epriestley

CC: aran, Korvin

Maniphest Tasks: T2446

Differential Revision: https://secure.phabricator.com/D4929
2013-02-13 07:23:51 -08:00
taichi
21ddd3a73f escape svn repository file paths. 2013-02-13 19:30:11 +09:00
vrana
5a9e834658 Dont display empty other locations of lint errors 2013-02-12 14:01:27 -08:00
indiefan
eb942f3e1e Updated Campfire adapter to be able to post sound messages and paste messages.
Test Plan: Ran the bot with a handler that sends sound commands.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4922
2013-02-12 11:30:21 -08:00
vrana
80fb84bd94 Convert PhabricatorTransactionView to safe HTML
Test Plan: Looked at revision detail with comments.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4915
2013-02-11 19:01:20 -08:00
vrana
868ca71451 Fix some HTML problems
Summary: I'm too lazy to attaching them for diffs where they were introduced.

Test Plan:
/
/D1, wrote comment with code snippet
DarkConsole
commit detail, wrote comment
task detail, wrote comment

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2432

Differential Revision: https://secure.phabricator.com/D4911
2013-02-11 18:18:26 -08:00
vrana
8c71815028 Merge renderChildren() and renderHTMLChildren()
Summary: `renderChildren()` now returns array which isn't ideal but I prefer it to having two methods.

Test Plan: None.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4910
2013-02-11 18:18:23 -08:00
vrana
ae4e5807d6 Merge renderSingleView() and renderHTMLView()
Summary: They are same because render() returns safe HTML and raw strings are automatically escaped.

Test Plan: None.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4909
2013-02-11 18:18:21 -08:00
vrana
c9ab1fe505 Return safe HTML from all render()
Summary:
This is pretty brutal and it adds some `phutil_safe_html()`.
But it is a big step in the right direction.

Test Plan: None.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2432

Differential Revision: https://secure.phabricator.com/D4905
2013-02-11 18:18:18 -08:00
epriestley
edaff9e2a3 Improve description of "Show Filetree"
Summary: Clearer?

Test Plan: Read it.

Reviewers: nh

Reviewed By: nh

CC: aran

Differential Revision: https://secure.phabricator.com/D4908
2013-02-11 15:58:32 -08:00
vrana
37b98450a5 Replace array_interleave() by phutil_implode_html()
Summary:
I like this abstraction better.
Result of `phutil_implode_html()` may be also used as a param of `hsprintf()`.

Test Plan: None.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4904
2013-02-11 15:27:43 -08:00
vrana
c3ae8286db Configure PhutilXHPAST linter
Test Plan:
  $ arc lint src/applications/audit/controller/PhabricatorAuditListController.php

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2432

Differential Revision: https://secure.phabricator.com/D4895
2013-02-11 15:27:41 -08:00
vrana
a22ef4e9b4 Kill most of phutil_escape_html()
Summary:
This resolves lots of double escaping.
We changed most of `phutil_render_tag(, , $s)` to `phutil_tag(, , $s)` which means that `$s` is now auto-escaped.
Also `pht()` auto escapes if it gets `PhutilSafeHTML`.

Test Plan: None.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2432

Differential Revision: https://secure.phabricator.com/D4889
2013-02-11 15:27:38 -08:00
epriestley
1e74c05ac6 Add timestamps to development-mode static resource URIs
Summary:
When a developer changes CSS, it is normally sufficient to reload the page to get changes to show up, because browsers revalidate resources on reload.

However, if you reload the page and then an Ajax request adds new CSS to the page, this CSS does not trigger revalidation. The developer must currently clear their cache or re-run `scripts/celerity_mapper.php webroot`, to get this request to skip cache. We rarely use CSS over Ajax right now, so this hasn't cropped up much, but Conpherence does use this and clearing the resource is a big pain.

This seems to work fine normally, but I'm worried it might break some of the extra-celerity-resources stuff Facebook is doing.

Test Plan: In development mode, changed `conpherence/message-pane.css` and saw changes reflected on reload. Verified normal page loads do not cause additional HTTP requests. This change has no effect in production mode.

Reviewers: edward, vrana, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T2428

Differential Revision: https://secure.phabricator.com/D4902
2013-02-11 11:06:41 -08:00
epriestley
ca0d6aca10 Add separate exception for when the repository clone is unreadable.
Summary: Show a more specific exception when the local clone cannot be read because of permission issues.

Test Plan: Create a repository in an unreadable location and check for the right exception.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2368

Differential Revision: https://secure.phabricator.com/D4868
2013-02-11 08:35:00 -08:00
kwadwo
76aee9985a Conduit file upload method that takes in the files content hash and name. Returns the file phid if successful. Updates to phutil library map.
Summary: Conduit method to upload a a new file using a hash

Test Plan: Try uploading a file using its content hash

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4899
2013-02-11 06:30:02 -08:00