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

389 commits

Author SHA1 Message Date
epriestley
1f7e9bcadd Don't throw an exception for partially imported commits
Summary: Fixes T2243. We recently added the FileTreeView to Diffusion commits. However, if the page doesn't have any changesets (e.g., it has an error message instead, like "this commit hasn't imported yet"), we fail to build a file tree. In this case, don't try to build one.

Test Plan: Looked at not-imported and imported commits in Diffusion, saw proper rendering/crumbs and no exceptions.

Reviewers: btrahan, chad, vrana

Reviewed By: chad

CC: aran

Maniphest Tasks: T2243

Differential Revision: https://secure.phabricator.com/D4562
2013-01-21 07:45:42 -08:00
Debarghya Das
b801ca8e6f Author Can Close Audit Option
Summary: Fixes T2339

Test Plan: Close Audit button does not appear if audit.can-author-close-audit option is disabled

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2339

Differential Revision: https://secure.phabricator.com/D4525
2013-01-18 17:54:26 -08:00
vrana
00f730d6e9 Delete unused code in Diffusion browse file
Test Plan: Browsed a file.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4508
2013-01-18 08:37:52 -08:00
epriestley
0e612c910b Sort repositories in Diffusion by name, not creation order
Summary: Ref T2298. This seems like the least complicated reasonable order to implement.

Test Plan: Looked at repositories, saw them ordered by name.

Reviewers: vrana, btrahan, brennantaylor

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2298

Differential Revision: https://secure.phabricator.com/D4395
2013-01-16 10:51:08 -08:00
epriestley
b04a6a1999 Diffusion / MetaMTA options
Summary: Implement Diffusion MetaMTA options. Also make the fake '{{config.option}}' rule work, and use Remarkup to render summaries as well as descriptions.

Test Plan: Looked at Diffusion rules, edited some, looked at setup issues, verified '{{config.option}}' linked to the right option.

Reviewers: codeblock, btrahan

Reviewed By: codeblock

CC: aran

Maniphest Tasks: T2255

Differential Revision: https://secure.phabricator.com/D4466
2013-01-16 09:08:13 -08:00
vrana
f74c2bb138 Optimize displaying info about lint messages
Summary:
Log of some FB paths takes over 10 seconds.
We query two logs only to get accurate message about lint info which is not that important.

Test Plan: Displayed and clicked on it.

Reviewers: nh, epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4429
2013-01-15 17:59:06 -08:00
Chad Little
4c231486d7 More Diffusion panel updates.
Summary: In Commit Details, remove the panel backgrounds.

Test Plan: Chrome

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4454
2013-01-15 15:05:15 -08:00
Chad Little
e2e890672a Adds a new 'setnobackground' panel class, implements in Differential / Diffusion.
Summary: Still working through basic re-design. Adds the ability to re-use panel view without the background.

Test Plan: Viewed Diffusion and Differential in Chrome, FF, Safari.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4430
2013-01-14 16:40:04 -08:00
epriestley
df2c811a54 Fix an error in DiffusionBrowseTableView with SVN repsositories with no lint information
Summary: If the repository has no lint information, we don't set a 'lint' key, but try to access it unconditionally later on.

Test Plan: Looked at an SVN repository browse view, saw no errors.

Reviewers: vrana, btrahan, codeblock

Reviewed By: codeblock

CC: aran

Maniphest Tasks: T2281

Differential Revision: https://secure.phabricator.com/D4359
2013-01-08 09:50:03 -08:00
epriestley
0ecfb75101 Expand abbreviated Mercurial hashes to full hashes
Summary:
If you go to `/rXnnnn` in Git, we expand the hash. If you go to `/rXnnnn` in Mercurial, we give you a confusing error message.

Reconcile Mercurial behavior with Git. Fixes T2265.

Test Plan: Viewed partial hash, full hash commit in Diffusion. Viewed very short hash, got reasonable behaviors.

Reviewers: btrahan, tido

Reviewed By: tido

CC: aran

Maniphest Tasks: T2265

Differential Revision: https://secure.phabricator.com/D4330
2013-01-03 06:01:53 -08:00
epriestley
f6b1964740 Improve Search architecture
Summary:
The search indexing API has several problems right now:

  - Always runs in-process.
    - It would be nice to push this into the task queue for performance. However, the API currently passses an object all the way through (and some indexers depend on preloaded object attributes), so it can't be dumped into the task queue at any stage since we can't serialize it.
    - Being able to use the task queue will also make rebuilding indexes faster.
    - Instead, make the API phid-oriented.
  - No uniform indexing API.
    - Each "Editor" currently calls SomeCustomIndexer::indexThing(). This won't work with AbstractTransactions. The API is also just weird.
    - Instead, provide a uniform API.
  - No uniform CLI.
    - We have `scripts/search/reindex_everything.php`, but it doesn't actually index everything. Each new document type needs to be separately added to it, leading to stuff like D3839. Third-party applications can't provide indexers.
    - Instead, let indexers expose documents for indexing.
  - Not application-oriented.
    - All the indexers live in search/ right now, which isn't the right organization in an application-orietned view of the world.
    - Instead, move indexers to applications and load them with SymbolLoader.

