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

16 commits

Author SHA1 Message Date
epriestley
9352c76e81 Decouple some aspects of request routing and construction
Summary:
Ref T5702. This is a forward-looking change which provides some very broad API improvements but does not implement them. In particular:

  - Controllers no longer require `$request` to construct. This is mostly for T5702, directly, but simplifies things in general. Instead, we call `setRequest()` before using a controller. Only a small number of sites activate controllers, so this is less code overall, and more consistent with most constructors not having any parameters or effects.
  - `$request` now offers `getURIData($key, ...)`. This is an alternate way of accessing `$data` which is currently only available on `willProcessRequest(array $data)`. Almost all controllers which implement this method do so in order to read one or two things out of the URI data. Instead, let them just read this data directly when processing the request.
  - Introduce `handleRequest(AphrontRequest $request)` and deprecate (very softly) `processRequest()`. The majority of `processRequest()` calls begin `$request = $this->getRequest()`, which is avoided with the more practical signature.
  - Provide `getViewer()` on `$request`, and a convenience `getViewer()` on `$controller`. This fixes `$viewer = $request->getUser();` into `$viewer = $request->getViewer();`, and converts the `$request + $viewer` two-liner into a single `$this->getViewer()`.

Test Plan:
  - Browsed around in general.
  - Hit special controllers (redirect, 404).
  - Hit AuditList controller (uses new style).

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5702

Differential Revision: https://secure.phabricator.com/D10698
2014-10-17 05:01:40 -07:00
epriestley
fc814647e6 Improve usability of Phrequent "Stop Time" dialog
Summary:
Fixes T5848.

  - Disallow tracking negative time.
  - Preserve note if there's an error with the time selection.
  - Show start time and duration.
  - Slightly better error messages.

Test Plan: Started and stopped time. Tried to select future/negative ranges.

Reviewers: hach-que, btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5848

Differential Revision: https://secure.phabricator.com/D10218
2014-08-11 12:30:01 -07:00
James Rhodes
2101c3b689 Conduit APIs to start and stop tracking time in phrequent
Summary:
This adds methods to start and stop tracking any arbitrary PHID in phrequent. Currently, this uses copy-pasted code from PhrequentTrackController. I had to do this because the code to start/stop was not abstracted into a common class.

Once the code to start/stop working is extracted into a re-usable class, the conduit API can use this as well.

Test Plan: I called the functions with a PHID of a task and ensured that the fields in the phrequent database table was being updated correctly.

Reviewers: skyronic, #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: maxhodak, erik.fercak, aran, epriestley, Korvin

Maniphest Tasks: T3569, T3970

Differential Revision: https://secure.phabricator.com/D7326
2014-07-12 11:42:32 +10:00
Joshua Spence
d0128afa29 Applied various linter fixes.
Summary: Applied some more linter fixes that I previously missed because my global `arc` install was out-of-date.

Test Plan: Will run `arc unit` on another host.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9443
2014-06-09 16:04:12 -07:00
Joshua Spence
0a62f13464 Change double quotes to single quotes.
Summary: Ran `arc lint --apply-patches --everything` over rP, mainly to change double quotes to single quotes where appropriate. These changes also validate that the `ArcanistXHPASTLinter::LINT_DOUBLE_QUOTE` rule is working as expected.

Test Plan: Eyeballed it.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin, hach-que

Differential Revision: https://secure.phabricator.com/D9431
2014-06-09 11:36:50 -07:00
Brayden
715bf1fd55 Added a popup to both start and end times with Phrequent allowing the user to edit their start/end times. Also added a field for notes on the stop time
Summary:
I have added a dialog box which pops up when a user starts or stops tracking time on an issue with Phrequent. These dialogs allow the user to modify the time if it so happens that they forgot to either clock in or out.
I have also added a Note field in the dialog when a user stops tracking time. This allows them to enter a note about the time, and is entered into the database, but is currently (as far as I know) not visible anywhere in Phabricator.
I have made these changes according to the suggestions found in T3568

Also, upon clocking in or out, if the time entered is a future time, an error is returned and the user is asked to enter a valid time.

Test Plan:
Start tracking time and edit the start date/time, then end the time and edit that timestamp as well.
Also, try entering future dates/times and ensure that the dialog reports an error and asks for the time again.
Ensure that these edited times are recorded properly.

Reviewers: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T3568

Differential Revision: https://secure.phabricator.com/D9147
2014-05-16 08:53:50 -07:00
epriestley
352d9f6b06 Move more rendering into SearchEngines for panels
Summary: Ref T4986. Getting closer. Nothing out of the ordinary in this group.

Test Plan:
For each application:

  - Viewed the normal search results.
  - Created a panel version and viewed it.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T4986

Differential Revision: https://secure.phabricator.com/D9024
2014-05-09 12:25:52 -07:00
James Rhodes
89df6f7bfc Add "Stop Tracking" link to entries in the Phrequent search view.
Summary: Depends on D7163.  This adds a "Stop Tracking" link to the right-hand side of ongoing entries in the Phrequent search view.  It allows users to stop tracking items without first navigating to the item itself.

