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

418 commits

Author SHA1 Message Date
Chad Little
16a0f4a88e Update tables to table-kit view.
Summary: Reskinning tables to table-kit mocks, which includes new textures, spacing, slightly larger fonts. Looking for early feedback before adding in new row colors and other items into the class.

Test Plan: http://phab1.pushlabs.net/uiexample/view/PhabricatorSortTableExample/

Reviewers: btrahan, epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4396
2013-01-11 11:24:35 -08:00
vrana
e05d8d7061 Let datepicker jump one month forward
Test Plan: Clicked on next month, didn't see year 20121.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4277
2012-12-21 16:54:48 -08:00
epriestley
b116861b16 Add draft support to ApplicationTransactions
Summary:
When previewing, save drafts. When loading objects, restore drafts if they are available.

Depends on: D665

Test Plan:
  - Viewed a Mock.
  - Typed text into the comment box.
  - Reloaded the page.
  - Text still there.
  - Hit submit, got my comment.
  - Reloaded the page.
  - Draft correctly deleted.
  - Repeated for Macros.

Reviewers: btrahan, chad, vrana

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2104

Differential Revision: https://secure.phabricator.com/D4252
2012-12-21 05:57:14 -08:00
epriestley
0fd77783a4 Add previews to ApplicationTransaction
Summary:
Implements previews for Macros and Pholio.

(Design is nonfinal -- kind of split the difference between `diff_full_view.png`, laziness, and space concerns. Next couple diffs will add more stuff here.)

Test Plan: {F28055}

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran, vrana

Maniphest Tasks: T2104

Differential Revision: https://secure.phabricator.com/D4246
2012-12-21 05:51:33 -08:00
Bob Trahan
a652ca462e finish implementing N and W tooltips and use W in differential
Summary: 'cuz new fluid layouts require the westerlyness. Looks like D4126 started the N and W implementation but didn't finish it...? note I had to do the shifting of the 5 pixels in javascript; using the CSS didn't work for me in chrome.

Test Plan: uiexample, and hoping it goes well when deployed in prod for differential case

Reviewers: epriestley

Reviewed By: epriestley

CC: chad, aran, Korvin

Maniphest Tasks: T2211

Differential Revision: https://secure.phabricator.com/D4257
2012-12-20 18:23:35 -08:00
vrana
7dff7bf049 Toggle accept warnings on reload
Summary: We now remember this value, it's remembered also after page refresh.

Test Plan: Reloaded revision about to be accepted.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4196
2012-12-17 12:31:00 -08:00
epriestley
221562b294 Modernize file uploads
Summary:
Modernizes file uploads. In particular:

  - Adds a mobile menu, with an "Upload File" item.
  - Adds crumbs to the list view, detail view and upload view.
  - Adds "Upload File" action to crumbs.
  - Moves upload file to a separate page.
  - Removes the combined upload file + recent files page.
  - Makes upload file use a normal file control by default (works on mobile).
  - Home page, file list and file upload page are now global drop targets which accept files dropped anywhere on them. Dragging a file into the window shows a mask and an instructional message.
    - User education on this is a little weak but I think that's a big can of worms?
  - Fixes a bug where dropping multiple files into a Remarkup text area produced bad results (resolves T2190).

T879 is related, although it's specifically about Maniphest. I've declined to make global drop targets yet there because there are multiple drop targets on the page with different meanings. That UI needs updating in general.

@chad, do we have an "upload" icon (counterpart to "download")?

Test Plan: Uploaded files in Maniphest, Differential, Files, and from Home. Dragged and dropped multiple files into Differential. Used crumbs, mobile.

Reviewers: chad, btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2190

Differential Revision: https://secure.phabricator.com/D4200
2012-12-16 16:34:01 -08:00
epriestley
6f0c87269b Modernize Files lists
Summary: Update to new UI stuff, prepare for mobile.

Test Plan: {F27167}

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D4198
2012-12-16 16:33:02 -08:00
epriestley
120e44c344 Fix two left-nav bugs
Summary:
  - Fixes a bug where dragging a flexible left nav and then pressing "f" to hide it didn't properly reset the content panel's left margin.
  - Fixes a bug where D4185 removed "white-space: nowrap;" accidentally (from @asherkin)

Test Plan:
  - Dragged bar, then pressed "f".
  - Can't repro the nowrap thing for some reason.

iiam

Reviewers: asherkin, vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D4194
2012-12-15 06:39:33 -08:00
epriestley
081163ab6d Simplify side nav CSS and fix various glitches
Summary:
Fixes glitches in the side nav. Resolves T1828. Resolves T2156.

  - Elastic scrolling (T2156): in Safari on OSX, using a scroll touch on the trackpad to scroll up past the top of the document caused newer-style side menus to scroll down, leaving a visible whitespace bar.
  - Whitespace glitch: Particularly in Safari, scrolling down the document quickly from the top caused the top menu to scroll away before the side menu rose to meet it. Use a fixed background color bar that extends under the menu so this doesn't happen.
  - Use of "!important": use CSS better so we don't need to "!important" things.
  - Dark Console (T1828): Instead of hard-coding the top position, determine it dynamically by looking at where the content is. This also fixes the menu overlapping with the red "there are errors on this page" development bar.
  - General "fixed" glitchiness: don't use fixed-position for menu content other than flexible (draggable) menus.

Test Plan:
  - Viewed and scrolled menus in Paste. Opened and closed DarkConsole. Switched devices.
  - Viewed and scrolled flexible menus in Differential and Diffusion. Opened and closed DarkConsole. Switched devices.

Reviewers: vrana, chad, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1828, T2156

Differential Revision: https://secure.phabricator.com/D4185
2012-12-14 15:14:14 -08:00
epriestley
7b09b4d7e7 Remove copyrighted assets from codebase
Summary:
We don't own the copyright to (or have a license to distribute) this media file.

Also improve performance.

Test Plan: ↑↑↓↓←→←→BA <Enter>

Reviewers: codeblock

Reviewed By: codeblock

CC: aran

Differential Revision: https://secure.phabricator.com/D4176
2012-12-13 12:50:47 -08:00
epriestley
d2a5ee4fa4 Render application transactions via Ajax
Summary:
When possible, render application transactions via Ajax. Instead of reloading the page when the response returns, append new transactions to the transaction view.

Scroll the window to the new transactions, animate them in, and clear the form to make this interaction feel reasonable.

When editing transactions, fade them in but do not scroll to them (i.e., don't disrupt the user's position).

Test Plan: Edited and appended transactions via Ajax. Observed fade in animations and scroll behavior. Clicked anchors to verify proper anchor accounting.

Reviewers: vrana, btrahan, chad

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1960

Differential Revision: https://secure.phabricator.com/D4151
2012-12-11 14:02:29 -08:00
epriestley
025411990b Apply ApplicationTransaction edits and deletes via Ajax if available
Summary: When possible, replace the edited or deleted transaction inline using Ajax.

Test Plan: Repeatedly edited and deleted transactions. Clicked their anchors to verify anchors were correctly preserved.

Reviewers: vrana, btrahan, chad

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1082

Differential Revision: https://secure.phabricator.com/D4150
2012-12-11 14:02:12 -08:00
epriestley
26dd2a0eef Allow ApplicationTransaction comments to be edited and deleted
Summary:
Allows you to edit or delete comments in appplications which support ApplicationTransactions.

UI/UX stuff:

  - The dialogs are rough but I want to do a dialog design pass more generally, @chad has some mocks.
  - When you add new mentions via edit, they don't currently count as mentions. I'm not sure what I want to do about this.
  - When you edit or delete a comment, we do not publish any notifications about it. I think this is reasonable.
  - I didn't separate "delete" out versus "edit"; I assume it will be reasonably intuitive that deleting all the text deletes effectively deletes the comment. I also want to discourage deletion somewhat (we still show the transaction, just show that the comment has been deleted).

Test Plan:
Transaction view, note "Edit" and "Edited" links:

{F26914}

Edit view, has some design issues but I want to do a pass on dialogs in general:

{F26915}

History view:

{F26913}

Reviewers: vrana, btrahan, chad

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1082

Differential Revision: https://secure.phabricator.com/D4149
2012-12-11 14:01:51 -08:00
epriestley
1d5ace45bd Add mail support to generic transactions
Summary:
  - Adds mail support to the generic transaction construct.
  - Restores mail support to Pholio (now much improved; the mails are actually useful).

Test Plan: Updated a Pholio mock, got mail.

Reviewers: btrahan, chad, vrana

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2104