Test Plan:
  - `bin/search index`
    - Indexed one revision, one task.
    - Indexed `--type TASK`, `--type DREV`, etc., for all types.
    - Indexed `--all`.
  - Added the word "saboteur" to a revision, task, wiki page, and question and then searched for it.
    - Creating users is a pain; searched for a user after indexing.
    - Creating commits is a pain; searched for a commit after indexing.
    - Mocks aren't currently loadable in the result view, so their indexing is moot.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: 20after4, aran

Maniphest Tasks: T1991, T2104

Differential Revision: https://secure.phabricator.com/D4261
2012-12-21 14:21:31 -08:00
vrana
2cc7f82ece Move Conduit methods inside applications
Test Plan:
/conduit/
/conduit/method/arcanist.projectinfo/
Call method

  $ echo '{}' | arc call-conduit user.whoami

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4268
2012-12-21 12:21:59 -08:00
vrana
3452315c7c Save absolute path when linting git-svn repo
Test Plan: Dumped `$this->svnRoot` in git-svn repo.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4255
2012-12-20 18:13:44 -08:00
vrana
ebe2a58f8a Use user's timezone in repo history
Test Plan: Looked at repo overview, repo history and commit detail.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4250
2012-12-20 15:16:05 -08:00
vrana
ef214e94ce Move setUser() to AphrontView
Summary: This is used in every other view.

Test Plan: Browsed around.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4248
2012-12-20 14:49:52 -08:00
epriestley
db89e23761 Make Repositories partially policy-aware
Summary: Small step toward repository hosting. No user-visible changes.

Test Plan: Looked at repositories in Diffusion.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D4227
2012-12-19 11:07:06 -08:00
vrana
9607642414 Display raw contents of deleted file in Diffusion
Test Plan:
Display change of deleted file.
Use **Show Raw File (Left)**.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4184
2012-12-14 17:49:18 -08:00
Bob Trahan
5b15f725bd differntial and diffusion design tweaks
Summary: most awesome is that differential-primary-pane no longer has a place in diffusion. less awesome is fixing the zebra striping on differential "Local Commits" view and making the font size of one of the table headers match the others.

Test Plan: looks good!

Reviewers: epriestley, chad

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4177
2012-12-13 10:46:41 -08:00
Bob Trahan
86a106d0b1 cowboy commit -- fixing fatal I introduced from D4174
Summary: we don't always have a diff so instead set an explicit title in the controller.

Test Plan: no more fatals. grepped carefully for every call site and tested them all
2012-12-12 21:21:56 -08:00
epriestley
051276a96b Minor cleanups to Diffusion breadcrumbs
Summary:
  - Remove "Diffusion" crumb (redundant with application icon)
  - Put "All Repositories" in its place on the landing page.
  - Render the repository crumb as "rX" instead of "X Repository".

Test Plan: Looked at various Diffusion pages.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D4173
2012-12-12 18:40:18 -08:00
Bob Trahan
9e8387175e upgrade diffusion to use modern header UI and fix a few quirks
Summary:
upgrades are CrumbsView, HeaderView, PropertyListView, and ActionListView. I had to modify CrumbsView stuff a bit to handle the "advanced" diffusion crumbs.