Test Plan: Started tracking and item and then clicked the "Stop Tracking" link in Phrequent.

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Maniphest Tasks: T3870

Differential Revision: https://secure.phabricator.com/D7164
2013-10-01 13:17:28 -07:00
James Rhodes
e4a07e01b5 Update Phrequent to use new search infrastructure.
Summary:
This updates Phrequent to use new the search infrastructure.  Now it looks like:

{F60141}

I've also added the policy infrastructure stubs, but it's probably not even close to being right in terms of enforcing policies (in particular being able to see time tracked against objects the user wouldn't normally be able to see).

At some point I'd like to be able to filter on the objects that the time is tracked against, but I don't believe there's a tokenizer / readahead control that allows you to type any kind of object.

Test Plan: Clicked around the new interface, created some custom queries and saved them.

Reviewers: epriestley

CC: Korvin, aran

Maniphest Tasks: T3870

Differential Revision: https://secure.phabricator.com/D7163
2013-10-01 13:09:33 -07:00
Bob Trahan
b902005bed Kill PhabricatorObjectDataHandle
Summary: Ref T603. Killing this class is cool because the classes that replace it are policy-aware. Tried to keep my wits about me as I did this and fixed a few random things along the way. (Ones I remember right now are pulling a query outside of a foreach loop in Releeph and fixing the text in UIExample to note that the ace of hearts if "a powerful" card and not the "most powerful" card (Q of spades gets that honor IMO))

Test Plan: tested the first few changes (execute, executeOne X handle, object) then got real mechanical / careful with the other changes.

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran, FacebookPOC

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D6941
2013-09-11 12:27:28 -07:00
Chad Little
fe2a96e37f Update Form Layouts
Summary:
This attempts some consistency in form layouts. Notably, they all now contain headers and are 16px off the sides and tops of pages. Also updated dialogs to the same look and feel. I think I got 98% of forms with this pass, but it's likely I missed some buried somewhere.

TODO: will take another pass as consolidating these colors and new gradients in another diff.

Test Plan: Played in my sandbox all week. Please play with it too and let me know how they feel.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6806
2013-08-26 11:53:11 -07:00
Gareth Evans
eaa4362979 Updates to phrequent's landing page
Summary:
https://secure.phabricator.com/D5554#comment-4

Implemented the changes outlined above.

Test Plan: Go to the page, click the new nav links, try the user filter

Reviewers: epriestley, hach-que

CC: hach-que, aran, Korvin

Differential Revision: https://secure.phabricator.com/D5789
2013-04-29 12:01:02 -07:00
Gareth Evans
7d35625ea9 Added sort order and ended filter to Phrequent.
Summary:
Fixed order by duration, wasn't order by duration.

Added some sorting and filtering.

Test Plan: set some timers, stop them, look at phrequent, sort and filter them.

Reviewers: epriestley, hach-que

CC: aran, Korvin, hach-que

Maniphest Tasks: T2857

Differential Revision: https://secure.phabricator.com/D5554
2013-04-03 08:35:47 -07:00
epriestley
1196675697 Fix 403s in Phrequent by rendering actions as forms, and make properties fancier
Summary:
Also cleans up some stuff like logged out users a bit. This provides a more subtle alternative to {D5485}.

(This is fairly rough, and the icons need to be sprited if we stick with this approach.)

Test Plan:
{F38047}
{F38048}

Reviewers: hach-que, btrahan

Reviewed By: hach-que

CC: aran, chad

Maniphest Tasks: T2857

Differential Revision: https://secure.phabricator.com/D5494
2013-03-30 19:37:13 -07:00
James Rhodes
4a5dfd3819 Updated Phrequent "Time Tracked" page to show time in Started / Ended columns.
Summary:
Small update that shows time as well as date on the Time Tracked page, which
is important given that durations are likely to be less than a day.

Test Plan: Apply the patch and view the "Time Tracked" page under Phrequent.

Reviewers: epriestley

CC: aran, Korvin

Maniphest Tasks: T2857

Differential Revision: https://secure.phabricator.com/D5482
2013-03-30 09:33:30 -07:00
James Rhodes
e555b9025f Implemented Phrequent time tracking functionality.
Summary:
This differential implements Phrequent's time tracking
functionality for users and hooks it up to Maniphest.  It
also includes a basic "Time Tracked" list for the Phrequent
application, where users can review what they've spent time
working on.

Test Plan:
Apply the patch and track some things in Maniphest.  They
should appear in the "Time Tracked" view of Phrequent.

There is also a `phrequent.show-prompt` option which toggles
whether to display a prompt when tracking time.  I'm unsure
of whether the prompt is useful or is more likely to cause
people to click "Track Time", go off and do the task and then
come back to the prompt still waiting for them to confirm.  A
potential solution to the "accidentally clicking the button
and recording 2 seconds of time" might be to show a prompt
on stop if the total time is under 10 seconds, asking whether
the user wants to keep or discard the tracked time.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2857

Differential Revision: https://secure.phabricator.com/D5479
2013-03-30 09:32:47 -07:00