Differential Revision: https://secure.phabricator.com/D4139
2012-12-11 14:00:07 -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
92678eb050 Improve style of notifications
Summary:
  - Gets about 25% of the way toward @chad's notification mocks.
    - YES: Hover states, entire notification is a click target, border, header, footer.
    - NO: Profile pictures (lazy), timestamps (want to refactor time code before introducing a new formatting style), app icons (they'd look funny without timestamps I think)
  - Deletes some old files.
  - Mostly trying to get this good enough to turn on by default.

Test Plan: Looked at notifications. Clicked some notifications.

Reviewers: chad, btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D4119
2012-12-07 16:26:43 -08:00
epriestley
c6ca409a03 Minor, fix more merge failures. 2012-12-07 13:49:39 -08:00
epriestley
8bcdf42762 Simplify ".device-phone X, .device-tablet X { ... }" rules
Summary: Add a ".device" rule which means "phone or tablet". Simplify about 5000 rules which were written ".device-phone X, device-tablet X { ... }".

Test Plan: Browsed the site a bit without incident.

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T1960

Differential Revision: https://secure.phabricator.com/D4103
2012-12-07 13:37:10 -08:00
epriestley
1c9a6be979 Add a breadcrumbs element
Summary:
Add a basic breadcrumbs element, and implement it in Paste.

This needs some polish but is most of the way there.

Test Plan:
{F26443}
{F26444}
{F26445}

(This element is not visible on devices.)

Reviewers: chad

Reviewed By: chad

CC: aran, btrahan

Maniphest Tasks: T1960

Differential Revision: https://secure.phabricator.com/D4087
2012-12-07 13:35:17 -08:00
epriestley
6482876cf3 Remove the application menu
Summary:
Toss this completely as per discussion elsewhere. Basically it doesn't feel as useful as we imagined it would, and breadcrumbs from T1960 will replace the primary useful part (navigating up).

There's some more cleanup to do but I'll hit that in the next few diffs.

Closes T1828 as wontfix.

Test Plan: Viewed app + local, app-without-local interfaces. Saw no app menus.

Reviewers: chad

Reviewed By: chad

CC: aran, vrana

Maniphest Tasks: T1828, T1960

Differential Revision: https://secure.phabricator.com/D4033
2012-12-07 13:29:44 -08:00
epriestley
71c170661b Use "flame" notification icon and bubble instead of lightning bolt
Summary: Switch to the final versions of these

Test Plan: Will add screenshots...

Reviewers: chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D4032
2012-11-27 14:03:25 -08:00
epriestley
d9fd43704f Improve Lightbox behavior for nonstandard clicks
Summary:
When users middle click or command-click an image, we should open it in a new tab, not open a lightbox.

See https://github.com/facebook/phabricator/issues/234

Test Plan: Left, middle, and command-clicked a lightbox image.

Reviewers: vrana, chad, btrahan

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D4020
2012-11-22 08:25:13 -08:00
vrana
19c840edf2 Better explain 'h' keyboard shortcut in Differential
Summary: Also move 'f' outside this group of commands.

Test Plan: Pressed '?'.

Reviewers: epriestley, alanh, frantic

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3903
2012-11-06 11:50:31 -08:00
Alex Kotliarskyi
209954f28c Add hotkey for hiding file tree
Summary:
In Differential, viewer can hit 'f' key to hide/show file tree on the left
side. Useful on narrow monitors.

Test Plan: Open any diff in Differential tool, hit 'f', watch file tree disappears

Reviewers: vrana, mattchoi, epriestley

Reviewed By: vrana

CC: aran, epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D3844
2012-11-01 10:20:14 -07:00
vrana
7ab82ed72e Select correct link in file tree
Summary:
Clicking on a shielded file in file tree highlighted the previous one.
Also, menu bar is not fixed anymore.

Test Plan: D3355#d77999bc - `scripts/celerity_mapper.php` was highlighted.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3806
2012-10-23 17:39:29 -07:00
epriestley
ddb1f181c1 Simplify lightboxing and fix a few things
Summary:
Minor tweaks to lightboxes.

  - With "position: fixed;", we don't need to do any of the scroll/resize stuff. Just remove it.
  - Make the lightbox go over the menu bar -- was it intentional that it wasn't?
  - Make 'jx-mask' use "position: fixed;" too.
  - Add a loading indicator.
  - In Differential/Maniphest/etc, a preview may bring in an image but won't bring in the CSS we need. The "real" fix is to ship CSS/JS with ajax, but that's really hard -- fake it by pulling in the right CSS any time we render a remarkup area.

I'm going to do a couple of other tweaks here but need to update JX.Mask.

Test Plan: Verified behavior is reasonable in Safari, Firefox, Chrome with multiple images / scroll / previews / resize.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1896

Differential Revision: https://secure.phabricator.com/D3795
2012-10-23 17:34:43 -07:00
epriestley
d984a3ffa4 Use CSS to resize the lightboxed image instead of Javascript
Summary: We can let the browser do the scaling with some simpler CSS rules.

Test Plan: Opened very large images in Safari, Firefox and Chrome and resized the browser. Observed smooth scaling and no issues with the image overlapping UI elements, etc.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1896

Differential Revision: https://secure.phabricator.com/D3802
2012-10-23 12:09:59 -07:00
epriestley
0b9101f3c5 Make lightbox close when the background is clicked
Summary: When you click the dark background, close the lightbox.

Test Plan: Clicked arrows, image, etc., to make sure it didn't close. Clicked background to close.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3801
2012-10-23 12:00:45 -07:00
epriestley
4596e3876b Improve scrolling behavior for lightboxes in Safari
Summary: Our "html { overflow-y: scroll; }" makes Safari flip out when we put "hidden" on body. Instead, put the scroll on `body` and then replace it with `hidden` when the lightbox is visible.

Test Plan: In Safari, the body scrollbar vanishes when the lightbox is active and scrolling no longer causes spasms.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3800
2012-10-23 12:00:37 -07:00
epriestley
0c48c1f487 Make date control include times
Summary:
See discussion in T404. Basically, the problem with date-only controls is that they may behave unpredictably in the presence of timezones. When you say "This needs to be done by Oct 23", you probably mean "Oct 23 5PM PST" or something like that, but someone in China may see the "Oct 24" and hit the deadline in good faith but be 10 hours too late. T404 has more discussion and examples. There are ways to fake this, but they get more complicated if the guy in China needs to move the date forward 24 hours.

I think the best solution to this is to not have date-only controls, and always display the time. This makes it absolutley unambiguous what something means, because the guy in the US will set "Oct 23 5PM" and the guy in China will see that accurately in local time.

The downside is that it's slightly more visual clutter and work for the user to specify things precisely, but I added some hints (start/end of day, start/end of business) that will hopefully let us pick the right default in most cases.

Test Plan:
Set some dates.

{F21956}

This has a couple of edge case issues on resize and some not-so-edge-case issues on mobile, but should be good to build T407 on without API changes.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T404, T407

Differential Revision: https://secure.phabricator.com/D3793
2012-10-23 12:00:20 -07:00
Bob Trahan
49a7f9e7d7 Fix download button to work on firefox
Summary: need to setTimeout on the removal from the DOM so these browsers don't freak out

Test Plan: downloaded images on firefox and safari

Reviewers: vrana, epriestley

Reviewed By: vrana

CC: aran, Korvin

Maniphest Tasks: T1896

Differential Revision: https://secure.phabricator.com/D3799
2012-10-23 11:52:59 -07:00
epriestley
e0cc277d5f Fix mask positioning and use mask classes in lightbox
Summary: See D3795 / D3797. Also made the mask darker.

Test Plan: Mask now sizes properly on window resize in all browsers / mask uses.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3798
2012-10-23 11:39:33 -07:00
Bob Trahan
3ffc764141 Introduce lightbox view for images
Summary:
images attached to maniphest tasks and mentioned in remarkup anywhere now invoke a lightbox control that lets the user page through all the images.

lightbox includes a download button, next / prev buttons, and if we're not at the tippy toppy of hte page an "X" or close button.

we also respond to left, right, and esc for navigating.

next time we should get non-images working in here...!

Test Plan:
played with maniphest - looks good
made comments with images. looks good.
made sure multiple image comments worked.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, chad

Maniphest Tasks: T1896

Differential Revision: https://secure.phabricator.com/D3705
2012-10-22 19:06:56 -07:00
epriestley
e2c303c1af Add a post_max_size exception for drag and drop uploads
Summary: See comments.

Test Plan: Uploaded a small image in Safari via drag-and-drop.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3771
2012-10-22 10:54:23 -07:00
epriestley
a3ffab6205 Use JX.Request.setRawData()
Summary:
See D3727.

@paulshen, these are the only callsites we have in Phabricator so we can remove `setFile()` once it's clear on the Facebook side.

Test Plan: Uploaded a file with drag and drop.

Reviewers: paulshen, vrana, mnml0

Reviewed By: mnml0

CC: aran

Differential Revision: https://secure.phabricator.com/D3769
2012-10-20 10:53:51 -07:00
vrana
e14930f860 Provide assist for Remarkup table
Summary: Can you please pick up the icon for it and regenerate sprites?

Test Plan:
Selected text, clicked on it.
Unselected text, clicked on it.

Reviewers: epriestley, chad

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3730
2012-10-17 18:15:29 -07:00
epriestley
b986f9f731 Restore a more surgical workflow/target check
Summary:
D3707 removed some overbroad rules for when we trigger workflows, but there is still one case we should check for -- an <a /> without workflow inside a <form /> with workflow. This occurs in, e.g., the "help" button in Remarkup.

If the node with workflow isn't a link, don't trigger workflow. This should allow the <a><img /></a> case to keep working properly.

Test Plan: Clicked "?" in remarkup bar.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3722
2012-10-17 08:28:37 -07:00
Bob Trahan
2ccf1a9e48 fix workflow to work with complicated content
Summary:
we were aggressively checking to make sure the event target was a workflow element. instead, just update the event target to the workflow element if necessary.

could probably just do this unconditionally as well.

Test Plan: D3705 works with this in place!

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3707
2012-10-15 15:40:44 -07:00
epriestley
b072e937b5 Modernize blog UI
Summary:
Cleans up some of the mess I made in D3694. Basically:

  - All blogs have an "internal" view with posts that uses mobile-friendly UIs, etc., so we don't have to do as much work with skins -- they just have to look pretty.
  - Blogs now have a separate "live" view that we use to handle domains / skins.
  - Simplified some views and use IDs in some URLs for consistency.
  - Delete a bunch of edge/blogger/multi-blog code that's now obsolete.

Test Plan: Will attach screenshots.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1373

Differential Revision: https://secure.phabricator.com/D3695
2012-10-15 14:50:12 -07:00
epriestley
9adfd11ed7 Minor, fix some missing dependencies for installs with notifications off. 2012-10-09 08:34:06 -07:00
epriestley
2bc9ac5e2e Show upload status, success and failures for drag-and-drop files in notifications
Summary: Currently, we do a poor job of communicating drag-and-drop upload errors. Show progress and success/failure in notifications.

Test Plan:
{F20671}

{F20672}

Uploaded files to maniphest attachments, remarkup text areas, Files tool.

Reviewers: btrahan, vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3655
2012-10-08 15:23:05 -07:00
epriestley
e00d3b72fe Improve the implementation of Notifications
Summary:
Currently, you can't change a notification that's already shown. There's no reason for this.

(I'm planning to put file upload progress/errors in notifications.)

  - Make `setContent()` and `setDuration()` immediately affect the notification.
  - When there are more than 5 notifications, queue them up instead of dropping them.
  - Allow arbitrarily many classes to be added/removed.
  - Make the examples in the UIExamples tests more rich.

Test Plan:
  - Verified normal notifications continue to function as expected.
  - Played with the UIExamples notifications:
    - Verified the "update every second" notification udpated every second.
    - Verified the permanent alert notification was yellow and requires a click to dismiss.
    - Verified the interactive notification responds correctly to "OK" / "Cancel".
    - Verified the "click every 2 seconds" notification doesn't vanish until not clicked for 2 seconds.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3653
2012-10-08 15:22:29 -07:00
epriestley
8573a1e142 Make the drop target for file attachments smaller
Summary:
Currently, in Maniphest, if you drag-and-drop a file it always attaches. Instead, I want you to have two options:

  - Drag and drop to the attachment area to attach; or
  - drag and drop to the Remarkup panel to upload + inline.

For the first step, make the input have a clear drop target instead of it being the entire panel.

Test Plan: Attached files in Create Task, task view, meta mta send test.

Reviewers: btrahan, vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3651
2012-10-08 13:26:41 -07:00
epriestley
741469d7df Minor, fix a JS issue with help link in Remarkup assist. 2012-10-06 16:29:55 -07:00
epriestley
643d8070f1 Implement improved remarkup assistance panel
Summary:
  - I made a "?" icon for help/reference.
  - The `<>` icon was slightly too wide so I carved it down to 14x14.
  - All the icons are in `/Phabriactor/remarkup_icon_sources.psd` if you want to tweak anything.
  - Tooltips don't look like the mock but I'll tackle those separately.
  - Removed strikethrough.
  - Removed tag/image/text size for now since they don't have reasonable JS implementations yet.
  - I think everything else is accurate to the mock.

Test Plan:
Normal state:

{F20621, size=full}

Hover + Click states:

{F20622, size=full}

Clicked state:

{F20620, size=full}

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T1848

Differential Revision: https://secure.phabricator.com/D3650
2012-10-06 16:21:25 -07:00
epriestley
8763d0ca93 Add assistance buttons to Remarkup text areas
Summary: Unblocker for D3547. Adds markup assist UI (buttons which generate remarkup for you -- not WYSIWYG) to Remarkup text areas.

Test Plan: See screenshot. Clicked the buttons a bunch with selected/unselcted text. Results seem broadly reasonable.

Reviewers: btrahan, vrana, teisenbe

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T337

Differential Revision: https://secure.phabricator.com/D3594
2012-10-01 18:46:34 -07:00
vrana
713225e296 Handle error in comment preview
Test Plan: Triggered error in comment preview (see D3589), verified that the error is displayed.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3586
2012-10-01 16:12:23 -07:00
epriestley
054ea7dc4a Simplify upvote/downvote implementation
Summary:
Use sigils to simplify the vote implementation and move most rendering to the server.

Use unicode glyphs in place of graphics.

Test Plan: {F19539}

Reviewers: pieter, starruler

Reviewed By: pieter

CC: aran

Maniphest Tasks: T1644

Differential Revision: https://secure.phabricator.com/D3518
2012-09-30 20:12:35 -07:00
epriestley
2b25bfe65d Revert "Autoscroll sidebar"
This reverts commit 3df0cfa641.

See D3473 for discussion. This causes some issues with scrolling on Mountain Lion.
2012-09-24 13:54:39 -07:00
vrana
65bbd24974 Enable selecting text in Differential shield and gap
Test Plan:
Selected text in shield.
Selected text in right side.

Reviewers: epriestley, btrahan

Reviewed By: btrahan

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3522
2012-09-20 15:20:47 -07:00
vrana
3df0cfa641 Autoscroll sidebar
Summary:
If the ToC in sidebar is long then the active file can be under the fold when we highlight it.

This also saves some CPU cycles because it highlights only after scrolling of the main window and not in the elements.

Test Plan:
Scrolled on a long diff.
Scrolled the ToC.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3473
2012-09-20 11:18:45 -07:00
vrana
8481f7ef09 Don't open symbols on double click
Summary:
My average double click speed is 10 ms but I tried to double click as I think normal people double clicks and it was around 200 ms.
I don't want to make the timeout much longer because it looks like that something doesn't work.

Test Plan:
Double clicked on symbol.
Clicked on symbol.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3509
2012-09-17 16:08:53 -07:00
epriestley
129bff016b Show tooltips in the application nav
Summary: Replaces the full names after D3413.

Test Plan: See screenshot.

Reviewers: vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3414
2012-08-30 18:59:08 -07:00
epriestley
5c006193dd Always collapse the left nav on desktops
Summary:
There is basically no reason for anyone to ever use the uncollapsed mode for more than the first 2 minutes of using the tool.

Delete all code related to collapse/expand.

(I'm going to add tooltips next.)

Also move the drag bar a few pixels to the right, so it does not overlap with the scrollbar on the "local" nav if there is one.

Test Plan: Viewed in desktop/tablet/phone modes.

Reviewers: vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3413
2012-08-30 18:58:59 -07:00
epriestley
c4ed47929c Make the top nav non-fixed-position
Summary:
See some discussion in D1673.

  - There's a concrete (if minor) problem with this in Firefox with wrapping search.
  - People complain about how we're stealing all their pixels.
  - There isn't much of a functional purpose to it since all the operations are fairly rare.
  - This addresses the aesthetic purpose of the fixed-position nav (not making the side nav ugly) by making the side nav scroll up 44px and then stop.

Test Plan: Scrolled in desktop, tablet modes.

Reviewers: vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3412
2012-08-30 18:58:51 -07:00
vrana
0f9f8b5f30 Tidy context displayed in gap
Summary:
We have some complaints on this feature:

- It's not clear that the displayed code is context from gap.
- It would be better if the context would be displayed with its real indentation.
- It's not clear how far the context is from the displayed code.
- Links revealing gap aren't on consistent place.

This solves all these problems and introduces new one:
It now seems that the reveal links works only with the left side.
Anyway, I think that this is better overall.

I don't want to put the context on a separate line to not waste space.

Test Plan: Displayed various contexts, revealed context.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, bh, jwatzman

Differential Revision: https://secure.phabricator.com/D3404
2012-08-29 17:25:17 -07:00
vrana
8d7f5eefae Properly change device after resizing left nav
Summary: Also allow left nav to hide.

Test Plan:
# Resize left nav.
# Shrink browser width to switch device.
# Increase the width again.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3383
2012-08-27 12:08:42 -07:00
Alan Huang
d9a133d716 Minor: Make the Matrix characters backwards as they should be. 2012-08-24 09:36:40 -07:00
vrana
f932906c0d Don't jump when I open a link on background
Summary:
When I open anchor on background then I don't want to jump on foreground.

NOTE: I am one problem away from deleting this altogether.

Test Plan: Ctrl clicked on lint error.

Reviewers: alanh

Reviewed By: alanh

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D3369
2012-08-23 00:13:04 -07:00
Alan Huang
f8e28fae01 Do something cooler
Summary: It seemed like a good idea at the time.

Test Plan: Uh huh.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3352
2012-08-22 08:20:23 -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
21651c6bc6 Fix highlighting anchors on hashchange
Summary: Listener sends the event to `try_anchor` in the first argument.

Test Plan: Displayed diff, clicked on `#comment-1`, went back in history, clicked on `#summary`.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3327
2012-08-20 18:03:48 -07:00
vrana
8901fdbd3e Avoid JS error in clicking on <a> without href
Test Plan: Removed name from typeahead.

Reviewers: alanh

Reviewed By: alanh

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D3343
2012-08-20 14:26:34 -07:00
epriestley
bee112c575 Fix various app nav issues
Summary:
  - Fix width, corresponding to wider sprites.
  - Sprite the "Audit" icon.
  - Mark the meta-application as device-ready.
  - Fix some collapse/expand bugs with the draggable local navs.
  - Add texture to local nav.
  - Darken the application nav to make it more cohesive with the main nav. I think this is an improvement?

Test Plan: See screenshots.

Reviewers: chad, btrahan

Reviewed By: btrahan

CC: aran, netfoxcity

Maniphest Tasks: T1569

Differential Revision: https://secure.phabricator.com/D3338
2012-08-20 14:13:15 -07:00
vrana
269a151f7a Jump back to original place on traversing history
Summary: If I click on some file in ToC and then go back in browser history then it currently does nothing.

Test Plan: Collapsed file, jumped on it in ToC, collapsed it again, jumped to inline comment in it, went back in history.

Reviewers: alanh

Reviewed By: alanh

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D3328
2012-08-17 16:51:15 -07:00
Bob Trahan
66b5acd275 Fix bug with mousein / mouseout event on comment preview at bottom of page
Summary: these comments aren't associated the same way with the actual changeset ui. ergo, don't update the reticle when mousing over these comments.

Test Plan: moused over comments at bottom - no more JS error. mouse over comments inline - reticle highlighting / de-highlighting still occurred as expected.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1657

Differential Revision: https://secure.phabricator.com/D3299
2012-08-15 15:07:56 -07:00
Alan Huang
f736ca047a Make countdowns (internally) embeddable
Summary:
You can now embed countdowns in Remarkup! Not sure what it's
useful for, but there you have it.

Also I may have made a hash of the markup code; I don't really know what
I'm doing.

Test Plan: Make a new countdown, put `{C###}` in a Differential comment.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1053

Differential Revision: https://secure.phabricator.com/D3290
2012-08-14 19:19:23 -07:00
Alan Huang
1855ed4bee Support symbol linking in Remarkup code blocks
Summary:
Trigger the crossreference behavior on code blocks. Limited to
Differential, where we know what the project is, but includes regular
comments, inline comments, and previews of both.

(Hopefully event handlers on deleted elements also get deleted, so we
don't leak memory? Also, caching is a problem, and I didn't find a way
to mark existing cache entries as stale, like
`DifferentialChangesetParser::CACHE_VERSION`...)

Test Plan:
Load Differential revision, make lots of comments, click on
things.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1602

Differential Revision: https://secure.phabricator.com/D3283
2012-08-14 14:03:26 -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
Pieter Hooimeijer
64472dd7b8 Adding Ponder-related files.
Summary:
Ponder is similar in spirit to the Wiki tool, but uses a Q&A
format and up/downvotes to signal user sentiment. Popular
questions are moved to the top of the feed on a 5-minute
cycle based on age (younger is better) and vote count (higher
is better).

Pre-apologies for noob diff.

Test Plan:
- `./bin/phd list` Should include `PonderHeatDaemon`; phd launch it
  if necessary.

- Navigate to /ponder/ ; observe sanity when adding questions,
  voting on them, and adding answers.

- Confirm that questions and answers are linkable using Q5 / Q5#A5 formatted object links.

- Confirm that searching for Ponder Questions works using built-in
  search.

Feedback on code / schema / whatever organization very welcome.

Reviewers: nh, vrana, epriestley

Reviewed By: epriestley

CC: gmarcotte, aran, Korvin, starruler

Differential Revision: https://secure.phabricator.com/D3136
2012-08-10 10:44:04 -07:00
Alan Huang
dbde4b9ff2 Fix issues with Differential file toggling
Summary:
See D2714#15.

 # Give anchors an `id` equal to their `name` so JX.$ can find them.
 # Listen for `click` s on `<a>` s instead of `hashchange` s to make
   toggling a bit more correct and consistent.
 # Add a placeholder menu item when the file is unloaded. A previous
   patch by @jungejason had left the item blank in that case.
 # In fixing (1) I found another exception when clicking on ToC links.
   Since those links are `differential-load`, they try to load the file
   before jumping to it. However, loading destroys the node it's looking
   for, so if you jump to an already-loaded file JX.$ complains at you.

Test Plan: Make a giant diff. Click on links and try toggling files.

Reviewers: epriestley, vrana

Reviewed By: vrana

CC: vrana, aran, Korvin

Maniphest Tasks: T370

Differential Revision: https://secure.phabricator.com/D3185
2012-08-09 17:53:05 -07:00
Alan Huang
bc56a01948 Support data-symbol-name in symbol linking
Summary: See D3226.

Test Plan: Browse Diffusion. Click on things.

Reviewers: epriestley

Reviewed By: epriestley

CC: nh, aran, Korvin

Maniphest Tasks: T1602

Differential Revision: https://secure.phabricator.com/D3227
2012-08-09 15:19:02 -07:00
Alan Huang
660119915c Link scoped symbols
Summary:
Elements with class na are now linked to symbol lookup. The
context is passed if we got one. See D3214.

Test Plan: Load Diffusion. Examine DOM and click on things.

Reviewers: epriestley

Reviewed By: epriestley

CC: nh, aran, Korvin

Maniphest Tasks: T1602

Differential Revision: https://secure.phabricator.com/D3215
2012-08-09 11:47:41 -07:00
vrana
75c647c932 Don't jump to symbol after selecting
Summary: Selecting text still triggers 'click' event.

Test Plan:
Selected symbol.
Clicked symbol.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3197
2012-08-08 12:53:29 -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
epriestley
d5a0352fd7 Make project membership edits use transactions and PHIDs and not be awful
Summary:
  - Split project profile editing apart from project membership editing.
  - Make project membership editing simpler and easier to use.
  - Drop role / owner stuff from the UI.

Test Plan: Added and removed project members. Edited project profile information.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D3184
2012-08-07 11:57:38 -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
vrana
e8401e6d4f Increase width of moved code tooltip
Summary: Looks weird with long paths.

Test Plan: Displayed diff with moved code.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3173
2012-08-07 10:50:15 -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
Alan Huang
8e5189b439 Add a Delete link to Differential inline comment previews
Summary:
This lets you delete inlines from the preview at the bottom of
the page, instead of hunting for them through the diffs.

There is not yet a keyboard shortcut.

The mechanism for updating the inlines in the diffs is kind of a hack
and I'm sure I'm special-casing way too much, but at least it works.

Test Plan:
Load revision with many diffs. Create inlines all over the
place. Delete them all. Mwahaha.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1433, T1431

Differential Revision: https://secure.phabricator.com/D3131
2012-08-02 12:24:23 -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
epriestley
bc46e953f7 Improve ordering of main typeahead results
Summary:
Always order applications first, then users, then other results (currently, there are no other results, of course).

(This is similar to the general ordering algorithm used in JX.Prefab but has enough current/future differences that I split it rather than trying to share them.)

Test Plan: Queried results, verified order.

Reviewers: vrana

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1569

Differential Revision: https://secure.phabricator.com/D3117
2012-08-01 12:36:33 -07:00
epriestley
c96fac1818 Allow pages to use new "flexible" nav
Summary:
This allows the nav to be laid out with divs instead of tables and for the navigation column to be made flexible. Design is non-final, this is just a step toward reactive menus that work on tablets/phones and an application menu.

I'm going to play around with flexible nav and document navigation and see if that goes anywhere.

Test Plan: Will attach screenshots.

Reviewers: btrahan, vrana, chad

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1569

Differential Revision: https://secure.phabricator.com/D3114
2012-08-01 12:31:33 -07:00
epriestley
3cf0921682 Remove placeholder
Summary: See discussion in D3103. We don't need this for now; if we do in the future we should probably use an alternate implementation.

Test Plan: Grepped for 'placeholder', viewed UI examples.

Reviewers: vrana

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1569

Differential Revision: https://secure.phabricator.com/D3115
2012-07-31 18:28:08 -07:00
epriestley
852ecc2102 Add a basic search typeahead
Summary:
This needs a bunch of refinement but pretty much works. Currently shows only users and applications. Plans:

  - Show actual search results too.
  - Clean up the datasource endpoint so it's less of a mess.
  - Make other typeaheads look more like this one.
  - Improve sorting.
  - Make object names hit the named objects as the first match.

Test Plan: Will attach screenshots.

Reviewers: btrahan, vrana, chad

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1569

Differential Revision: https://secure.phabricator.com/D3110
2012-07-31 17:58:21 -07:00
Alan Huang
b43e6f2a5f Make symbol linking more lenient.
Summary:
Sometimes a symbol has a nested <span> in it. Clicks on that
should count as clicks on the symbol. So keep looking for symbols among
the ancestors of the click target.

This is a silly method because I don't know if there's a more idiomatic
way to do it in Javelin.

Test Plan:
Open a Differential revision where part of a symbol is
highlighted. Click on the highlighted part. Symbol search opens.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Maniphest Tasks: T1577

Differential Revision: https://secure.phabricator.com/D3113
2012-07-31 17:01:57 -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
epriestley
3c7944d297 Switch to new menubar
Summary:
  - Looks better (can probably still use some tweaks), especially search.
  - Moves logout from weird footer location to main menu.
  - Reactive: on tablets and phones, the menu adjusts to remain useful.
  - Fixed position on desktops for future side nav changes.
  - Adds an icon header thing that's currently hard-coded but will be application-driven soon.

Test Plan: Used menu on desktop, tablet, phone, logged in / logged out, toggled darkconsole. Will add some screenshots.

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1569

Differential Revision: https://secure.phabricator.com/D3105
2012-07-30 16:09:14 -07:00
epriestley
998d43e828 Add a "toggle-class" behavior
Summary: The new menu stuff needs this but it was easy to pull out on its own.

Test Plan: Cliked UI example buttons.

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1569

Differential Revision: https://secure.phabricator.com/D3104
2012-07-30 16:08:42 -07:00
epriestley
c8afc741fa Add support for placeholders
Summary:
Support placeholder text for inputs. We currently don't use this because it requires JS and doesn't degrade (no JS means you have zero idea what the input is for if it isn't separately labeled) but there are some cases where intent is obvious from context (for example, the search input in the menu bar, which is fairly obvious on its own and will soon have a magnifying glass icon) and in such cases it's much prettier and saves a bunch of space over an explicit label. Add a behavior so we can add placeholders where they make sense.

This implementation is somewhat sanity-checked agianst the two jQuery placeholder implementations I was able to google:

https://github.com/danielstocks/jQuery-Placeholder/
https://github.com/mathiasbynens/jquery-placeholder

Since we don't currently have any uses cases, I haven't included support for making JS access to the `value` work, for password inputs, or for dynamically altering the placeholder.

Test Plan: Played around with the placeholder in the UI example in various browsers and couldn't break it.

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1569

Differential Revision: https://secure.phabricator.com/D3103
2012-07-30 16:08:10 -07:00
epriestley
fceabd42e8 Allow Fact app to draw charts
Summary: For any count fact, allow a chart to be drawn. INCREDIBLY POWERFUL DATA ANALYSIS PLATFORM.

Test Plan: Drew a chart of object counts. Drew the Maniphest burn chart.

Reviewers: vrana, btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1562

Differential Revision: https://secure.phabricator.com/D3099
2012-07-30 10:44:08 -07:00
epriestley
59949bf811 Add "device" JS/CSS for reactive stuff
Summary:
As we work through @chad's redesign, one thing I want to do is improve the tablet/mobile experience.

Add a "device" behavior which sets a "device-phone", "device-tablet" or "device-desktop" class on the root div. The behavior (device names, width triggers) is mostly based on Bootstrap.

Also adds a preview viewport=meta tag, which makes the iPhone not scale the page like crazy and is a desirable end state, but currently makes the app less usable since things get cut off.

Test Plan:
Added some classes like this:

	.device-desktop {
	  background: blue;
	}
	.device-tablet {
	  background: orange;
	}
	.device-phone {
	  background: yellow;
	}

...and loaded the site on a desktop, iPad and iPhone. Resized the window. Got the right background color in all cases.

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D3063
2012-07-25 11:51:27 -07:00
Bob Trahan
ae13d33859 Phame - introduce blogs
Summary:
blogs are collections of posts. a blog also has metadata like a name, description and "bloggers" that can edit the metadata of the blog and contribute posts.

changes include the post edit flow where bloggers can now select which blogs to publish to. also made various small tweaks throughout the UI to make things sensical and clean as the concept of blogs is introduced.

there's edges powering this stuff.  bloggers <=> blogs and posts <=> blogs in particular.

Test Plan:
made blogs, deleted blogs, tried to make blogs with no bloggers. all went well.
verified ui to publish only showed up for public posts, published posts to blogs, un-published posts to blogs, re-published posts to blogs, deleted posts and verified they disappeared from blogs.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1373

Differential Revision: https://secure.phabricator.com/D3003
2012-07-19 09:03:10 -07:00
epriestley
6edd29de43 Prevent Firebug from crashing in Firefox 13 / Window 7
Summary:
Simpler fix for D2572. Not entirely sure why Firebug is crashing Firefox. It appears to be callstack depth related, possibly? You can sort of reproduce this like this:

  >>> var f = function(n) { n && f(n - 1); }
  >>> f(10000); // Takes a few ms to run.
  >>> f(40000); // Takes a few ms to run.
  >>> f(50000); // Hangs Firefox.

If there are 2,000 files, we currently hit a stack depth of around 4,000 with the pass() rules, so it seems like we should be 10x short of exploding.

Anyway, this keeps us from increasing stack depth for menus that aren't currently open and stops Firebug from crashing.

Test Plan: Clicked 2000-diff revision in Firefox.

Reviewers: vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D2870
2012-06-26 18:22:53 -07:00
epriestley
5e184ee593 Improve debug support for notifications
Summary: Add a `notification.debug` setting that shows debug info in the browser. Also improve some logging/error handling stuff and fix a bug with host names.

Test Plan: {F13098}

Reviewers: jungejason, btrahan, vrana

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T944

Differential Revision: https://secure.phabricator.com/D2810
2012-06-20 13:20:47 -07:00
Jason Ge
0c088a695c Fix dropdown for file whose diff is not displayable
Summary: The current behavior is that, when the dropdown menu is clicked for a binary file, it navigates to the current revision page directly without showing the dropdown meu. The fix is to do nothing when there is no file displayed.

Test Plan:
- checked a diff with binary file
- checked a diff with normal files

Reviewers: vrana, epriestley

Reviewed By: epriestley

CC: epriestley, aran

Differential Revision: https://secure.phabricator.com/D2801
2012-06-19 18:28:28 -07:00
epriestley
76df7970ec Show notification text for non-reload notifications
Summary:
Show all notifications, but make the non-reload ones transient.

Depends on D2781, D2780

Test Plan: {F12986}

Reviewers: jungejason, vrana

Reviewed By: jungejason

CC: aran

Maniphest Tasks: T944

Differential Revision: https://secure.phabricator.com/D2782
2012-06-18 14:08:10 -07:00
epriestley
7a4ca85d67 Show only one "reload" popup, use 'alert' style, click to reload
Summary: Use the features from D2758.

Test Plan: Updated T1 with two browser windows pointing at it, verified reload appeared, only one reload, and it appeared with 'alert' style.

Reviewers: jungejason, vrana

Reviewed By: jungejason

CC: aran

Maniphest Tasks: T944

Differential Revision: https://secure.phabricator.com/D2781
2012-06-18 14:07:45 -07:00
epriestley
1053a50f67 Add multiple notifications and notification types
Summary:
  - Allow more than one notification to be shown.
  - Allow notifications to be customized with extra classes.

Test Plan: {F12776}

Reviewers: allenjohnashton, ddfisher, keebuhm, jungejason

Reviewed By: jungejason

CC: aran

Maniphest Tasks: T944

Differential Revision: https://secure.phabricator.com/D2758
2012-06-17 11:35:36 -07:00
epriestley
2d7705ea30 Apply AMAZING DESIGN SKILLS to notification menu
Summary:
I am a fancy designer!

{F12665} {F12666}

Test Plan: Opened/closed menu. Viewed with-notification-count and without-notification count states.

Reviewers: allenjohnashton, ddfisher, keebuhm

Reviewed By: ddfisher

CC: aran, chad, joe

Maniphest Tasks: T974

Differential Revision: https://secure.phabricator.com/D2735
2012-06-14 06:13:53 -07:00
epriestley
86040227b0 Improve Aphlict server
Summary:
  - Move to port 22280 by default.
  - Warn when running as non-root.
  - Allow subscription and publish/admin ports to be configured.
  - Allow server to drop root after binding to 843.
  - Allow log path to be configured.
  - Add /status/ admin URI which shows server status.
  - Return HTTP 400 Bad Request for other requests, instead of hanging.
  - Minor formatting cleanup.

Test Plan:
Ran without root:

  $ node aphlict_server.js

...got a good error message. Ran with --user:

  $ sudo node aphlict_server.js --user=epriestley

...verified server dropped permissions. Ran with --port / --admin. Hit /status/ with GET, got status. Hit other URLs with GET, got 400.

Reviewers: allenjohnashton, ddfisher, keebuhm

Reviewed By: ddfisher

CC: aran

Differential Revision: https://secure.phabricator.com/D2737
2012-06-14 06:12:54 -07:00
David Fisher
e519581594 "Please Refresh" Notifications
Summary:
Based off D2704. Adds humane.js and a bit of plumbing. Currently does
not seem to load notification.css (which causes notifications not to display)
for reasons entirely opaque to me.

Test Plan:
tried locally. currently works except for the actual display due to
css loading difficulties

Reviewers: epriestley

Reviewed By: epriestley

CC: allenjohnashton, keebuhm, aran, Korvin

Differential Revision: https://secure.phabricator.com/D2705
2012-06-13 17:28:58 -07:00
Alan Huang
d5e61f5250 Let the viewer collapse/expand individual files in a diff.
Summary:
Added a dropdown menu button and the keyboard shortcut 'h' to the
web diff view. These hide or show the annotated code display.

Test Plan:
Viewed an example diff that changed a large number of source files
and played around with keyboard shortcuts. Everything seemed to
work as expected.

Reviewers: nh, epriestley

Reviewed By: epriestley

CC: aran, epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D2714
2012-06-13 16:52:42 -07:00
epriestley
d119b051e8 Add a basic notification UI element
Summary: This is //extremely// basic but dead simple and should cover us for v1, I think. Let me know what features you need.

Test Plan: Used UI example page.

Reviewers: allenjohnashton, ddfisher, keebuhm

Reviewed By: ddfisher

CC: aran, ender

Maniphest Tasks: T944

Differential Revision: https://secure.phabricator.com/D2732
2012-06-13 15:00:24 -07:00
vrana
0cdc4e008d Use textContent instead of innerHTML for linking symbols
Summary: Go to https://secure.phabricator.com/D2646#59cc9d49 and click on `array_mergev` to repro.

Test Plan: Checked if the property exists in DOM inspector.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2742
2012-06-13 14:45:45 -07:00
David Fisher
8b15d1928d Use JX.DOM everywhere in behavior-dropdown
Summary: see title

Test Plan: Tested locally. Noticed same number replacement and bold/unbold text as before.

Reviewers: epriestley

Reviewed By: epriestley

CC: allenjohnashton, keebuhm, aran, Korvin, David

Differential Revision: https://secure.phabricator.com/D2720
2012-06-12 05:45:44 -07:00
David Fisher
655bec9eeb Fix strange header appearance bug
Summary:
Text in the header changes appearance shortly after page loads. This
is due - for some reason - to adding the flash object. Making the width and
height of the flash object 0 solves this.

Test Plan: viewed locally, problem gone

Reviewers: epriestley

Reviewed By: epriestley

CC: allenjohnashton, keebuhm, aran, Korvin

Differential Revision: https://secure.phabricator.com/D2719
2012-06-12 05:35:10 -07:00
David Fisher
f8f195b329 Make Notifications Realtime
Summary:
Adds the node.js Aphlict server, the flash Aphlict client, and some
supporting javascript. Built on top of - and requires - D2703 (which is still
in progress).  Will likely work with no modification on top of the final
version, though.

The node server is currently run with

   sudo node support/aphlict/server/aphlict_server.js

Test Plan: tested locally

Reviewers: epriestley

Reviewed By: epriestley

CC: allenjohnashton, keebuhm, aran, Korvin

Differential Revision: https://secure.phabricator.com/D2704
2012-06-11 17:51:12 -07:00
David Fisher
2bade93b76 Notification dropdown fixes
Summary: dropdown now displays properly and without flicker

Test Plan: tested locally

Reviewers: epriestley

Reviewed By: epriestley

CC: allenjohnashton, keebuhm, aran, Korvin

Differential Revision: https://secure.phabricator.com/D2708
2012-06-11 17:17:48 -07:00
John-Ashton Allen
a11deec4d4 Adds the UI dropdown panel
Summary:
Add a dropdown to display notificaitons.  Right now
there is nothing real time about it, but we do update the panel
when the user clicks.  This panel is only displayed if the
install has notifications enabled and you have them enabled in
your preferences (not using them by default).

Test Plan: Turn off notifications for user1, left them on for user2.  Did things from user1 and from user2 on task both were cc'd on.  user2 recieved all notifications, user1 recieved nothing.  Made new user, made sure everything was switched off by default.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: keebuhm, ddfisher, aran, Korvin

Differential Revision: https://secure.phabricator.com/D2703
2012-06-11 09:42:55 -07:00
vrana
9c2b67e2dc Add button to reveal all files in Differential
Summary: D2216 tried to ask the user, this one is explicit.

Test Plan: Click the button

Reviewers: epriestley, lucian

Reviewed By: epriestley

CC: aran, Koolvin

Differential Revision: https://secure.phabricator.com/D2600
2012-05-30 10:44:37 -07:00
vrana
648c8aa499 Toggle DarkConsole request log by keyboard shortcut
Test Plan:
`
`

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D2583
2012-05-25 22:06:04 -07:00
Bob Trahan
f5e842ebd9 dark console - introduce "request log" section
Summary: this section gets updated for each and every request. clicking a given entry updates the larger dark-console area to have the information from that request

Test Plan: clicked around in maniphest and observed request log populating correctly. clicked a few entries in request log and saw it updated properly. clicked a different tab in the dark-console and it worked. clicked a different request log entry and it opened the dark console to the proper request on the proper tab.

Reviewers: epriestley, vrana

Reviewed By: epriestley

CC: aran, Koolvin

Maniphest Tasks: T1136

Differential Revision: https://secure.phabricator.com/D2574
2012-05-25 10:14:17 -07:00
vrana
5a1d89227b Use subtler highlighting for copied and moved code
Summary:
The highlighting is distracting according to Nick Shrock and others.
Real designer, Lee Byron, helped me with this.

It also gives us unagressive target for jumping to the source line in future.

Another feature I will probably implement is highlighting also the source of copies/moves.
I will use the right side of the left column for it.

Test Plan:
Hover copied notifier.
Hover coverage notifier.

I've also checked that this doesn't break our super-flaky old/new code JavaScript detector.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Koolvin, leebyron, schrockn

Differential Revision: https://secure.phabricator.com/D2443
2012-05-10 10:25:24 -07:00
epriestley
b98847d2b1 Show "show more..." link in "Local Commits" view in Differential
Summary: Javascript! Depends on D2437 to do anything useful.

Test Plan: Clicked "show more", saw more.

Reviewers: csilvers, btrahan

Reviewed By: csilvers

CC: aran

Maniphest Tasks: T1189

Differential Revision: https://secure.phabricator.com/D2438
2012-05-09 15:56:37 -07:00
epriestley
b80ea9e0e8 Revert cd63d9b2ce / D2403, see diff. This broke inline comments by making them not span enough columns. 2012-05-07 06:01:56 -07:00
vrana
cd63d9b2ce Use subtler highlighting for copied and moved code
Summary:
The highlighting is distracting according to Nick Shrock and others.
Real designer, Lee Byron, helped me with this.

It also gives us unagressive target for jumping to the source line in future.

Another feature I will probably implement is highlighting also the source of copies/moves.
I will use the right side of the left column for it.

Test Plan:
Hover copied notifier.
Hover coverage notifier.

I've also checked that this doesn't break our super-flaky old/new code JavaScript detector.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Koolvin, leebyron, schrockn

Differential Revision: https://secure.phabricator.com/D2403
2012-05-04 21:56:24 -07:00
vrana
826e5405b6 Open files in very large diffs inline
Summary: This allows writing inline comments and reduces different behavior between normal and very large diffs.

Test Plan:
Verify that normal diff works.
Verify that very large diff works.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Koolvin

Differential Revision: https://secure.phabricator.com/D2361
2012-05-02 17:51:35 -07:00
Nick Harper
6039ca6fb5 Create option for differential custom fields to display warning on accept
Summary:
This adds support to differential fields to display warnings before a revision
gets accepted. Since lint and unit are differential fields, the code for their
warnings was moved into their respective field specification classes, so there
is only one code path for warnings (lint, unit, or custom).

Test Plan:
Select 'Accept' on a revision with lint/unit warnings and see messages appear
like they used to. Change it back to 'Comment' and they go away. Repeat with
a revision without lint/unit warnings and see no warnings appear. Checked
darkconsole to see no errors due to this.

Reviewers: jungejason, epriestley, vrana

Reviewed By: epriestley

CC: aran, Koolvin

Differential Revision: https://secure.phabricator.com/D2363
2012-05-02 14:30:21 -07:00
epriestley
f04d8ab1a7 Further improve unit/lint rendering
Summary:
I think this improves things, let me know if you have feedback.

Also addresses T840.

Test Plan: See screenshots...

Reviewers: vrana, btrahan, jungejason

Reviewed By: vrana

CC: aran, zeeg

Maniphest Tasks: T840

Differential Revision: https://secure.phabricator.com/D2357
2012-05-01 10:15:56 -07:00
vrana
4cc61687aa Hide lint and unit error details
Summary:
Before: {F10754}

After: {F10753}

Test Plan:
View revision with lint warnings and unit errors.
Click on Details.
Click on Details.
Click on Details.
Click on Details.

Reviewers: asukhachev, epriestley

Reviewed By: epriestley

CC: aran, Koolvin

Differential Revision: https://secure.phabricator.com/D2351
2012-04-30 16:50:36 -07:00
Jason Ge
6a9ef778fc Add "jump to table of content" keyboard shortcut
Summary:
Many times when I'm reading a big diff, I want to go to the
TOC. Add it.

Test Plan:
can navigate with 't'. It also shows up in '?'

Revert Plan:

Reviewers: epriestley, vrana

Reviewed By: epriestley

CC: nh, aran, Koolvin

Differential Revision: https://secure.phabricator.com/D2335
2012-04-28 18:05:08 -07:00
vrana
0732f2f9dd Hide selection to provide a visual cue about clipboard JS magic in Differential
Summary: Inspired by D2242.

Test Plan:
Select text in left pane.
Select text in right pane.
Select all.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Koolvin

Differential Revision: https://secure.phabricator.com/D2249
2012-04-24 18:53:48 -07:00
vrana
0141bb8ee4 Allow/fix sending forms to new tab or window
Test Plan:
Ctrl+click on Show Diff in Chrome - button is not grayed-out, new tab is opened.
Click on it - button is grayed out.
Repeat in Firefox.

Reviewers: epriestley, tuomaspelkonen

Reviewed By: epriestley

CC: aran, Koolvin

Maniphest Tasks: T1137

Differential Revision: https://secure.phabricator.com/D2278
2012-04-19 09:49:45 -07:00
vrana
1772410a2b Allow opening editor from DarkConsole error log
Test Plan:
Click on "passing a null index to idx()" in DarkConsole.
Click on entry in stack trace.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Koolvin

Differential Revision: https://secure.phabricator.com/D2275
2012-04-18 13:57:31 -07:00
vrana
3c22bebc9b Allow disabling JX.Workflow with keyboard modifier
Summary:
Ctrl+click opens the link to a new tab in most browsers.
Shift+click to a new window.
Alt+click or Meta+click downloads the target.

This diff respects these conventions by disabling JX.Workflow for these modifiers.

Test Plan:
Click Flag Task - inline dialog.
Ctrl+click Flag Task - new tab with standalone dialog.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Koolvin

Differential Revision: https://secure.phabricator.com/D2276
2012-04-18 13:47:47 -07:00
vrana
c3635e4464 Hide oncopy <pre> in Firefox
Test Plan:
Comment `JX.DOM.remove(pre)` to better see the problem in old code.
Apply this diff and verify that the pre is not shown.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran

Differential Revision: https://secure.phabricator.com/D2245
2012-04-16 15:03:15 -07:00
Bob Trahan
6be9f6f3a8 Make Maniphest Transaction preview tokenizer aware
Summary:
...pretty sure the JS is too hack-tastic but it works...! :D

also fixed a small error from assert_instances_of change where a null value is all errors and what have you

Test Plan: played around with tasks in firefox and safari. made cc, owner, and project changes, as well as priority, etc.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran

Maniphest Tasks: T1074

Differential Revision: https://secure.phabricator.com/D2234
2012-04-14 07:05:58 -07:00
Bob Trahan
51418900f7 Phame V1 - Phabricator blogging software
Summary:
'cuz we need to be phamous!

V1 feature set

- posts
-- standard thing you'd expect - a title and a remarkup-powered body and...
-- "phame" title - a short string that can be used to reference the story. this gets auto-updated when you mess with the title.
-- configuration - for now, do you want Facebook, Disqus or no comments? this is a per-post thing but feeds from an instance-wide configuration

Please do toss out any must have features or changes.

Test Plan: played around with this bad boy like whoa

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, vrana

Maniphest Tasks: T1111

Differential Revision: https://secure.phabricator.com/D2202
2012-04-12 13:09:04 -07:00
vrana
3d6b8bff34 Fix reticle with edit inline comment
Test Plan:
- Hover left comment on diff of diff.
- Hover right comment on diff of diff.
- Hover inline comment preview.
- Hover inline comment edit.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran

Maniphest Tasks: T1076

Differential Revision: https://secure.phabricator.com/D2213
2012-04-12 11:42:50 -07:00
vrana
62a172af90 Fix reticle
Summary:
Now I understand that [[ https://secure.phabricator.com/diffusion/P/browse/master/webroot/rsrc/js/application/differential/behavior-edit-inline-comments.js;32f12d1f8fb7aeca$174-176 | behavior-edit-inline-comments.js:174-176 ]] and [[ https://secure.phabricator.com/diffusion/P/browse/master/src/applications/differential/controller/changesetview/DifferentialChangesetViewController.php;32f12d1f8fb7aeca$72-99 | DifferentialChangesetViewController.php:72-99 ]] need to stay in sync:

- 1 - isOnRight equals isNewFile
- 1/-1 - left is new, right is missing
- 1/2 - both are new

Test Plan: Hover inline comment.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran

Maniphest Tasks: T1076

Differential Revision: https://secure.phabricator.com/D2179
2012-04-09 22:09:02 -07:00
vrana
a662b09e73 Fix reticle with inline comments editor
Test Plan: Hover textarea in inline comment editor

Reviewers: epriestley

Reviewed By: epriestley

CC: aran

Differential Revision: https://secure.phabricator.com/D2152
2012-04-08 21:35:47 -07:00
epriestley
06367c4801 Improve insert behavior for drag-and-drop and paste uploads
Summary: In Safari, Firefox and Chrome, respect cursor position and selection ranges.

Test Plan: Dragged-and-dropped files into the middle of text, end of text, and a selected text range in Safari, Firefox and Chrome. Copy/pasted files into similar cases in Chrome. Got expected, normal behavior in all cases.

Reviewers: btrahan, vrana, jungejason

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1016

Differential Revision: https://secure.phabricator.com/D2155
2012-04-08 15:05:40 -07:00
epriestley
d4839f402c Minor, test fix for D2140? I think this fixes the issue in D2140, pushing to verify...
Auditors: 20after4, btrahan
2012-04-07 12:59:06 -07:00
epriestley
869f24bf33 Fix reticle for diff-of-diffs
Summary:
The older logic was incorrect:

  - It chose `change.left` for `data.on_right` being true.
  - 'O' and 'N' mean 'old' and 'new', not 'left' and 'right'. In diff-of-diffs, both sides are 'N'.

So, select the changeset ID correctly (pick the right side one for on_right), and select the new file prefix correctly (N for new, O for old).

Test Plan: Waved my mouse over some inline comments in a diff-of-diffs, got reasonable-looking reticles.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1076

Differential Revision: https://secure.phabricator.com/D2138
2012-04-07 10:39:41 -07:00
Bob Trahan
cc586b0afa For discussion -- Stripe integration
Summary:
various stripe stuff, including

- external stripe library
- payment form
- test controller to play with payment form, sample business logic

My main questions / discussion topics are...

- is the stripe PHP library too big? (ie should I write something more simple just for phabricator?)
-- if its cool, what is the best way to include the client? (ie should I make it a submodule rather than the flat copy here?)
- is the JS I wrote (too) ridiculous?
-- particularly unhappy with the error message stuff being in JS *but* it seemed the best choice given the most juicy error messages come from the stripe JS such that the overall code complexity is lowest this way.
- how should the stripe JS be included?
-- flat copy like I did here?
-- some sort of external?
-- can we just load it off stripe servers at request time? (I like that from the "if stripe is down, stripe is down" perspective)
- wasn't sure if the date control was too silly and should just be baked into the form?
-- for some reason I feel like its good to be prepared to walk away from Stripe / switch providers here, though I think this is on the wrong side of pragmatic

Test Plan: - played around with sample client form

Reviewers: epriestley

Reviewed By: epriestley

CC: aran

Differential Revision: https://secure.phabricator.com/D2096
2012-04-04 16:09:29 -07:00
epriestley
01767c482d Add a datepicker control
Summary: I looooove JS! It makes me giddy with glee!

Test Plan: Picked dates. See screenshots.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D2086
2012-04-04 12:14:10 -07:00
vrana
6f855c8b52 Don't show current revision in dependencies
Test Plan: Edit Dependencies, don't see current revision.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran

Differential Revision: https://secure.phabricator.com/D2098
2012-04-03 18:39:34 -07:00
epriestley
e7853e4801 Allow tasks to be subprioritized by drag-and-drop
Summary:
Like the title says, similar to Facebook Tasks.

Not sure how I really feel about this, but I guess it's kind of OK? I never used
this feature in Facebook Tasks but I think some people like it.

The drag-and-drop to repri across priorities feels okayish.

Because subpriority is a double and we just split the difference when
reprioritizing, you lose ~a bit of precision every time you repri two tasks
against each other and so you can break it by swapping the priorities of two
tasks ~50 times. This case is pretty silly and pathological. We can add some
code to deal with this at some point if necessary.

I think this also fixes the whacky task layout widths once and for all.

(There are a couple of minor UI glitches like headers not vanishing and header
counts not updating that I'm not fixing because I am lazy.)

Test Plan: Dragged and dropped tasks around.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, epriestley, mgummelt

Maniphest Tasks: T859

Differential Revision: https://secure.phabricator.com/D1731
2012-04-02 12:12:04 -07:00
epriestley
fcec4c368c Allow users to add flags via Herald rules
Summary: Add "Mark with flag" rules to Herald.

Test Plan: Created / edited a "Mark with flag" rule. Parsed revisions / commits, got flags added.

Reviewers: btrahan, jungejason

Reviewed By: btrahan

CC: aran, epriestley, vrana

Maniphest Tasks: T1041

Differential Revision: https://secure.phabricator.com/D2060
2012-03-30 13:51:54 -07:00
epriestley
698ec68327 General Herald refactoring pass
Summary:
**Who can delete global rules?**: I discussed this with @jungejason. The current behavior is that the rule author or any administrator can delete a global rule, but this
isn't consistent with who can edit a rule (anyone) and doesn't really make much sense (it's an artifact of the global/personal split). I proposed that anyone can delete a
rule but we don't actually delete them, and log the deletion. However, when it came time to actually write the code for this I backed off a bit and continued actually
deleting the rules -- I think this does a reasonable job of balancing accountability with complexity. So the new impelmentation is:

  - Personal rules can be deleted only by their owners.
  - Global rules can be deleted by any user.
  - All deletes are logged.
  - Logs are more detailed.
  - All logged actions can be viewed in aggregate.

**Minor Cleanup**

  - Merged `HomeController` and `AllController`.
  - Moved most queries to Query classes.
  - Use AphrontFormSelectControl::renderSelectTag() where appropriate (this is a fairly recent addition).
  - Use an AphrontErrorView to render the dry run notice (this didn't exist when I ported).
  - Reenable some transaction code (this works again now).
  - Removed the ability for admins to change rule authors (this was a little buggy, messy, and doesn't make tons of sense after the personal/global rule split).
  - Rules which depend on other rules now display the right options (all global rules, all your personal rules for personal rules).
  - Fix a bug in AphrontTableView where the "no data" cell would be rendered too wide if some columns are not visible.
  - Allow selectFilter() in AphrontNavFilterView to be called without a 'default' argument.

Test Plan:
  - Browsed, created, edited, deleted personal and gules.
  - Verified generated logs.
  - Did some dry runs.
  - Verified transcript list and transcript details.
  - Created/edited all/any rules; created/edited once/every time rules.
  - Filtered admin views by users.

Reviewers: jungejason, btrahan

Reviewed By: btrahan

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D2040
2012-03-30 10:49:55 -07:00
epriestley
29d8fc04e5 Improve inline comment previews
Summary:
  - When an inline comment preview corresponds to an inline comment on the page, link to it. Just punt in the tough case where the inline is on some other page.
  - In "haunted" mode, "z" now toggles through three modes: normal, comment area only, and comment + previews.

Test Plan:
  - Viewed visible and not-visible inline comment previews, clicked "View" links.
  - Tapped "z" a bunch to toggle haunt modes.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, epriestley

Maniphest Tasks: T517, T214

Differential Revision: https://secure.phabricator.com/D2041
2012-03-28 10:11:41 -07:00
epriestley
c2f50e258a Render pretty graphical traces for commit branches, etc
Summary: I AM A WIZARD

Test Plan: BEHOLD

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, epriestley

Maniphest Tasks: T961

Differential Revision: https://secure.phabricator.com/D2007
2012-03-23 17:11:15 -07:00
epriestley
6c412961eb Add "Change Priority", "Open / Close", "Comment" and "Assign" actions to Maniphest batch editor
Summary: I think these are all the actions which make any sense.

Test Plan:
  - Performed and verified each action through the batch editor.
  - Performed a large batch edit which applied each action type multiple times and verified the aggregate behavior was correct.

Reviewers: btrahan, cpiro

Reviewed By: btrahan

CC: aran, epriestley

Maniphest Tasks: T441

Differential Revision: https://secure.phabricator.com/D1971
2012-03-21 14:01:04 -07:00
epriestley
1227c8d5da Add "View Options" dropdown to Differential / Audit
Summary:
Depends on D1921. Depends on D1899.

Add the "View Options" dropdown menu to Diffusion, with options like "show standalone", "show raw file", "show all", etc.

Test Plan: Viewed commits in Differential and Diffusion.

Reviewers: davidreuss, nh, btrahan

Reviewed By: btrahan

CC: aran, epriestley

Maniphest Tasks: T904

Differential Revision: https://secure.phabricator.com/D1932
2012-03-19 19:57:41 -07:00
epriestley
1fc4dea55e Increase the click target area for the object selector
Summary:
Make clicking the link also select the object (this operation is very common). Add an arrow to the left to view the object (this operation is very rare). Increase link target area to the entire cell.

Also simplify some handlers.

Test Plan: Clicked things with wild abandon. Behavior seemed unchanged.

Reviewers: cpiro, btrahan

Reviewed By: cpiro

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1962
2012-03-19 19:20:49 -07:00
epriestley
49cc3d9f0d Simplify and improve the "burnup" chart
Summary:
  - We incorrectly count resolution changes and other noise as opens / closes.
  - Show one graph: open bugs over time (red line minus green line). This and its derivative are the values you actually care about. It is difficult to see the derivative with both lines, but easy with one line.

Test Plan: Looked at burnup chart. Saw charty things. Verified resolution changes no longer make the line move.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, epriestley

Maniphest Tasks: T923, T982

Differential Revision: https://secure.phabricator.com/D1945
2012-03-19 19:19:28 -07:00
epriestley
074ea25eab Fix a missing @requires
Summary: Split from D1921. Lint complained.

Test Plan: Lint doesn't complain.

Reviewers: nh, vrana, btrahan

Reviewed By: btrahan

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1923
2012-03-19 19:17:40 -07:00
epriestley
81fc0b8843 Add keyboard navigation to Diffusion / Audit
Summary: This diff is really complicated, only a master programmer like myself could have accomplished it.

Test Plan: derrrrrp

Reviewers: davidreuss, nh, btrahan, jungejason

Reviewed By: jungejason

CC: aran, epriestley

Maniphest Tasks: T904

Differential Revision: https://secure.phabricator.com/D1936
2012-03-18 19:44:28 -07:00
epriestley
57fd4bc68b Kind-of-terrible (?) oncopy handler
Summary: Works in Safari, Firefox, Chrome.

Test Plan: Copied some text, threw up a little in my mouth.

Reviewers: aran, tuomaspelkonen, tomo, rstout, btrahan

Reviewed By: aran

CC: aran, epriestley, ddfisher

Maniphest Tasks: T145, T995

Differential Revision: https://secure.phabricator.com/D244
2012-03-15 19:04:59 -07:00
vrana
4fa9798c4a Allow selecting text when creating inline comment
Summary:
It is currently not possible to select source code covered by reticle when creating comment.
This diff hides reticle on mouseout from reply area.

Test Plan:
Hover inline comment, verify that reticle is displayed.
Reply, verify that reticle is displayed when mouseover reply, hidden otherwise.
Repeat for create.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1851
2012-03-15 11:02:25 -07:00
David Fisher
1c9a8ccb7c Added Search Box Preferences
Summary:
Resolves T989
- users can now disable the '/' keyboard shortcut which focuses the
  search box
- users can now disable the jump nav functionality of the search box

Test Plan:
- verified that the '/' keyboard shortcut works with preference enabled
  or unset
- verified that '/' no longer has any effect and disappears from
  keyboard shortcuts help overlay with preference disabled
- verified that search boxes have jump nav capabilities with jump nav
  functionality preference unset or enabled
- verified that search boxes do not jump with jump nav preference
  disabled
- verified that the jump nav still works as a jump nav with jump nav
  preference disabled

Reviewers: epriestley

Reviewed By: epriestley

CC: simpkins, aran, epriestley, vrana

Maniphest Tasks: T989

Differential Revision: https://secure.phabricator.com/D1902
2012-03-14 20:47:41 -07:00
vrana
0553b32b37 Always redirect to My Files after upload
Summary:
I've found it quite confusing that uploading a single image displays the image itself but uploading more images displays My Files.
I've also got a user report about it because most users don't know that they can drop the image directly to the comment textarea and they are interested mainly in the ID of the uploaded file.

Test Plan: Upload a file.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1891
2012-03-14 09:57:35 -07:00
epriestley
b537d1ec01 Show a tooltip about code coverage
Summary:
  - Show a tip in the margin about what coverage colors mean.
  - Highlight the line when mousing over coverage.
  - Randomly change the colors to different colors.
  - Fix a bug with "show more" that I introduced with the other coverage diff (oops!)

Test Plan: Moused over coverage things.

Reviewers: tuomaspelkonen, btrahan

Reviewed By: tuomaspelkonen

CC: aran, epriestley

Maniphest Tasks: T965

Differential Revision: https://secure.phabricator.com/D1874
2012-03-12 20:04:12 -07:00
epriestley
ac09345083 Add a basic tooltip UI element
Summary: There are a few things we can improve with tooltips.

Test Plan: Moused over all the stuff on the test page.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, epriestley

Maniphest Tasks: T965

Differential Revision: https://secure.phabricator.com/D1870
2012-03-12 18:21:02 -07:00
epriestley
85bdcbdd43 Show coverage percentages in table of contents
Summary:
Rough cut -- this needs style / color / tooltips, etc. Show raw coverage and "modified coverage" (coverage on lines you touched) in the table of contents.

https://secure.phabricator.com/file/data/id3apce5p5gevkee6tg2/PHID-FILE-kxcxlbsej454t4xiht2o/Screen_Shot_2012-03-12_at_3.30.30_PM.png

Test Plan: See screenshot above.

Reviewers: tuomaspelkonen, btrahan, zeeg

Reviewed By: tuomaspelkonen

CC: aran, epriestley

Maniphest Tasks: T965

Differential Revision: https://secure.phabricator.com/D1864
2012-03-12 17:06:55 -07:00
epriestley
43bd76336c Use Javelin placeholders and new sorting rules broadly; consolidate tokenizer construction code
Summary:
  - We have three nearly-identical blocks of Tokenizer construction code; consolidate them into Prefab.
  - Add placeholder support.
  - Augment server-side stuff to specify placeholder text.

Test Plan: Verified behavior of Differential edit tokenizers, Differential comment tokenizers, Maniphest edit tokenizers, Maniphest comment tokenizers, Maniphest filter tokenizers, Differential filter tokenizers, Owners filter tokenizers, Owners edit tokenizers, Herald edit tokenizers, Audit filter tokenizers.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, epriestley

Maniphest Tasks: T772, T946

Differential Revision: https://secure.phabricator.com/D1844
2012-03-09 15:46:39 -08:00
epriestley
492d047a49 Improve tokenizer sorting rules
Summary:
Currently, we sort all results alphabetically. This isn't ideal. Instead, sort them like this:

  - If the viewing user appears in the list, always sort them first. This is common in a lot of contexts and some "Ben Evans" guy is sorting first on secure.phabricator.com and causing me no end of aggravation.
  - If the tokens match a "priority" component (e.g., username), sort that before results which do not have a "priority" match.
  - Within a group (self, priority, everything else) sort tokens alphabetically.

NOTE: I need to go add setUser() to all the tokenizers to make the "self" rule work, but that's trivial so I figured I'd get this out first.

Test Plan:
https://secure.phabricator.com/file/data/4s2a72l5hhyyqqkq4bnd/PHID-FILE-x2r6ubk7s7dz54kxmtwx/Screen_Shot_2012-03-07_at_9.18.03_AM.png

Previously, "aaaaaepriestley" (first alphabetic match) would sort before "epriestley" (the viewing user). Now, "epriestley" sorts first because that is the viewer.

https://secure.phabricator.com/file/data/rmnxgnafz42f23fsjwui/PHID-FILE-yrnn55jl3ysbntldq3af/Screen_Shot_2012-03-07_at_9.18.09_AM.png

Previously, "aaaagopher" (first alphabetic match) would sort before "banana" (the "priority" match). Now, "banana" sorts first because it priority matches on username.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, epriestley

Maniphest Tasks: T946

Differential Revision: https://secure.phabricator.com/D1807
2012-03-07 13:17:44 -08:00
epriestley
f8431bbfee Make Aphlict client somewhat more approachable
Summary: Provide a reasonable JS API for the Aphlict client. Provide an example behavior to invoke it.

Test Plan:
Ran "aphlict_server.js" with:

  $ sudo node aphlict_server.js

Loaded /aphlict/. Opened console. Got "hello" from the server every second.

Got reasonable errors with the server not present ("Security exception", but this is because it can't connect to port 843 to access the policy server).

Reviewers: ddfisher, keebuhm, allenjohnashton, btrahan

Reviewed By: btrahan

CC: aran, epriestley

Maniphest Tasks: T944

Differential Revision: https://secure.phabricator.com/D1800
2012-03-06 20:14:03 -08:00
vrana
63b96c9835 Build valid HTML in Edit Maniphest Tasks
Test Plan: Click on Edit Maniphest Tasks.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1802
2012-03-06 17:55:09 -08:00
David Fisher
639ed0faa6 Change All Search Boxes into Jump Navs
Summary:
- all search boxes are now jump navs (old functionality retained if none
  of the jump nav patterns match)
- added global keyboard shortcut '/' to focus the search box in the upper
  right

Test Plan:
- pressed '/' and noticed the search box gains keyboard focus
- triggered jump nav functionality from search box and saw it worked
- did a search which did not match a jump nav pattern and saw it worked
  (and searched in the selected context)
NOTE: The search box on the /search/ page is also changed to have jump
nav functionality. Old functionality is not impared. Still, this may not
be desirable.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1794
2012-03-05 19:52:26 -08:00
epriestley
e9dedb0c88 Iterate on Maniphest reports
Summary:
  - These are still slow, awkward and hideous -- but slightly better than
before.
  - Allow "open" reports to be sorted.
  - Add a "burn" chart/table for assessing project volatility.
  - Add navigation.

Test Plan: Looked at reports.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, epriestley

Maniphest Tasks: T923

Differential Revision: https://secure.phabricator.com/D1737
2012-03-01 14:19:11 -08:00
vrana
4a4752d8c2 Don't provide Undo for empty text in Differential inline comment
Test Plan:
Edit inline comment.
Clear its text.
Hit Cancel.
Try to find Undo link on the usual place with no success.
Repeat for same text.
Repeat for different text, this time with success.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1739
2012-02-29 23:44:42 -08:00
epriestley
21f0aba701 Use an inline dialog element for inline comments in Differential
Summary:
The current approach of using a modal overlay dialog to create/edit inline
comments is pretty silly. Use an inline textarea instead.

This element isn't perfect and we have some mild modalness issues, but I think
it's better than the silly thing we've got going on right now. We can keep
poking it as people break it.

Test Plan:
  - Created comments; submitted and undid them in empty and nonempty states.
Used undo for nonempty states + cancel.
  - Edited comments; saved and canceled them. Used undo for changed state.
  - Replied to comments; yada yada as above.
  - Deleted comments.
  - Did various modal trickery where I clicked "Reply" on something else with a
dialog already up, this very mildly glitches but I think it's not a big issue.

Reviewers: vrana, btrahan, Makinde, nh

Reviewed By: vrana

CC: aran, epriestley

Maniphest Tasks: T431

Differential Revision: https://secure.phabricator.com/D1716
2012-02-29 14:28:48 -08:00
epriestley
c7094d2def Add preview and drafts to audits
Summary: Add comment previews and saved drafts to audits, like Maniphest /
Differential.

Test Plan: Typed stuff into the box. Got a preview. Reloaded page. Stuff was
still there. Submitted comment. Stuff is gone.

Reviewers: btrahan, jungejason

Reviewed By: btrahan

CC: aran, epriestley

Maniphest Tasks: T904

Differential Revision: https://secure.phabricator.com/D1699
2012-02-27 13:00:23 -08:00
epriestley
1094527072 Allow Herald to trigger audits for users or projects
Summary:
Allows you to write a commit rule that triggers an audit by a user (personal
rules) or a project (global rules).

Mostly this is trying to make auditing more lightweight and accessible in
environments where setting up Owners packages doesn't make sense.

For instance, Disqus wants a rule like "trigger an audit for everything that
didn't have a Differential revision". While not necessarily scalable, this is a
perfectly reasonable rule for a small company, but a lot of work to implement
with Owners (and you'll get a lot of collateral damage if you don't make every
committer a project owner).

Instead, they can create a project called 'Unreviewed Commits' and write a rule
like:

	- When: Differential revision does not exist
 	- Action: Trigger an Audit for project: "Unreviewed Commits"

Then whoever cares can join that project and they'll see those audits in their
queue, and when they approve/raise on commits their actions will affect the
project audit.

Similarly, if I want to look at all commits that match some other rule (say,
XSS) but only want to do it like once a month, I can just set up an audit rule
and go through the queue when I feel like it.

NOTE: This abuses the 'packagePHID' field to also store user and project PHIDs.
Through the magic of handles, this (apparently) works fine for now; I'll do a
big schema patch soon but have several other edits I want to make at the same
time.

Also:

	- Adds an "active" fiew for /audit/, eventually this will be like the
Differential "active" view (stuff that is relevant to you right now).
	- On commits, highlight triggered audits you are responsible for.

Test Plan: Added personal and global audit triggers to Herald, reparsed some
commits with --herald, got audits. Browsed all audit interfaces to make sure
nothing exploded. Viewed a commit where I was responsible for only some audits.
Performed audits and made sure the triggers I am supposed to be responsible for
updated properly.

Reviewers: btrahan, jungejason

Reviewed By: jungejason

CC: aran, epriestley

Maniphest Tasks: T904

Differential Revision: https://secure.phabricator.com/D1690
2012-02-27 09:36:30 -08:00
vrana
da892bde7c Go to correct position after revealing comments
Test Plan:
Go to revision with lots of comments in Firefox.
Click on one of the last three comments permalink.
Repeat in Chrome.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1702
2012-02-26 13:13:51 -08:00
epriestley
386dcfff7e Rough batch editor for Maniphest
Summary:
First stab at a batch editor for Maniphest. Basically, you can select a group of
tasks and then import them into the "batch" interface, where you can edit all of
them at once.

High level goal is to make it easier for users in PM/filer/support/QA roles to
deal with large numbers of tasks quickly.

This implementation has a few major limitations:

  - The only available actions are "add projects" and "remove projects".
  - There is no review / undo / log stuff.
  - All the changes are applied in-process, which may not scale terribly well.

However, the immediate need is just around projects and this seemed like a
reasonable place to draw the line for a minimal useful version of the tool.

Test Plan: Used batch editor to add and remove projects from groups of tasks.

Reviewers: btrahan, yairlivne

Reviewed By: btrahan

CC: aran, epriestley, sandra

Maniphest Tasks: T441

Differential Revision: https://secure.phabricator.com/D1680
2012-02-24 13:00:48 -08:00
vrana
97144c0932 Support paste file uploads
Summary:
This is so freaking cool that I will try to implement it also on Facebook.
Idea is from
http://strd6.com/2011/09/html5-javascript-pasting-image-data-in-chrome/.
I don't know how to properly detect support but lying about it is not a big
deal.

Test Plan:
Go to revision comment textarea.
Paste some text data - works as usual.
Paste some image data in Chrome - file is uploaded and a link to it is inserted.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1681
2012-02-23 16:36:58 -08:00
epriestley
bf3dd8663c Add "buoyant" headers to Differential
Summary:
As you scroll through a diff, add a fixed-position header to the top of the
document to provide context. This is particularly useful with keyboard
navigation.

The technical implementation is that we seed the document with invisible
markers. When the user scrolls past one, we show a header with that text until
they scroll past another.

Test Plan:
Scrolled through a revision, was presented with context.

https://secure.phabricator.com/file/data/5xhh2jmoon6ukr5qjkh3/PHID-FILE-463ituscyhyw7utnox7m/Screen_Shot_2012-02-22_at_2.48.19_PM.png

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, epriestley

Maniphest Tasks: T696

Differential Revision: https://secure.phabricator.com/D1673
2012-02-23 12:26:14 -08:00
epriestley
965a4da042 Add a "jump nav" element to the homepage, for quick tool/object navigation
Summary:
  - Restore quick methods for getting to common features (upload file, create
task, etc.)
  - Provide a flexible cli-like navigation element similar to stuff used at
Facebook (bunny1 / lolbunny).

Test Plan: Used jump nav and nav buttons.

Reviewers: btrahan, fratrik

Reviewed By: btrahan

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1619
2012-02-15 17:49:23 -08:00
vrana
44b7b4bfc0 Send only one request at a time from ShapedRequest
Summary:
'this._request' was never set so 'waiting' was always false.
Result was that several requests were sent at once which wastes resources and
leads to weird bugs when responses don't arrive in sending order.

Blame Rev: D258

Test Plan:
Write a comment extremely fast, watch for requests sent.
Add sleep(5) for some inputs to DifferentialCommentPreviewController, verify
correct order.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1612
2012-02-14 15:58:11 -08:00
vrana
6a17de65df Ability to add reviewers while requesting review
Summary: It makes perfect sense to add more reviewers while requesting review.

Test Plan:
Request review. Verify that Add Reviewers field shows and works.
Add some reviewer. Verify that comment preview works.
Submit. Verify that reviewers are saved and displayed.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1473
2012-02-14 15:14:12 -08:00
epriestley
de7aa2186c Resolve great internal confusion about left vs right inline comments
Summary:
This code was just all kinds of wrong, but got all the common cases anyone cares
about correct.

  - In edit-inline-comments.js, if isOnRight() is true, use data.right, not
data.left (derp).
  - Set data.left correctly, not to the same value as data.right (derp derp).
  - Set "isNewFile" based on $is_new, not $on_right (derp derp derp).

Test Plan:
 - Added JS debugging code to print "OLD" vs "NEW" and "LEFT" vs "RIGHT".
Clicked the left and right sides of diff-vs-base and diff-vs-diff diffs,
verified output was accurate in all cases.
 - Added comments to the left-display-side of a diff-of-diffs, saved them, they
showed up where I put them.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran, epriestley

Maniphest Tasks: T543

Differential Revision: https://secure.phabricator.com/D1567
2012-02-03 15:26:47 -08:00
Bob Trahan
16bcd5112a Add a description preview to maniphest create / edit panel
Summary: also fixes a small bug where the page title was always "Create Task".
switch it to the header name which is much more descriptive / correct IMO.

Test Plan:
created a new task and watched the description preview update.
edited an old task and saw the description preview populate with the correct
existing data.
edited an old task and edited the description and saw the description preview
update

Reviewers: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1489
2012-01-25 11:28:08 -08:00
vrana
067c7f8a74 Display links to editor in Differential and Diffusion
Summary:
It is possible to open a file in editor by registering a custom URI scheme
(pseudo-protocol). Some editors register it by default.
Having links to open the file in external editor is productivity booster
although it is a little bit harder to set up.
There are several other tools using file_link_format configuration directive
(XDebug, Symfony) to bind to this protocol.
I've added the example with editor: protocol which can be used as a proxy to
actual editor (used by Nette Framework:
http://wiki.nette.org/en/howto-editor-link).

Test Plan:
Configure Editor Link in User Preferences.
Register URI scheme in OS.
Open a file in Diffusion. Click on the Edit button.
Open a revision in Differential. Click on the Edit button.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1422
2012-01-24 10:42:33 -08:00
awyler
14d16eab17 Enable Phabricator admin to change the owner of a herald rule
Summary:
Added a typeahead in the edit herald rule page that allows an admin or
owner to change the current owner of a rule.  If the typeahead is emptied, the
current owner will remain owner.

Test Plan:
Created a test rule.  Changed the owner.  Deleted the owner in the
typahead. Verified expected behavior.

Reviewers: jungejason, epriestley

Reviewed By: epriestley

CC: aran, jungejason, epriestley, xela

Differential Revision: https://secure.phabricator.com/D1322
2012-01-18 11:59:35 -08:00
vrana
ae0d9770a5 Fill <a href> in PhabricatorMenuItem
Summary: The <a href> attribute is useful because user knows where the link goes
before opening it plus he can copy it to the clipboard plus he can add it to the
bookmarks.

Test Plan:
Display revision.
View Options.
Click.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran

Differential Revision: https://secure.phabricator.com/D1436
2012-01-17 10:49:39 -08:00
vrana
c7997e0a7c Display Show Raw File links in Differential only if the file exists
Test Plan:
Open menu for added file
Open menu for deleted file
Open menu for changed file

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1410
2012-01-16 09:08:40 -08:00
epriestley
3c9551e96d Add "Reveal Entire File" option to Diffusion
Summary: Clicks all the "Show All" links for you at the touch of a button.

Test Plan:
  - Used "reveal entire file" on revealable files.
  - Opened on already-visible files, got "entire file shown".
  - Used other menu options.
  - Used normal "show more" links.

Reviewers: btrahan, jungejason

Reviewed By: btrahan

CC: aran, epriestley, btrahan

Maniphest Tasks: T497

Differential Revision: https://secure.phabricator.com/D1331
2012-01-06 11:51:10 -08:00
epriestley
1903bb80bb Add a link from Differential to Diffusion
Summary:
Provide an easy way to jump to Diffusion from Differential if we have
the data we need to connect them.

Test Plan: Tested menu in linked and unlinked diffs. Used menu item.

Reviewers: btrahan, jungejason

Reviewed By: btrahan

CC: aran, epriestley, btrahan

Maniphest Tasks: T309

Differential Revision: https://secure.phabricator.com/D1326
2012-01-05 18:03:08 -08:00
epriestley
da3a972400 Retry failed page anchor navigation
Summary:
When the user loads a page with an anchor on it like #thing, or clicks a link to
#thing, and #thing doesn't exist, keep trying to navigate to #thing for a few
seconds.

This allows anchors to work when the target is in content which is later ajaxed
in. In particular, this affects inline comments in Differential.

Test Plan: Opened inline comment links in a new tab, was in the right place when
I switched tabs.

Reviewers: nh, btrahan, jungejason

Reviewed By: btrahan

CC: aran, btrahan, epriestley

Maniphest Tasks: T492

Differential Revision: https://secure.phabricator.com/D1327
2012-01-05 18:02:02 -08:00
epriestley
7abdf3afe0 Add a dropdown menu for Differential view options
Summary:
There are several open Differential tasks that are basically blocked on not
having reasonable places in the UI to put things. Replace the "View Standalone /
Raw" button with a "View Options" dropdown menu so we can shove things like
"Expand All", "Fold / Unfold File", and "View in Diffusion" in there.

This doesn't change any behavior, just puts the existing options in a menu.

Test Plan:
  - Toggled menu open by clicking button.
  - Clicked menu items.
  - Toggled menu closed by clicking button.
  - Toggled menu closed by clicking document.
  - Toggled menu closed by opening another menu.
  - Toggled menu closed by selecting an item.

Reviewers: btrahan, jungejason

Reviewed By: btrahan

CC: aran, btrahan

Maniphest Tasks: T497, T309

Differential Revision: https://secure.phabricator.com/D1316
2012-01-05 12:58:38 -08:00
epriestley
1c1fe96bec Add more keyboard navigation options for inline comments
Summary:
  - Use n/p to jump between comments.
  - Use r to reply to the selected comment.
  - Use e to edit the selected comment.

Test Plan: Verified n, p, r, e, j, k, J, K, "click edit" and "click reply"
behavior in as many weird cases as I could come up with.

Reviewers: btrahan, jungejason, nh, cpiro, jl

Reviewed By: btrahan

CC: aran, btrahan, epriestley

Maniphest Tasks: T583

Differential Revision: https://secure.phabricator.com/D1308
2012-01-05 12:58:05 -08:00
vrana
460efc4489 Include added reviewers and ccs in preview
Summary: Preview of Add Reviewers looks silly without actually showing them

Test Plan:
Go to any diff
Leap into action: Add Reviewers
Add some reviewers
Write some comment
Preview including Added reviewers should be displayed
Change action to Comment
Added reviewers should disappear
Repeat with Add CCs

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley, vrana

Differential Revision: https://secure.phabricator.com/D1276
2012-01-04 17:08:13 -08:00
vrana
dbfd4fd818 Re-set timeout in ShapedRequest on rate-limit conditions
Summary: Rate-limit conditions didn't set a new timer. It results in stopping of
periodically updating Preview and also in missing last typed characters in
Preview.

Test Plan:
Go to any diff
Type something really fast in Comment
After finishing typing, whole comment should be displayed in Preview
Insert something without keyboard (e.g. paste with mouse)
Preview should be updated

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1288
2011-12-28 16:15:46 -08:00
epriestley
93d5d29541 Remove "Former" project members
Summary:
This is a needlessly confusing/complex feature that I originally wrote sort of
speculativley. I think we can better serve what little need may exist here with
project feeds.

I'm probably going to get rid of or deemphasize "role" too and just add "Join
Project" and "Leave Project" buttons.

Test Plan: Viewed project list, project profile. Edited project profile and
affiliation.

Reviewers: btrahan, jungejason, zeeg

Reviewed By: btrahan

CC: aran, btrahan

Maniphest Tasks: T681

Differential Revision: 1228
2011-12-16 17:46:02 -08:00
epriestley
c16c920f94 Remove setTimeout() hacks for Javelin behavior initialization
Summary:
  - Prioritize higher-priority behaviors on the server.
  - Remove setTimeout() hacks.

Test Plan: Loaded Differential, didn't get CSRF races for comment previews.

Reviewers: aran, jg, cpojer

Reviewed By: jg

CC: btrahan, jungejason, aran, epriestley, jg

Differential Revision: 1183
2011-12-13 12:50:00 -08:00
Jakub Vrana
cfaab709df Ignore right mouse button in click on a line number in diff
Test Plan:
Go to any diff
Click on a line number with right mouse button
No dialog should be opened

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: 1150
2011-12-01 13:02:06 -08:00
epriestley
bd520076f9 Add optional keystroke support for AphrontPagerView
Summary: This is sort of silly but maybe useful? The real problem is that there
are like 500k conduit call logs and the real solution to that is better
filtering options, but this seems sort of okay.

Test Plan: Used "[" and "]" to switch between pages on the conduit call log.

Reviewers: btrahan, jungejason, nh, aran

Reviewed By: nh

CC: aran, nh, epriestley

Differential Revision: 1145
2011-12-01 10:16:12 -08:00
adonohue
7d2a18d883 Examples using JX.View
Summary: Provide a dirt-simple working example of client-side templating and
reactive programming.

Test Plan: Load the examples

Reviewers: epriestley, mroch, tomo

Reviewed By: epriestley

CC: ide, schrockn, aran, rzadorozny, epriestley

Differential Revision: 908
2011-11-06 15:17:00 -08:00
epriestley
254f606e89 Tie all the pieces for symbol cross-references together
Summary:
This makes symbol cross-references work in Differential. You need to do a little
legwork but I'll document that once the change has baked for a little while.

Basically:

  - Projects are annotated with indexed languages, and "shared library" projects
(for example, symbols in Phabricator should be searched for in Arcanist and
libphutil).
  - When we render a changeset, we check if its language is an indexed one. If
it is, we invoke the decorator Javascript.
  - The Javascript takes you to a lookup page, which either gives you a list of
matching symbols (if several match) or redirects you instantly to the
definition.

Test Plan: Clicked class and function symbols in a diff, got jumped into
sensible sorts of places in Diffusion.

Reviewers: jungejason, nh, tuomaspelkonen, aran

Reviewed By: jungejason

CC: aran, jungejason

Differential Revision: 980
2011-10-09 17:58:17 -07:00
epriestley
0580772805 Add a JS component for crossreferences
Summary: When the user clicks a crossreference, jump them to symbol lookup

Test Plan: Clicked some crossref symbols

Reviewers: jungejason, nh, tuomaspelkonen, aran

Reviewed By: nh

CC: aran, nh, epriestley

Differential Revision: 904
2011-10-09 17:58:01 -07:00
Jason Ge
1e3c10379a Enable typeahead's ondemand on details view page
Summary:
the details pages are using preload instead of ondemand for
typeahead, but the most common actions on the pages are commenting which
would not need the preloaded info. To improve the performance of the
pages, turn on ondemand according to the setting in the config file.

Test Plan: verify it is working with both modes, for both pages.

Reviewers: epriestley, nh

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: 995
2011-10-09 12:33:08 -07:00
epriestley
d0b6602e29 Add an option to switch tokenizers to use "ondemand" instead of "preloaded"
datasources

Summary:
The open source Phabricator has like 3,500 user accounts now and it takes a
while to pull/render them. Add an option to switch to ondemand for large
installs.

I'll follow up with a patch at some point to address a couple of name things:

  - Denormalize last names into a keyed column (although this evidences some
bias toward the western world).
  - Force all usernames to lowercase (sorry Girish, Makinde).

Also this patch is so clean it's crazy.

Didn't bother with other object types for now, I'm planning to dedicate a few
days to Projects at some point and I'll flesh out some auxiliary features like
this when I do that.

Test Plan: Switched to ondemand, verified data was queried dynamically. Switched
back, verified data was preloaded.

Reviewers: jungejason, nh, tuomaspelkonen, aran

Reviewed By: nh

CC: aran, epriestley, nh

Differential Revision: 923
2011-09-21 14:22:01 -07:00
epriestley
209179a74a Remove tests for JX.$.NotFound from Phabricator
Summary: See D939. Regardless of what we do there, these will break, and they're
pretty silly anyway (see the giant caveat comments in the second one).

Test Plan: Clicked a direct-jump comment link, did save/cancel for inline
comments.

Reviewers: phil, cpojer, tomo, mroch

Reviewed By: phil

CC: aran, phil

Differential Revision: 940
2011-09-16 00:49:10 -07:00
epriestley
c544f78015 When a user hits "Reply", then "Cancel" on an inline comment (without typing),
don't show "Undo"

Summary: When a user hits "Reply" on an inline comment, doesn't type anything,
and then hits "Cancel", we incorrectly store the text of the comment the user is
replying to as the "original" text, and then detect that they've changed it when
they immediately cancel. Instead, store empty string as the original text.

Test Plan:
  - Hit "Reply" and then "Cancel" on an inline comment. No undo now.
  - Hit "Reply", typed some text, and then hit "Cancel". Got an undo which
restored my text.

Reviewers: tomo, jungejason, tuomaspelkonen, aran

Reviewed By: aran

CC: aran, tomo

Differential Revision: 879
2011-08-31 12:04:17 -07:00
epriestley
30abed8b05 Fix minor CSRF-patch issues. 2011-08-16 14:39:01 -07:00
epriestley
a3700022a8 Defer initial preview until CSRF header for JX.Request loads. 2011-08-16 14:31:52 -07:00