Quirks fixed include making file tree view show up in diffusion, the page not have extra space when the file tree is hidden, links no longer breaking once you visit files (since without the change the files always got "/" appended and thus 404'd), and a differential quirk where it read "next step:" and that colon is a no no,

Test Plan: played around in diffusion and differential

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, chad

Maniphest Tasks: T2048, T2178

Differential Revision: https://secure.phabricator.com/D4169
2012-12-12 17:50:42 -08:00
vrana
4f615ad2a9 Allow excluding paths from package
Summary: Resolves T2149.

Test Plan:
  $ bin/storage upgrade

# /owners/ - saw +
# /owners/package/1/ - saw +
# /owners/edit/1/ - added exclude paths, saw correct e-mail
# /rPabc123 - included paths are still highlighted and excluded not
# /owners/view/search/?path=/included/ - found
# /owners/view/search/?path=/excluded/ - not found
# owners.query - path: /included/
# owners.query - path: /excluded/
# new unit test

  PhabricatorOwnersPackage::loadAffectedPackages(
    $repository,
    array('/excluded/b.php'));

  PhabricatorOwnersPackage::loadAffectedPackages(
    $repository,
    array('/included/a.php'));

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2149

Differential Revision: https://secure.phabricator.com/D4102
2012-12-07 16:33:16 -08:00
epriestley
f306cab653 Use application icons for "Eye" menu and Crumbs
Summary:
Issues here:

  - Need an application-sized "eye", or a "home" icon for "Phabricator Home".
  - Some of the "apps_lb_2x" sliced images are the "_dark_" versions, not the light versions.
  - If you slice an application-sized "logout" (power off) icon and application-sized "help" (questionmark in circle) icon I can replace the current menu icons and nearly get rid of "autosprite".
  - To replace the icons on /applications/, the non-retina size is "4x", so we'd need "8x" for retina. Alternatively I can reduce the icon sizes by 50%.
  - The "Help", "Settings" and "Logout" items currently have a "glowing" hover state, which needs a variant (or we can drop it).
  - The /applications/ icons have a white hover state (or we can drop it).
  - The 1x application (14x14) icons aren't used anywhere right now, should they be? Maybe in the feed in the future, etc?
  - The "apps-2x" and "apps-large" sheets are the same image, but getting them to actually use the same file is a bit tricky, so I just left them separate for now.

Test Plan:
{F26698}
{F26699}

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T1960

Differential Revision: https://secure.phabricator.com/D4108
2012-12-07 13:37:28 -08:00
epriestley
20ee3003b5 Replace all instances of AphrontSideNavView with AphrontSideNavFilterView
Summary:
AphrontSideNavView is an old class which required you to do a lot of work; it was obsoleted by AphrontSideNavFilterView. Remove all direct callsites so I can clean it up.

This is a precursor to letting me render a filter menu as a dropdown menu for T1960.

Test Plan:
Examined each interface for correct filter construction and selection:

  - Browsed Diffusion
  - Browsed Differential
  - Browsed Files
  - Browsed Slowvote
  - Browsed Phriction
  - Browsed repo edit interface

Grepped for `AphrontSideNavView`. The only remaining instances are in `AphrontSideNavView` itself and `AphrontSideNavFilterView` (which currently uses it).

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T1960

Differential Revision: https://secure.phabricator.com/D4034
2012-12-07 13:30:31 -08:00
vrana
cb45ad67a3 Revive essential commit details
Summary: Deleted by D3977.

Test Plan:
  ./reparse.php --message

Reviewers: epriestley, edward

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4090
2012-12-06 10:44:16 -08:00
epriestley
fb289a2c77 Remove some more copyright headers that survived in branches, etc., through the great header purge. See D3886.
Auditors: vrana
2012-12-05 09:27:27 -08:00
David Renie
98ee24bc10 Fix 'View Full Commit History' link to link to the history for the current branch rather than the default branch 2012-12-03 18:23:33 -08:00
vrana
3645dc2dd9 Filter all lint messages by owner
Summary: Also add link to this page.

Test Plan:
/diffusion/lint/
/diffusion/lint/?owner[0]=a (zero lint messages)
/diffusion/lint/?owner[0]=b (nonzero lint messages)
Clicked the link.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4069
2012-12-03 14:25:07 -08:00
vrana
8584b87df4 Display lint results for all repos
Summary:
I want to add search per owner, this is a prerequisity for it.
There's no link to this page yet, I didn't find a good place for it.

Test Plan: Displayed it, clicked around.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, scottmac

Maniphest Tasks: T2038

Differential Revision: https://secure.phabricator.com/D4067
2012-12-03 14:12:25 -08:00
Bob Trahan
7154bea03c fixes two small diffusion bugs
Summary: make sure we only print the fancy tool tip thing if we have all the data we need. (fixes T2136). additionally, default $branches to array() to prevent errors from reset on null.

Test Plan: made a checkin for a mercurial repo with user "foo@bar" with no branch. verified name showed up in all views. also noted on commit detail view there was no more error about reset() on null for $branches.

Reviewers: epriestley

Reviewed By: epriestley

CC: chad, aran, Korvin

Maniphest Tasks: T2136

Differential Revision: https://secure.phabricator.com/D4065
2012-12-03 09:27:47 -08:00
vrana
b37b725f4f Use Git SVN revision in save_lint.php
Test Plan: Will run it.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4055
2012-11-30 11:06:50 -08:00
Ricky Elrod
416d26b621 Allow users to set whether or not textareas are monospaced.
Summary:
Some users like monospaced textareas and others don't.
This introduces an option to set this as a user preference.

Test Plan: Enabled and saw monospaced textareas, disabled and saw non-monospaced textareas.

Reviewers: epriestley

CC: aran, Korvin

Maniphest Tasks: T2114

Differential Revision: https://secure.phabricator.com/D4037
2012-11-27 14:06:42 -08:00
epriestley
f4fa968770 Fix an issue with browsing repositories that have README, etc
Summary: D3533 changed the path for files at root from, e.g., "README" to "/README", which fatals when we try to `git cat-file` it.

Test Plan:
This no longer happens:

{F24874}

Viewed a directory in browse without a trailing slash in the URL.

Reviewers: vrana, nh

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D4016
2012-11-21 16:56:05 -08:00
vrana
254678d41d Delete dead code handling README
Summary: Since D2336.

Test Plan: Looked at README in Diffusion.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4015
2012-11-21 16:34:30 -08:00
Nick Harper
b5c7896b10 Fix diffusion browse queries in git
Summary:
If you try to load a directory in diffusion in a git repo that has a readme
file and you don't include a trailing slash in the path, you get an error
because we don't assemble the full paths of files correctly. This fixes that.

Test Plan: load such a directory in diffusion and see no fatal

Reviewers: epriestley, vrana

Reviewed By: vrana

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3533
2012-11-21 13:48:27 -08:00
vrana
abd880e30f Display correct size of binary files in Diffusion
Test Plan: https://secure.phabricator.com/diffusion/P/browse/master/webroot/rsrc/image/header_logo.png

Reviewers: btrahan, epriestley

Reviewed By: btrahan

CC: aran, Korvin

Maniphest Tasks: T1139

Differential Revision: https://secure.phabricator.com/D3961
2012-11-21 13:09:45 -08:00
vrana
b29dfe436e Fix fatal in browse file if lintCommit is invalid
Test Plan: Set `lintCommit` to 'x' and browsed a file.

Reviewers: nh, epriestley

Reviewed By: nh

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3976
2012-11-19 12:06:58 -08:00
vrana
f47c0a3a06 Fix Diffusion lint counts under SVN
Summary: Also remove some columns.

Test Plan: Looked at SVN dir in Diffusion.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, vsuba

Maniphest Tasks: T2038

Differential Revision: https://secure.phabricator.com/D3949
2012-11-16 16:02:05 -08:00
vrana
ef8c43ac2a Simplify and optimize save_lint.php
Test Plan: Ran it.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2038

Differential Revision: https://secure.phabricator.com/D3933
2012-11-16 15:58:09 -08:00
vrana
3017a1f077 Order Diffusion lint details 2012-11-09 15:40:18 -08:00
vrana
a316a0bbb3 Define DiffusionRequest::setPath()
Summary: Resolves T2056.

Test Plan: Browsed SVN repo.

Reviewers: epriestley

Reviewed By: epriestley

CC: ced, aran, Korvin

Maniphest Tasks: T2056

Differential Revision: https://secure.phabricator.com/D3943
2012-11-09 11:17:56 -08:00
vrana
4f65d4f344 Display list of lint problems in Diffusion
Test Plan:
/diffusion/ARC/lint/master/, saw links.
/diffusion/ARC/lint/master/?lint=SPELL0, saw two links.
/diffusion/ARC/lint/master/src/lint/linter/ArcanistFilenameLinter.php?lint=SPELL0, saw link.
Clicked on everything.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2038

Differential Revision: https://secure.phabricator.com/D3931
2012-11-09 11:09:03 -08:00
vrana
726a4912bd Allow filtering by lint code in Diffusion
Test Plan:
/diffusion/ARC/lint/master/src/, clicked on count link.
/diffusion/ARC/browse/master/src/difference/?lint=XHP9, clicked on file name.
/diffusion/ARC/browse/master/src/difference/ArcanistDiffUtils.php?lint=, verified that all messages are displayed.
/diffusion/ARC/browse/master/src/difference/ArcanistDiffUtils.php?lint=XHP9.
/diffusion/ARC/browse/master/src/difference/ArcanistDiffUtils.php?lint=TXT3, verified that 0 messages are displayed.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3929
2012-11-08 15:44:37 -08:00
vrana
168bdaa872 Display lint overview in Diffusion
Summary: I will add links from /diffusion/ARC/lint/ in future diff.

Test Plan:
/diffusion/ - clicked on lint messages link.
/diffusion/ARC/ - clicked on lint messages link.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3926
2012-11-08 15:41:54 -08:00
vrana
846a359d9a Display number of lint messages in Diffusion dir
Test Plan:
Went to https://secure.phabricator.com/diffusion/ARC/browse/.
Saw number of lint messages per dir, not terribly slow.
Went to https://secure.phabricator.com/diffusion/ARC/browse/master/src/difference/.
Saw number of lint messages per file.
Disabled lint, didn't see it.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3921
2012-11-08 15:40:48 -08:00
vrana
47a184e2a5 Display saved lint messages in Diffusion browse file
Test Plan:
Looked at https://secure.phabricator.com/diffusion/ARC/browse/master/src/difference/ArcanistDiffUtils.php.
Saw "Show 16 Lint Messages".
Clicked on it, saw the messages.
Clicked on "Hide Lint Messages".
Went to https://secure.phabricator.com/diffusion/ARC/browse/master/src/difference/ArcanistDiffUtils.php;5be54e.
Saw "Switch Commit to See Lint".
Clicked on it, saw the messages.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3920
2012-11-08 15:39:44 -08:00
vrana
d91305e518 Add external arrow to Search Owners
Test Plan: Displayed it.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3930
2012-11-08 15:36:59 -08:00
vrana
2137b49d16 Link repo history from repo overview commits
Test Plan: Clicked on it.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3928
2012-11-08 15:36:35 -08:00
vrana
ef85f49adc Delete license headers from files
Summary:
This commit doesn't change license of any file. It just makes the license implicit (inherited from LICENSE file in the root directory).

We are removing the headers for these reasons:

- It wastes space in editors, less code is visible in editor upon opening a file.
- It brings noise to diff of the first change of any file every year.
- It confuses Git file copy detection when creating small files.
- We don't have an explicit license header in other files (JS, CSS, images, documentation).
- Using license header in every file is not obligatory: http://www.apache.org/dev/apply-license.html#new.

This change is approved by Alma Chao (Lead Open Source and IP Counsel at Facebook).

Test Plan: Verified that the license survived only in LICENSE file and that it didn't modify externals.

Reviewers: epriestley, davidrecordon

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2035

Differential Revision: https://secure.phabricator.com/D3886
2012-11-05 11:16:51 -08:00
vrana
f34246a723 Hide Edit Maniphest Tasks in commit with disabled Maniphest
Test Plan: Viewed commit with enabled/disabled Maniphest.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3871
2012-11-01 17:38:26 -07:00
Bob Trahan
4edf8ae2fc make "browse in diffusion" action work for commits in branches other than master
Summary: we do this by passing the "seenOnBranches" commit data detail through the stack

Test Plan: browse in diffusion link worked for non-master checkins under git

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1949

Differential Revision: https://secure.phabricator.com/D3853
2012-10-31 14:07:25 -07:00
Bob Trahan
9f51f1933f Bug fix for diffusion browse views for images and binary files
Summary: D3499 introduced some new hotness but broke these less common cases. add slightly updated ui for this.  Note we need a 'download' icon for this UI to not be horrendous.

Test Plan: viewed a binary file and an image in diffusion browse view

Reviewers: epriestley

Reviewed By: epriestley

CC: nh, aran, Korvin

Maniphest Tasks: T1997

Differential Revision: https://secure.phabricator.com/D3849
2012-10-31 11:43:17 -07:00
epriestley
244b1302a0 Implement PhabricatorMarkupInterface in Diffusion/Audit comments
Summary: Followup to D3804. Makes Diffusion main comments (not just inlines) render properly with the modern markup pipeline.

Test Plan: Created previews and inline previews. Edited inlines. Saved comment, viewed comment. Verified caches were read and written using "Services" tab.

Reviewers: btrahan, vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3805
2012-10-23 17:46:44 -07:00
epriestley
fdf90b46eb Use modern two-stage markup cache (PhabricatorMarkupInterface) in Differential
Summary:
See T1963 for discussion of the Facebook-specific hack.

Differential currently uses a one-stage cache (render -> postprocess -> save in cache) rather than the two-stage cache (render -> save in cache -> postprocess) offered by `PhabricatorMarkupInteface`. This breaks Differential comments coming out of cache for the lightbox, and makes various other things suboptimal (status of handles like @mentions and embeds are not displayed accurately).

Instead, use the modern stuff.

Test Plan:
  - Created preview comments and inlines in Differential.
  - Edited a Differential inline.
  - Submitted main and inline Differential comments.
  - Viewed and edited Differential summary and test plan.
  - Created preview comments and inlines in Diffusion.
  - Submitted comments and inlines in Diffusion.
  - Verified Differential now loads and saves to the generalized markup cache (Diffusion is close, but main comments still hold a single-stage cache).
  - Verified old Differential comments work correctly with the lightbox.

Reviewers: vrana, btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1963

Differential Revision: https://secure.phabricator.com/D3804
2012-10-23 17:33:58 -07:00
Bob Trahan
d9c6e07f2c If users are on the email to Phabricator, do not send them the Phabricator reply.
Summary: When we receive an email, figure out if any of the other tos and ccs are users. If they are, pass their phids through the stach as "exclude phids" and exclude them from getting the email.

Test Plan: used the various applications (audit, differential, maniphest) and noted emails were sent as expected.

Reviewers: epriestley, vrana

Reviewed By: vrana

CC: aran, Korvin, vrana

Maniphest Tasks: T1676

Differential Revision: https://secure.phabricator.com/D3645
2012-10-10 10:18:23 -07:00
epriestley
a18de93a8c Don't link files with no rendering changeset in DiffusionCommitChangeTableView
Summary:
When directories are added (e.g., on the `hg` initial commit, "/" is added) we don't render any diff for them but try to link to it in the table of contents.

Possibly we should render a diff saying "this directory was added", but stop it from complaining for now.

Test Plan: Looked at several hg and git commits which add directories to verify this gives us generally sensible behvior.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3663
2012-10-08 16:51:50 -07:00
Bob Trahan
6bbdd2609a Allow diffusion to load initial commits in Mercurial repositories
Summary: no parents - no problem - just diff that ish against "null"

Test Plan: initial commits were viewable in my test repos

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1689

Differential Revision: https://secure.phabricator.com/D3660
2012-10-08 16:35:34 -07:00
epriestley
78784aa1fe Group applications into groups on /applications/
Summary: So they're maybe a little easier to deal with? I'm going to take this formally to "plz @chad plz help" land.

Test Plan: {F20329}

Reviewers: btrahan, vrana, chad

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3609
2012-10-03 15:46:19 -07:00
vrana
422428a135 Declare used property 2012-10-03 13:32:53 -07:00
Aviv Eyal
52c68e1261 File view: Replace drop-down form with buttons for view options
Summary:
It always bothered me that adding/removing blame view takes two clicks.
Showing it like this saves a click for almost all transformations, and I think it feels nicer too.

I'm open to adding a user-setting for this (This form or the drop-down), but figured I'd ask first.

Test Plan:
Use buttons to switch modes - make sure text on button matches action.
Repeate with lines highlighted.

Reviewers: epriestley, vrana

Reviewed By: epriestley

CC: jungejason, Two9A, aran, Korvin

Differential Revision: https://secure.phabricator.com/D3499
2012-10-03 10:59:23 -07:00
vrana
e5e3617e46 Use ?view= in Blame previous but not in line link
Summary: I didn't notice that D3494 is revert of D3453.

Test Plan: Checked both line and Blame previous links.

Reviewers: epriestley, fdoemges

Reviewed By: fdoemges

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3566
2012-10-01 16:40:44 -07:00
vrana
b43f84d6dc Read rename information from DB instead of repository
Summary:
We already have this information for all VCSes, there's no point in parsing it again.
We currently support it only for Git and I remember there were some bugs in it.
It should also be faster.

Test Plan: Blamed previous revision of a file which was moved in SVN.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3564
2012-10-01 16:40:01 -07:00
Bob Trahan
557cc5b29c Make a PhabricatorRemarkupControl to de-duplicate code usage around adding a Remarkup reference to a TextAreaControl.
Summary: ...also makes Maniphest Task Edit Controller use this when its not appropriate to upsell email.

Test Plan: played around with each tool and verified the Remarkup reference was present

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1756

Differential Revision: https://secure.phabricator.com/D3468
2012-09-19 12:27:28 -07:00
vrana
5b6513e6e8 Pass branch to Diffusion URI in Owners and Externals
Test Plan: Visited detail of package in SVN and Git.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3514
2012-09-17 16:59:44 -07:00
vrana
eaf7aedb05 Enforce blame in Skip Past This Commit
Test Plan:
# Set default view to non-blame.
# Visit URL with '?view=blame'.
# Click //Skip Past This Commit//.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3494
2012-09-14 09:52:55 -07:00
vrana
34dfbdaf44 Open editor on highlighted line in Diffusion
Test Plan:
Edited:

  path$33
  path$33-35
  path

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3488
2012-09-13 11:22:00 -07:00
epriestley
1b7f04914c Make AphrontErrorView work on devices
Summary:
This is the last Paste UI element that doesn't work properly on tablets/phones. Make it flexible.

Also add empty states to Paste.

Test Plan: Viewed various errors, and `/uiexample/errors/`.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3429
2012-09-11 09:55:27 -07:00
vrana
e18fb4406e Don't include view in Diffusion line permalink
Summary:
Including view in permalink seemed like the correct solution to me.
Instead, I delete it all the time when copying somewhere else.

Test Plan:
Clicked on the link.
Changed view on permalink.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3453
2012-09-07 08:15:40 -07:00
vrana
8ff52c0b6c Set viewer for all handles loaded in controllers
Summary:
I've replaced all `id(new PhabricatorObjectHandleData(...))->loadHandles()` by `$this->loadViewerHandles(...)`.
Lint caught one usage in a static method.

Test Plan: Displayed revision with sporadic author.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3432
2012-09-04 23:14:26 -07:00
vrana
efd59322f2 Display 'away date' in blame
Summary: I've done D3432 in the hope that it will fix also this...

Test Plan: Blamed sporadic author.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3433
2012-09-04 23:14:10 -07:00
epriestley
93b0a501a4 Add local navigation to Differential
Summary:
Adds a flexible navigation menu to diffs that shows you your current position in the diff.

Anticipating some "this is the best thing ever" and some "this is the wosrt thing ever" on this, but let's see how much pushback we get? It seems pretty good to me.

Test Plan: Will attach screenshots.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1633, T1591

Differential Revision: https://secure.phabricator.com/D3355
2012-08-21 15:01:20 -07:00
vrana
8ee2a6f988 Explicitly load assets in revision list
Summary:
Rendering method shouldn't load data.
The view probably shouldn't load data either because it is a job for component (object that both loads data and displays them) but we don't have that concept in Phabricator.
This at least improves the architecture a little bit.

Test Plan: /differential/

Reviewers: epriestley

Reviewed By: epriestley

CC: alanh, aran, Korvin

Differential Revision: https://secure.phabricator.com/D3325
2012-08-20 18:02:20 -07:00
epriestley
46f4f6cf0a Fix a fatal if a directory listing contains a non-file called 'readme'
Summary: See T1665. If you have a directory named 'readme', we try to read it as a README.

Test Plan: Created a directory named 'readme', hit a similar fatal to the one in T1665, applied this patch, everything worked great.

Reviewers: btrahan, vrana

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1665

Differential Revision: https://secure.phabricator.com/D3312
2012-08-16 12:48:37 -07:00
Alan Huang
627584f501 Jump to PHP docs from symbol search more often
Summary:
It's kind of nice to type `s explode` in jump nav and have it
just work. This involves weakening a bunch of the request parameter
checks, but the only real extra assumption is that language defaults to
PHP... which is not that big of a stretch, and it's not like we know
about any other languages' documentation.

It'd be better to have builtins be more first-class and less awkward
hack, but that seems hard.

Test Plan: Search for symbols.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3302
2012-08-15 17:47:04 -07:00
vrana
375400802b Register commits as Diffusion fact objects
Summary:
We will need to process them.
Maybe it will fit better in Repository application but we don't have it yet.

Test Plan:
  $ ./fact cursors

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, royw

Differential Revision: https://secure.phabricator.com/D3287
2012-08-14 18:04:34 -07:00
epriestley
012370c6ab Use sprites for (nearly) all application icons
Summary: Sprites for everyone.

Test Plan: Loaded `/applications/`.

Reviewers: btrahan, chad, vrana

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1569

Differential Revision: https://secure.phabricator.com/D3280
2012-08-14 14:23:55 -07:00
vrana
6ce39db6ca Add ID to Pending Differential Revisions panel 2012-08-13 17:24:31 -07:00
epriestley
66cee129b6 Remove all code referencing old tab navigation
Summary:
  - Add getHelpURI() to PhabricatorApplication for application user guides.
  - Add a new "help" icon menu item and skeletal Diviner application.
  - Move help tabs to Applications where they exist, document the other ones that don't exist yet.
  - Grep for all tab-related stuff and delete it.

Test Plan: Clicked "help" for some apps. Clicked around randomly in a bunch of other apps.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3267
2012-08-13 15:28:41 -07:00
David Reuss
df3162584e Convert to custom encoding for diffusion blame views
Summary:
If a repository is configured with a custom encoding, it wasn't respected by DiffusionGitFileContentQuery making all views with
non-UTF8 characters fail. Check if we have a custom encoding and encode if any it set.

NOTE: This only works for Git repositories.

Test Plan: Browsed a repository with custom encoding before and after this patch.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T452

Differential Revision: https://secure.phabricator.com/D3251
2012-08-12 08:50:49 -07:00
epriestley
d3fd790574 Add basic support for new navigation menu
Summary:
Add a new left-side application menu. This menu shows which application you're in and provides a quick way to get to other applications.

On desktops, menus are always shown but the app menu can be collapsed to be very small.

On tablets, navigation buttons allow you to choose between the menus and the content.

On phones, navigation buttons allow you to choose between the app menu, the local menu, and the content.

This needs some code and UI cleanup, but has no effect yet so I think it's okay to land as-is, I'll clean it up a bit as I start integrating it. I want to play around with it a bit and see if it's good/useful or horrible anyway.

Test Plan: Will include screenshots.

Reviewers: vrana, btrahan, chad

Reviewed By: btrahan

CC: aran, alanh

Maniphest Tasks: T1569

Differential Revision: https://secure.phabricator.com/D3223
2012-08-11 07:06:12 -07:00
vrana
9030fe8b09 Respect type in symbol query
Summary: Was completely ignored.

Test Plan: /diffusion/symbol/C/?type=function

Reviewers: alanh

Reviewed By: alanh

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D3234
2012-08-09 22:28:17 -07:00
vrana
81946fc08d Join author and committer in Diffusion browse
Summary: Consistent with history view, simpler.

Test Plan: /diffusion/X/

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3230
2012-08-09 18:15:58 -07:00
Bob Trahan
b86d995b40 Detect if a commit *really* doesn't exist and 4oh4 from Diffusion commit view
Summary: rather than showing an erroneous "we still parsing" message.

Test Plan: for each version control system, typed in a garbage URL and got a 4oh4. (note this actually fails for SVN -- see comment about how my code fails atm -- and DiffusionGitRequest seems to pick off this error in advance and returns an AphrontUsageException.)

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1624

Differential Revision: https://secure.phabricator.com/D3201
2012-08-09 09:27:45 -07:00
Alan Huang
eeb359bae6 Make D3123 more consistent
Summary:
Put the function in the base class so all the Diffusion views
can use it. Also use shinier tooltips.

Test Plan: Browse Diffusion.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3206
2012-08-08 18:26:23 -07:00
Bob Trahan
8a4c08b01d Allow commits to be associated with projects and associated goodies
Summary:
- Commit detail view
 - List of projects
 - "edit" action which takes the user to a simple form where they can only add / remove projects.
-  Integrated the project relationship into the commit search indexer
 - fixed a bug from D790; it seems you must select the column if you're going to join against it later. Without this change searching for author or projectfails 100% for me.

Test Plan: added and removed projects. verified appropriate projects showed up in detail and edit view. searched for commits by project and found the ones I was supposed to...!

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1614

Differential Revision: https://secure.phabricator.com/D3189
2012-08-08 10:03:41 -07:00
vrana
8ab1789329 Improve displaying of very large commits
Summary:
Behave like Differential.

Also save one path ID query.

Test Plan: Displayed very large commit, clicked in ToC, clicked on Load.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3176
2012-08-07 10:51:38 -07:00
Alan Huang
a8d6af0f42 Infrastructure changes to support scoped symbols
Summary:
 - import_project_symbols supports an optional extra field, which is the
   context of the symbol.
 - Symbol query can take a symbol argument, either as a parameter or a
   URL component (so you can now jump nav to `s Zerg/rush`, for
   example).
 - Conduit method not yet updated. Will do that later.

NOTE: Not providing a context is distinct from providing an empty
context, because an empty context stands for top-level context, i.e.
functions and classes for PHP. It will not find class methods, etc. It
is possible that we should use some weird token that could not normally
be a context name to stand in for empty context.

Test Plan: Do a bunch of symbol searches.

Reviewers: epriestley

Reviewed By: epriestley

CC: nh, aran, Korvin

Maniphest Tasks: T1602

Differential Revision: https://secure.phabricator.com/D3148
2012-08-07 09:28:49 -07:00
vrana
ceb522427e Highlight lines on drag and drop in Diffusion
Summary: Nobody knows that it's possible to highlight more lines because there's no interface for it.

Test Plan:
Highlighted:

- single line
- top to bottom
- bottom to top
- inside to outside

Reviewers: Korvin, epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D3150
2012-08-05 18:56:25 -07:00
epriestley
643653dc61 Store the "current" application in the controller
Summary:
When we match an application route, select it as the current application and store it on the controller.

Move routes for the major applications into their PhabricatorApplication classes so this works properly.

Test Plan: Added a var_dump() and made sure we picked the right app for all these applications.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1569

Differential Revision: https://secure.phabricator.com/D3144
2012-08-05 14:03:39 -07:00
epriestley
194dc40672 Add a meta-application
Summary:
  - Adds a new "Applications" application.
  - Builds an application list via application config instead of via hard-coding, so we can move toward better concepts of installing/uninstalling applications, etc.
  - Applications indicate that they need attention with notice counts and brief status messages rathern than 50 giant tables of all sorts of app data.

I want to try replacing the home screen with this screen, pretty much. Not sure if this is totally crazy or not. What does everyone else think?

Test Plan: Will add screenshots.

Reviewers: btrahan, chad, vrana, alanh

Reviewed By: vrana

CC: aran, davidreuss, champo

Maniphest Tasks: T1569

Differential Revision: https://secure.phabricator.com/D3129
2012-08-02 14:07:21 -07:00
Alan Huang
ce8bcf887d Render an edit link in Diffusion directory views
Summary:
If the user has an editor configured, an Edit link appears next
to the History link.

Somewhat suboptimally, the column is still there if there are no edit
links, it's just empty. I don't know if it matters...

Test Plan: Load Diffusion pages while changing editor setting in preferences.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, avivey

Maniphest Tasks: T1558

Differential Revision: https://secure.phabricator.com/D3124
2012-08-02 12:22:50 -07:00
Alan Huang
6e1f5e353a Abbreviate author/committer in Diffusion directory views
Summary:
The tables are currently kind of wide, and the emails for
non-recognized users seem like the least useful parts, so I put them in
tooltips so they're only visible if you want them. On the other hand, it
means you can only view one at a time, and if you're on mobile you can't
see them at all. Overall, not sure whether this is a good idea.

Test Plan:
Load Diffusion pages with some recognized and some
unrecognized users. Hover over the latter and see that emails appear.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3123
2012-08-01 14:59:32 -07:00
epriestley
a476e5c08d Include symbols in main typeahead
Summary:
  - Include symbols in main typeahead results.
  - Simplify the symbol query a bit and extend PhabricatorOffsetPagedQuery. There was some stuff around language ranking that I got rid of, I think the theory there was that mapping file extensions to languages might not work in general but I think it works fine in practice, and we have more config stuff now around guessing languages and getting the mappings right.
  - Make it easier to debug the typeahead by showing the results in page format for non-ajax requests.
  - When we have too many results, show only the top few of each type.

Depends on D3116, D3117

Test Plan: Used typeahead, got symbols in results. Hit endpoint with non-ajax, got useful debug view.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1569

Differential Revision: https://secure.phabricator.com/D3118
2012-08-01 12:36:47 -07:00
vrana
606ef34d61 Load commit branches and tags by AJAX
Summary:
Each query takes over 2 seconds in FBCODE.
I didn't find a way how to speed them up.
There's also no easy way how to parallelize them at least.
So AJAX is the last instance.

Test Plan: Loaded commit with one branch and no tag.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3112
2012-07-31 17:01:41 -07:00
Bob Trahan
c8578b9fa8 Add a link to repository tool if there are no configured repositories
Summary: helping noobs help themselves

Test Plan: set $rows = array() and verified the txt. also threw a false && for my isAdmin conditional to check the other txt

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1086, T1360

Differential Revision: https://secure.phabricator.com/D3100
2012-07-30 09:09:40 -07:00
vrana
05bf6bef81 Jump to correct line in Blame previous revision
Test Plan: Jumped on correct line in SVN, Git and HG repos.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3084
2012-07-27 13:38:15 -07:00
Nick Harper
14e3e5ccfd Provide user option for disabling diffusion symbol cross-references
Summary: Some people don't like these, so they should be able to turn them off.

Test Plan:
Toggled the setting on and off; loaded a page in diffusion and differential
that should have symbol cross-references, and saw that they weren't linked
when I had the setting disabled. I also checked that the symbols are still
linked when the setting hasn't been touched.

Reviewers: epriestley, vrana

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3069
2012-07-26 20:25:27 -07:00
vrana
0cfdf2f74f Allow specifying against commit in DiffusionRawDiffQuery
Summary: I will need this for tracking line number in Blame previous revision.

Test Plan:
  $ hg diff --rev 0:1
  $ svn diff -r 64382:64383 README

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3083
2012-07-26 15:13:03 -07:00
vrana
636877807f Fix typo in comment 2012-07-26 13:45:48 -07:00
epriestley
c85d6d5e1b Fix Diffusion fatal with symbol highlighting
Summary: This returns a list of PHIDs, not objects which need to be pulled.

Test Plan:
Repro'd fatal locally, verified it was fixed.

Repro steps are:

  - Create an arc project associated with a repository, with indexed language(s) and subprojects.
  - View a file in that repository.

Reviewers: nh, btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3038
2012-07-23 12:49:43 -07:00