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

1409 commits

Author SHA1 Message Date
epriestley
3cf6f746f0 Raise an "Account Setup Issue" if your primary address is unverified
Summary:
Ref T12237. This adds a UI cue for users who have unverified primary addresses, since we no longer send them mail.

Also adds a new `bin/mail unverify` to unverify an address (for example, because mail is bouncing).

Test Plan:
  - Unverified my address, saw setup issue.
  - Verified my address, no more setup issue.

{F2861820}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12237

Differential Revision: https://secure.phabricator.com/D17344
2017-02-13 10:41:32 -08:00
Austin Seipp
ab923e0a75 Implement new reCAPTCHA interface
Summary:
Fixes T12195. For the past few years, Recaptcha (now part of Google) has supported
a new, "no captcha" one-click user interface. This new UI is stable, doesn't
require any typing or reading words, and can even work without JavaScript (if
the administrator enables it on the Recaptcha side).

Furthermore, the new Recaptcha has a completely trivial API that can be dealt
with in a few lines of code. Thus, the external `recaptcha` php library is now
gone.

This API is a complete replacement for the old one, and does not require any
upgrade path for users or Phabricator administrators - public and secret keys
for the "new" Recaptcha UI are the exact same as the "classic" Recaptcha. Any
old Recaptcha keys for a domain will continue to work.

Note that Google is currently testing Yet Another new Captcha API, called
"Invisible reCAPTCHA", that will not require user interaction at all. In fact,
the user will not even be aware there //is even a captcha form//, as far as I
understand. However, this new API is 1) in beta, 2) requires new Recaptcha keys
(so it cannot be a drop-in replacement), and 3) requires more drastic API
changes, as form submission buttons must instead invoke JavaScript code, rather
than a token being passed along with the form submission. This would require far
more extensive changes to the controllers. Maybe when it's several years old, it
can be considered.

Signed-off-by: Austin Seipp <aseipp@pobox.com>

Test Plan:
Created a brand-new Phabricator installation, saw the new Captcha UI
on administrator sign up. Logged out, made 5 invalid login attempts, and saw the
new Captcha UI. Reworked the conditional to invert the condition, etc to test
and make sure the API responded properly.

Reviewers: epriestley, #blessed_reviewers, chad

Reviewed By: epriestley, #blessed_reviewers

Subscribers: avivey, Korvin

Maniphest Tasks: T12195

Differential Revision: https://secure.phabricator.com/D17304
2017-02-03 20:06:29 +00:00
Chad Little
dd068a071e Add clearer saved search options in ApplicationSearch
Summary: Ref T5307, Makes these buttons a little more clear visually and verbosely. Adds white icons for blue buttons.

Test Plan: Test saving a search, viewing button changes on various form pages / uiexamples.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T5307

Differential Revision: https://secure.phabricator.com/D17305
2017-02-03 08:47:49 -08:00
Chad Little
7e3adb1257 Add FontAwesome 4.7.0
Summary: Adds most up to date version of FontAwesome

Test Plan: {icon snowflake-o}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D17293
2017-02-01 16:34:48 -08:00
epriestley
ad01e26af7 Redesign Home/Profile/Projects side navigation
Summary: Ref T11957. Needs some more polish, but I think everything here is square.

Test Plan: Add personal/global items to home, test mobile. Test workboards / colors.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: 20after4, rfreebern, Korvin

Maniphest Tasks: T11957

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

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

Test Plan: Test UIExamples, Autocomplete, and TypeaheadSource

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T12139

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

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

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

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12140

Differential Revision: https://secure.phabricator.com/D17239
2017-01-21 08:50:08 -08:00
epriestley
98a29f3de9 Put "View Edit History" above "Remove Comment" in timeline comment action dropdown
Summary: Fixes T12131.

Test Plan: {F2449700}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12131

Differential Revision: https://secure.phabricator.com/D17234
2017-01-20 16:56:30 +00:00
epriestley
90258ed491 Fix property shadowing on ActionListView after conversion to TagView
Summary:
See D17222. D17209 accidentally broke setting IDs on ActionListView by converting it into a TagView: TagView already has an `id` property, and this new `id` property on the subclass shadows it.

Materially, the "Actions" mobile button in the headers of objects (for example: Maniphest Task -> shrink browser window -> click "Actions" next to task name) relies on setting IDs on list views.

Test Plan:
  - Viewed a task.
  - Made browser window narrow.
  - Clicked `[= Actions]` button.
  - After patch: saw a dropdown menu.

Reviewers: chad

Reviewed By: chad

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

Test Plan:
Look at myself a lot.

{F2435202}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

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

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

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T5867

Differential Revision: https://secure.phabricator.com/D17214
2017-01-17 15:55:52 -08:00
Chad Little
db65f828ee Fix $classes not imploding properly in list view
Summary: Fixes the persistent chat hyperlinks showing.

Test Plan: Open persistent chat, no longer see the hyperlinks showing. Close and open chat. Edit room.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

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

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

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

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T12107

Differential Revision: https://secure.phabricator.com/D17209
2017-01-17 12:13:06 -08:00
epriestley
a4a9485612 Hide dropdown menus when users click workflow items
Summary:
In D16157, dropdown menus got an overly-broad check for not closing when an item is clicked.

Specifically, we don't want to close the menu if the item is really opening a submenu, like "Edit Related Objects..." does on mobile.

The check for this is too broad, and also doesn't close the menu if the item has workflow.

Instead, use a narrower check.

Test Plan:
  - Menu still stays open when toggling submenus like "Edit Related Objects".
  - Menu now closes properly when using workflow items like "Edit Comment" or "Remove Comment".

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D17210
2017-01-16 13:38:12 -08:00
epriestley
b08c9b3ffa Remove extra container tag on HandleListViews rendering from ModularTransactions in text mode
Summary:
Fixes T12082. Ref T11114. When modular transaction render a handle list, they use HandleListView, which has a text mode.

However, the HandleListView is a TagView, and currently TagViews always render a tag of some kind. Allow them to return `null` to decline to render any tag.

Test Plan:
  - Added a pile of debugging stuff to `ApplicationTransactionEditor` to throw during mail generation.
  - Added a reviewer to a revision.
  - Used `bin/worker execute --id ...` to hit the mail generation repeatedly.
  - Before patch: mail generated with a <span>, even in text mode.
  - After patch: clean mail generation.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12082, T11114

Differential Revision: https://secure.phabricator.com/D17162
2017-01-09 08:41:59 -08:00
Chad Little
489587d607 Add download link to embedded files
Summary: Ref T3612. Doesn't render correctly, need help please. Adds a download icon into the renderfilelinkview to allow easier downloads.

Test Plan: Click on link, get download, click on file, get lightbox.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T3612

Differential Revision: https://secure.phabricator.com/D16980
2017-01-03 10:50:26 -08:00
epriestley
3fedc8c299 Allow any EditEngine comment form to be pinned
Summary:
Fixes T12049. This expands "Haunted" comment panels to EditEngine, and by extension to all EditEngine applications.

Eventual goal is to remove custom commenting code in Differential and replace it with EditEngine code.

Changes from current "haunt" mode:

  - This only has one mode ("pinned"), not two ("pinned", "pinned with preview"). There's an inline preview and scroll behavior is a little better.
  - Now has a UI action button.

Slightly tricky stuff:

  - This interacts with "Fullscreen" mode since it doesn't make sense to pin a full-screen comment area.
  - This should only be available for comments, not for remarkup fields like "Description" in "Edit Task".

Test Plan:
  - Pinned/unpinned in Maniphest.
  - Pinned/fullscreened/unfullscreened/unpinned.
  - Checked that "Edit Task" doesn't allow pinning for "Description", etc.
  - Pressed "?", read about pressing "Z".
  - Pressed "Z".

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12049

Differential Revision: https://secure.phabricator.com/D17105
2016-12-29 12:49:18 -08:00
Chad Little
e077d2f7a7 Reorganize phui-object-item CSS, add drag ui
Summary: Reorgaizes the CSS here a bit, by object list style, adds in a new drag ui class, which will be used in menu ordering.

Test Plan:
Workboards, Home Apps.

{F2126266}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D17057
2016-12-14 11:53:17 -08:00
epriestley
3277e78732 Move timeline anchor targets up to evade a Chrome 55 behavioral change
Summary: Fixes T11997. This lifts the targets out of the containing `overflow: hidden;` div so Chrome is willing to target them.

Test Plan: In Chrome, visited direct comment links and ended up in the right place. Clicked comment anchors, saw browser jump around again.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11997

Differential Revision: https://secure.phabricator.com/D17033
2016-12-12 10:39:02 -08:00
Chad Little
a79e4b786e Restrict hover styles in action list to only href
Summary: We're currently applying these styles to labels, restrict them to only list elements that have an href.

Test Plan: Test a label, an anchor, and a button as an action item.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D17031
2016-12-12 09:06:46 -08:00
epriestley
cde37acb4b When a custom logo is configured but has a restrictive visibility policy, fall back to the default logo
Summary: Fixes T11982. Currently, configuring a custom logo and then setting the policy restrictively locks off the whole install.

Test Plan:
  - Configured `ui.logo`.
  - Searched for the file PHID in global search to find the underlying file.
  - Set the policy to something restrictive ("only me").
  - Purged cache (`bin/cache purge --purge-all`).
  - Restarted webserver to nuke APC.
  - Loaded a page as a different user.
  - Before change: policy exception while trying to load the logo.
  - After change: fallback to default logo.
  - Loaded page as user who can see the logo, got custom logo.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11982

Differential Revision: https://secure.phabricator.com/D17011
2016-12-09 07:50:59 -08:00
Chad Little
49a20bde8e Prevent double lightbox in lightbox comments
Summary: Ref T3612, prevents lightbox from spawning from inside a lightbox.

Test Plan: Click on file lightbox, leave file comment, click file comment, get take to file page instead of another lightbox.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T3612

Differential Revision: https://secure.phabricator.com/D16978
2016-12-02 10:56:21 -08:00
Chad Little
aa6517a42b Make clicking on file icon in lightbox download file
Summary: Ref T3612, this adds a anchor around the large icon with hover state so you can download from here as well.

Test Plan: Hover over .ics file, click, get download.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T3612

Differential Revision: https://secure.phabricator.com/D16977
2016-12-02 10:21:28 -08:00
Chad Little
f844280d36 Make lightbox buttons more roundy
Summary: Ref T3612. Mobilizes the new lightbox, changes large buttons to circle icons like Conpherence.

Test Plan: Click each new button on desktop, mobile.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T3612

Differential Revision: https://secure.phabricator.com/D16961
2016-11-29 12:23:05 -08:00
Chad Little
80570d668b Use proper file icons in lightbox
Summary: Ref T3612. Passes in file size and file icon for non-images.

Test Plan: Review a PDF and PSD in a lightbox.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T3612

Differential Revision: https://secure.phabricator.com/D16957
2016-11-28 11:30:19 -08:00
epriestley
ab3b707396 Fix local time test case for logged-out viewers using global settings
Summary:
In D16936, I changed logged-out viewers so they use global settings.

This can lead to a `SELECT` from an isolated unit test. Instead, give the test fixtures and use standard `generateNewUser()` stuff.

Test Plan: Ran `arc unit --everything`.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D16952
2016-11-28 09:27:11 -08:00
Chad Little
dece7af50b Prettier file embeds
Summary: Spruce up the file embeds a little more, hover state, icons, file size.

Test Plan:
Add a psd and pdf, see new icons. Check differential, still see icons there too. Test mobile, desktop.

{F2042539}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D16950
2016-11-27 14:57:06 -08:00
Chad Little
add20783ab Restyle remarkup file links
Summary: Removes the icon image, uses font awesome. Better spacing.

Test Plan: Attach files to task, see new layout. click file, click download.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T3612

Differential Revision: https://secure.phabricator.com/D16918
2016-11-22 13:54:52 -08:00
Chad Little
0aa3f8b86b Allow commenting on non-viewable lightbox files
Summary: Removes the viewable restriction on embedded files. Builds a basic lightbox UI for commenting.

Test Plan:
Add psd, pdf to Maniphest task, clicked on download, comment, left comment. Closed box.

{F1943726}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T3612

Differential Revision: https://secure.phabricator.com/D16917
2016-11-22 11:29:36 -08:00
Chad Little
8aeb7aa525 Show file comments on file lightboxes
Summary: Basic work in progress, but should show timeline comments for files when in lightbox mode. Looks reasonable.

Test Plan: click on images, see comments from timeline.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T3612

Differential Revision: https://secure.phabricator.com/D16896
2016-11-18 13:24:03 -08:00
epriestley
f33b5c30eb Use the same date rendering display logic for both tooltips and subheaders
Summary: Ref T11816. This could be a little cleaner, but we currently have two copies of the logic. Get them using the same code. Once that's actually working I can go make the code a little prettier.

Test Plan: Viewed Calendar month view tooltips, saw the same values as subheaders.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11816

Differential Revision: https://secure.phabricator.com/D16880
2016-11-16 08:37:25 -08:00
Thai Pham
78bd6c1ce4 Ensure that PHUIInvisibleCharacterTestCase is compatible with PHP 5.3
Summary: This diff fixes the `PHUIInvisibleCharacterTestCase` unittest which is only broken when running in PHP 5.3.

Test Plan:
I wasn't able to run `arc unit` successfully for some reason.
```
arc diff master
Linting...
 LINT OKAY  No lint problems.
Running unit tests...
PHP Fatal error:  Class PhabricatorUser contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (PhutilPerson::getSex) in /home/thai/workspace/phabricator/phabricator/src/applications/people/storage/PhabricatorUser.php on line 1517
PHP Stack trace:
PHP   1. {main}() /home/thai/workspace/phabricator/arcanist/scripts/arcanist.php:0
PHP   2. ArcanistDiffWorkflow->run() /home/thai/workspace/phabricator/arcanist/scripts/arcanist.php:394
PHP   3. ArcanistDiffWorkflow->runLintUnit() /home/thai/workspace/phabricator/arcanist/src/workflow/ArcanistDiffWorkflow.php:483
PHP   4. ArcanistDiffWorkflow->runUnit() /home/thai/workspace/phabricator/arcanist/src/workflow/ArcanistDiffWorkflow.php:1228
PHP   5. ArcanistUnitWorkflow->run() /home/thai/workspace/phabricator/arcanist/src/workflow/ArcanistDiffWorkflow.php:1340
PHP   6. ArcanistConfigurationDrivenUnitTestEngine->run() /home/thai/workspace/phabricator/arcanist/src/workflow/ArcanistUnitWorkflow.php:167
PHP   7. PhutilUnitTestEngine->run() /home/thai/workspace/phabricator/arcanist/src/unit/engine/ArcanistConfigurationDrivenUnitTestEngine.php:147
PHP   8. PhabricatorTestCase->willRunTestCases() /home/thai/workspace/phabricator/arcanist/src/unit/engine/PhutilUnitTestEngine.php:64
PHP   9. require_once() /home/thai/workspace/phabricator/phabricator/src/infrastructure/testing/PhabricatorTestCase.php:62
PHP  10. require_once() /home/thai/workspace/phabricator/phabricator/scripts/__init_script__.php:3
PHP  11. init_phabricator_script() /home/thai/workspace/phabricator/phabricator/scripts/init/init-script.php:10
PHP  12. PhabricatorEnv::initializeScriptEnvironment() /home/thai/workspace/phabricator/phabricator/scripts/init/lib.php:22
PHP  13. PhabricatorEnv::initializeCommonEnvironment() /home/thai/workspace/phabricator/phabricator/src/infrastructure/env/PhabricatorEnv.php:75
PHP  14. PhabricatorEnv::buildConfigurationSourceStack() /home/thai/workspace/phabricator/phabricator/src/infrastructure/env/PhabricatorEnv.php:95
PHP  15. PhabricatorConfigDefaultSource->__construct() /home/thai/workspace/phabricator/phabricator/src/infrastructure/env/PhabricatorEnv.php:183
PHP  16. PhabricatorApplicationConfigOptions::loadAllOptions() /home/thai/workspace/phabricator/phabricator/src/infrastructure/env/PhabricatorConfigDefaultSource.php:11
PHP  17. PhabricatorUserConfigOptions->getOptions() /home/thai/workspace/phabricator/phabricator/src/applications/config/option/PhabricatorApplicationConfigOptions.php:232
PHP  18. spl_autoload_call() /home/thai/workspace/phabricator/phabricator/src/applications/config/option/PhabricatorApplicationConfigOptions.php:44
PHP  19. __phutil_autoload() /home/thai/workspace/phabricator/phabricator/src/applications/config/option/PhabricatorApplicationConfigOptions.php:44
PHP  20. PhutilSymbolLoader->selectAndLoadSymbols() /home/thai/workspace/phabricator/libphutil/src/__phutil_library_init__.php:22
PHP  21. PhutilSymbolLoader->loadSymbol() /home/thai/workspace/phabricator/libphutil/src/symbols/PhutilSymbolLoader.php:256
PHP  22. PhutilBootloader->loadLibrarySource() /home/thai/workspace/phabricator/libphutil/src/symbols/PhutilSymbolLoader.php:381
PHP  23. PhutilBootloader->executeInclude() /home/thai/workspace/phabricator/libphutil/src/moduleutils/PhutilBootloader.php:216
PHP  24. include_once() /home/thai/workspace/phabricator/libphutil/src/moduleutils/PhutilBootloader.php:226

Fatal error: Class PhabricatorUser contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (PhutilPerson::getSex) in /home/thai/workspace/phabricator/phabricator/src/applications/people/storage/PhabricatorUser.php on line 1517

Call Stack:
    0.0006     364056   1. {main}() /home/thai/workspace/phabricator/arcanist/scripts/arcanist.php:0
    0.7499   12720888   2. ArcanistDiffWorkflow->run() /home/thai/workspace/phabricator/arcanist/scripts/arcanist.php:394
  358.7140   13762072   3. ArcanistDiffWorkflow->runLintUnit() /home/thai/workspace/phabricator/arcanist/src/workflow/ArcanistDiffWorkflow.php:483
  431.5813   40844984   4. ArcanistDiffWorkflow->runUnit() /home/thai/workspace/phabricator/arcanist/src/workflow/ArcanistDiffWorkflow.php:1228
  431.5825   40848752   5. ArcanistUnitWorkflow->run() /home/thai/workspace/phabricator/arcanist/src/workflow/ArcanistDiffWorkflow.php:1340
  431.5836   40966456   6. ArcanistConfigurationDrivenUnitTestEngine->run() /home/thai/workspace/phabricator/arcanist/src/workflow/ArcanistUnitWorkflow.php:167
  431.5866   41403128   7. PhutilUnitTestEngine->run() /home/thai/workspace/phabricator/arcanist/src/unit/engine/ArcanistConfigurationDrivenUnitTestEngine.php:147
  431.5882   41655352   8. PhabricatorTestCase->willRunTestCases() /home/thai/workspace/phabricator/arcanist/src/unit/engine/PhutilUnitTestEngine.php:64
  431.5882   41657288   9. require_once('/home/thai/workspace/phabricator/phabricator/scripts/__init_script__.php') /home/thai/workspace/phabricator/phabricator/src/infrastructure/testing/PhabricatorTestCase.php:62
  431.5882   41659560  10. require_once('/home/thai/workspace/phabricator/phabricator/scripts/init/init-script.php') /home/thai/workspace/phabricator/phabricator/scripts/__init_script__.php:3
  431.5883   41667040  11. init_phabricator_script() /home/thai/workspace/phabricator/phabricator/scripts/init/init-script.php:10
  431.5889   41863352  12. PhabricatorEnv::initializeScriptEnvironment() /home/thai/workspace/phabricator/phabricator/scripts/init/lib.php:22
  431.5889   41863584  13. PhabricatorEnv::initializeCommonEnvironment() /home/thai/workspace/phabricator/phabricator/src/infrastructure/env/PhabricatorEnv.php:75
  431.5889   41866848  14. PhabricatorEnv::buildConfigurationSourceStack() /home/thai/workspace/phabricator/phabricator/src/infrastructure/env/PhabricatorEnv.php:95
  431.5893   41938352  15. PhabricatorConfigDefaultSource->__construct() /home/thai/workspace/phabricator/phabricator/src/infrastructure/env/PhabricatorEnv.php:183
  431.5895   42010944  16. PhabricatorApplicationConfigOptions::loadAllOptions() /home/thai/workspace/phabricator/phabricator/src/infrastructure/env/PhabricatorConfigDefaultSource.php:11
  431.6188   50463016  17. PhabricatorUserConfigOptions->getOptions() /home/thai/workspace/phabricator/phabricator/src/applications/config/option/PhabricatorApplicationConfigOptions.php:232
  431.6200   50901600  18. spl_autoload_call() /home/thai/workspace/phabricator/phabricator/src/applications/config/option/PhabricatorApplicationConfigOptions.php:44
  431.6200   50901632  19. __phutil_autoload() /home/thai/workspace/phabricator/phabricator/src/applications/config/option/PhabricatorApplicationConfigOptions.php:44
  431.6200   50901848  20. PhutilSymbolLoader->selectAndLoadSymbols() /home/thai/workspace/phabricator/libphutil/src/__phutil_library_init__.php:22
  431.6200   50904176  21. PhutilSymbolLoader->loadSymbol() /home/thai/workspace/phabricator/libphutil/src/symbols/PhutilSymbolLoader.php:256
  431.6200   50904224  22. PhutilBootloader->loadLibrarySource() /home/thai/workspace/phabricator/libphutil/src/symbols/PhutilSymbolLoader.php:381
  431.6200   50904392  23. PhutilBootloader->executeInclude() /home/thai/workspace/phabricator/libphutil/src/moduleutils/PhutilBootloader.php:216
  431.6210   51263432  24. include_once('/home/thai/workspace/phabricator/phabricator/src/applications/people/storage/PhabricatorUser.php') /home/thai/workspace/phabricator/libphutil/src/moduleutils/PhutilBootloader.php:226
```

Reviewers: chad, joshuaspence, #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D16875
2016-11-15 14:46:22 -08:00
epriestley
7097abbe57 Add a bunch of Phacility-specific code to the upstream, thinly veiled as generic code
Summary:
Ref T9304. This adds a "GuidanceEngine" which can generate "Guidance".

In practice, this lets third-party code (rSERVICES) remove and replace instructions in the UI, which is basically only usefulf or us to tell users to go read the documentation in the Phacility cluster.

The next diff tailors the help on the "Auth Providers" and "Create New User" pages to say "PHACILITY PHACILITY PHACILITY PHACILITY".

Test Plan: Browed to "Auth Providers" and "Create New User" on instanced and non-instanced installs, saw appropriate guidance.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9304

Differential Revision: https://secure.phabricator.com/D16861
2016-11-15 09:11:22 -08:00
Chad Little
037793ab60 Update PHUIInfoView
Summary: Just some minor UI tweaks. Make AphrontTagView, add Icons, whiten background.

Test Plan: Legalpad, Settings, Auth, UIExamples, Differential... desktop, mobile.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D16850
2016-11-12 21:32:13 -08:00
Chad Little
ebecbeed42 Rebuild lightbox styles
Summary: Simpler, lighter background and UI for lightbox. Removes images, uses font icons, buttons.

Test Plan:
Lots of lightboxing.

{F1917111}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D16844
2016-11-12 15:37:16 +00:00
epriestley
4811e6e7c1 Require several advanced postgraduate degrees to understand object policies
Summary:
Fixes T11836. See some prior discussion in T8376#120613.

The policy hint in headers in the UI is not exhaustive, and can not reasonably be exhaustive. For example, on a revision, it may say "All Users", but really mean "All users who can see the space this object is in and the repository it belongs to, plus the revision author and reviewers".

These rules are explained if you click (and, often, in the documentation), but "All Users" is still at least somewhat misleading.

I don't think there's any perfect solution here that balances the needs of both new and experienced users perfectly, but this change tries to do a bit better about avoiding cases where we say something very open (like "All Users") when the real policy is not very open.

Specifically, I've made these changes to the header:

  - Spaces are now listed in the tag, so it will say `(S3 > All Users)` instead of `(All Users)`. They're already listed in the header, this just makes it more explicit that Spaces are a policy container and part of the view policy.
  - Extended policy objects are now listed in the tag, so it will say `(S3 > rARC > All Users)` for a revision in the Arcanist repository which is also in Space 3.
  - Objects can now provide a "Policy Codex", which is an object that represents a rulebook of more sophisticated policy descriptions. This codex can replace the tag with something else.
    - Imported calendar events now say "Uses Import Policy" instead of, e.g., "All Users".

I've made these changes to the policy dialog:

  - Split it into more visually separate sections.
  - Added an explicit section for extended policies ("You must also have access to these other objects: ...").
  - Broken the object policy rules into a "Special Rules" section (for rules like "you can only see a revision if you can see the repository it is part of") and an "Object Policy" section (for the actual object policy).
  - Tried to make it a little more readable?
  - The new policy dialogs are great to curl up with in front of a fire with a nice cup of cocoa.

I've made these changes to infrastructure:

  - Implementing `PhabricatorPolicyInterface` no longer requires you to implement `describeAutomaticCapability()`.
  - Instead, implement `PhabricatorPolicyCodexInterface` and return a `PhabricatorPolicyCodex` object.
  - This "codex" is a policy rulebook which can set all the policy icons, labels, colors, rules, etc., to properly explain complex policies.
  - Broadly, the old method was usually either not useful (most objects have no special rules) or not powerful enough (objects with special rules often need to do more in order to explain them).

Test Plan:
{F1912860}

{F1912861}

{F1912862}

{F1912863}

Reviewers: chad

Reviewed By: chad

Subscribers: avivey

Maniphest Tasks: T11836

Differential Revision: https://secure.phabricator.com/D16830
2016-11-09 15:05:38 -08:00
epriestley
1747b4d318 Use "book" as the "Help" icon in the Remarkup toolbar
Summary: See D16811. I missed this while grepping because the other icon has two aliases (`life-buoy`, `life-ring`) and we were using one of each.

Test Plan: {F1912167}

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D16829
2016-11-08 15:27:47 -08:00
epriestley
87c4efdb63 Probably fix some display issues with all-day events?
Summary:
Ref T11801. These are pretty fiddly because users expect to see the end time for timed events ("10 AM - 11 AM" is ONE hour long) but not for all-day events ("Nov 2 - Nov 3" is TWO days long!)

We also want to store the thing the user actually entered so we don't lose data if they un-all-day the event later.

This may take a little more fiddling since it feels a little shaky, but I couldn't break this version immediately.

Test Plan: Imported a French holiday, got proper display in the UI.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11801

Differential Revision: https://secure.phabricator.com/D16815
2016-11-07 10:55:30 -08:00
epriestley
3e15e0b980 Store more datetime information on Calendar transactions and improve rendering behaviors
Summary:
Fixes T11805. Depends on D16785. This generally tries to smooth out transactions:

  - All-day stuff now says "Nov 3" instead of "Nov 3 12:00:00 AM".
  - Fewer weird bugs / extra transactions.
  - No more silly extra "yeah, you definitely set that event time" transaction on create.

Test Plan: Edited events; changed from all-day to not-all-day and back again, viewed transaction log.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11805

Differential Revision: https://secure.phabricator.com/D16786
2016-11-01 13:36:46 -07:00
epriestley
f7b0c09ac4 Make the "All Day Event" control use a checkbox instead of a dropdown
Summary:
This feels a little cleaner:

  - Clean up transaction log a bit.
  - Use a checkbox instead of a two-option dropdown.

This is a little messy because the browser doesn't send anything if the user submits a form with an un-clicked checkbox.

We now send a dummy value ("Hey, there's definitely a checkbox in this form!") so the server can figure out what to do.

Test Plan:
  - Edited all-dayness of an event.
  - Viewed transaction log.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D16776
2016-10-31 14:18:59 -07:00
epriestley
5e784c998b Fix some extra "changed the start time of this event" transactions
Summary: Ref T11326. Since we were missing an `(int)` cast here, the code ended up thinking that changing `12345` to `"12345"` was an edit. It isn't.

Test Plan: Created/edited events, no more extra "changed start time from X to the same X" transaction clutter.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11326

Differential Revision: https://secure.phabricator.com/D16773
2016-10-30 10:21:22 -07:00
Chad Little
1fdb8ba112 JX.Favicon for Conpherence
Summary: I think maybe these should be more separate from JX.Title, but seems to work ok. May build new favicons just for messages though. Proof of concept UI.

Test Plan: Send message on one browser, see red icon in other browser. Click on menu, count and favicon switch back to normal.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D16734
2016-10-20 12:17:50 -07:00
Chad Little
45af6d7c0e Set body classes via Quicksand config
Summary: Sends and stores additional body classes at the page level. Removes old ones, sets new ones.

Test Plan: home -> application search -> colored workboard -> config -> home with persistent chat open and minimized.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D16646
2016-10-01 16:36:28 -07:00
Chad Little
87ebb80059 Revert "Clean up more Quicksand"
Summary: This reverts commit 5eb4bc6ca9.

Test Plan: Reload homepage, no scrollbars

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D16645
2016-10-01 12:58:30 -07:00
Chad Little
5eb4bc6ca9 Clean up more Quicksand
Summary: Creates a background that renders inside the Quicksand frame, through sorcery.

Test Plan: Turn on Quicksand, visit lots of pages. See correct background colors. This probably blows something up I'm not testing.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D16642
2016-10-01 11:22:42 -07:00
Chad Little
6d82fcc6d7 Allow Durable Column to be minimized
Summary: Add ability to minimize durable column

Test Plan:
Shrink and Grow, reload page, see stickyness...

{F1855051}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D16638
2016-09-30 20:24:18 +00:00
Chad Little
1095347832 Add mobile upload button to Conpherence
Summary: Fixes T11622. Moves the remarkup upload button into the text area on mobile/tablet.

Test Plan: Mobile/Tablet/Desktop Conpherence

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T11622

Differential Revision: https://secure.phabricator.com/D16626
2016-09-29 16:25:47 +00:00
Chad Little
700666ae0a Make Conpherence Pontificate Send-on-Enter
Summary: Fixes T11623. Enables send-on-enter and shift-enter for linebreaks, per durable column. Also cleaned up UI for Joining Room or Logging In.

Test Plan: See room I can join, click Join Room. Leave Room, Log out, visit room with login prompt. Login, Join Room again.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T11623

Differential Revision: https://secure.phabricator.com/D16595
2016-09-27 19:54:07 -07:00
Chad Little
2e1c7da1bf Clean up some Conpherence header CSS
Summary: Darkens the topic, adds fun colors to action icons.

Test Plan: Hover over new action icons. See darker topic text.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D16556
2016-09-14 21:13:25 -07:00
Josh Cox
2588b4fac0 Added initial class for displaying invisible chars
Summary:
Fixes T11586. First pass at a class for displaying invisible characters. Still need to:
- Write a couple unit tests
- Add some styling to the .invisible-special spans
- Actually start using the class when displaying form errors to users

Currently this makes the string `"\nab\x00c\x01d\te\nf"` look like:

{F1812711}

Test Plan:
Unit tests all pass and run in <1ms:

{F1812998}

Reviewers: epriestley, #blessed_reviewers, chad

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley, yelirekim

Maniphest Tasks: T11586

Differential Revision: https://secure.phabricator.com/D16541
2016-09-12 21:57:01 -04:00
Chad Little
36fa4e5380 Use new Guide layout in Config->Welcome
Summary: Ref T11132, swaps in new UI for welcome page using guide modules

Test Plan: Test instance and non instance guides. Test each setting. Unclear on how to test people / Phacility. Just change the URL link?

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T11132

Differential Revision: https://secure.phabricator.com/D16482
2016-09-03 07:32:22 -07:00
epriestley
29957d196b Fix some more setIcon() issues
Summary: Fixes T11569. This fixes a known bad `setIcon()`. I also looked for more calls to `setIcon()` without success, and stubbed `setIcon()` so we're in good shape even if more exist.

Test Plan:
  - Grepped for `setIcon(` and manually inspect all 1,004 callsites to look for calls on `PHUIObjectItemView` objects.
  - Grepped for "high risk" callsites (`setIcon` in file after `PHUIObjectItemView`) and re-examined them. I identified these files with this command:

```
git ls-tree -r --name-only HEAD | xargs pcregrep -i -M -H -c --files-with-matches -o 'PHUIObjectItemView(.|\n)*setIcon'
```

There might be some more clever way to do that.
  - Since this only identified the callsites I already knew about and I don't have a ton of confidence that I didn't miss any, I put a stub in place that logs a deprecation warning. I'll file a followup to go clean these up in a month or so if the logs are clean.
  - Loaded Nuance, saw it work but warn.
  - Changed Nuance to use `setStatusIcon()`, loaded Nuance, no more fatal.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11569

Differential Revision: https://secure.phabricator.com/D16477
2016-08-31 10:00:03 -07:00
Chad Little
eac8171a63 Add some icons/color to Config Settings UI
Summary: This adds status icons, locked, hidden, editable, customized, to the list of options in config. Makes it easier to read and assertain state.

Test Plan:
View a hidden, customized, editable, and locked.

{F1796320}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D16475
2016-08-30 12:58:15 -07:00
Chad Little
00796e592b Move Setup Issues into it's own notification style menu
Summary: Ref T11132. This gets rid of the red bar for admins and instead shows a new menu item next to notifications/chat if there are unresolved configuration issues. Menu goes away if there are no issues. May move this later into the bell icon, but think think might be the right place to start especially for NUX and updates. Maybe limit the number of items?

Test Plan:
Tested with some, lots, and no config issues.

{F1790156}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T11132

Differential Revision: https://secure.phabricator.com/D16461
2016-08-29 10:43:30 -07:00
Chad Little
86231a9d6d Move Guides ObjectList styles to PHUIObjectItemListView
Summary: I plan to reuse these styles with Config, maybe also Almanac, etc.

Test Plan: Review /guides/, see same styles.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D16467
2016-08-29 09:27:10 -07:00
Josh Cox
d26cca27d7 Removing deprecated method calls
Summary: Removed call to the deprecated buildStandardPageResponse method from XHProfProfileController

Test Plan: Install, configure, and use XHProf. I'll need some guidance with this

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D16432
2016-08-23 03:26:34 -05:00
Chad Little
f379858874 Add setBackground to PHUIIconView
Summary: Ref T11132. Adds a background color option to PHUIIconView, for use whereever, and NUX. Also normalize icon placement for mixed image/icon result list.

Test Plan: Test in UIExamples, and Global Settings.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T11132

Differential Revision: https://secure.phabricator.com/D16424
2016-08-19 13:19:53 -07:00
Chad Little
e7aa874f5e Fix getIcon calls in PHUIObjectListItem
Summary: Fixes T11501. Let's you pass in a full PHUIIconView or just the icon name to give ObjectListItem a large icon.

Test Plan: Alamanac, Applications, Drydock, Settings, Search Typeahead, Config page...

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, PHID-OPKG-gm6ozazyms6q6i22gyam

Maniphest Tasks: T11501

Differential Revision: https://secure.phabricator.com/D16421
2016-08-19 09:35:09 -07:00
epriestley
1ecce60589 Keep setIcon() working for now on PHUIObjectItemView
Summary:
Ref T11501. This method was removed in D16418, but still has some callsites. I know of four:

  - Config
  - Settings
  - Drydock main page
  - Almanac main page

Since I might be missing some and it's close to the release cut, just put the method back for now until we can clean it up more properly.

Test Plan: Viewed Settings, Config, Drydock, Almanac. No more fatal on this method being missing.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11501

Differential Revision: https://secure.phabricator.com/D16420
2016-08-19 07:25:59 -07:00
Chad Little
1cca7fbcce Simplify PHUIObjectItemList a bit
Summary: I don't think we use footicons, removing that CSS. States were added but only used in Auth, convert them to statusIcon instead.

Test Plan: Visit Auth, UIExamples, grep for `setState`

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D16418
2016-08-18 12:27:41 -07:00
Chad Little
94c746e1d6 Rough in Guides Application
Summary: Ref T11132, Ref T11478. Builds out a basic PHUICMSView and Guides Application, no content / modules.

Test Plan: Go to /guides/, see blank states for new guides.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T11132, T11478

Differential Revision: https://secure.phabricator.com/D16414
2016-08-17 10:14:05 -07:00
Chad Little
679fbada44 Remove PHUIDocumentView
Summary: Converts final call site to PHUIDocumentViewPro.

Test Plan: grep for PHUIDocumentView, view new Welcome Page

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D16379
2016-08-08 09:39:48 -07:00
epriestley
3a002b6b83 Make new logo and wordmark more reasonably configurable by human users
Summary: Fixes T11437. Provides a normal form for configuring this, instead of weird "look up the PHID and adjust things in the database" stuff.

Test Plan:
{F1753651}

{F1753652}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11437

Differential Revision: https://secure.phabricator.com/D16377
2016-08-07 12:00:21 -07:00
Chad Little
52c0ec2700 Update Phabricator logo
Summary:
This updates the eye logo and removes the formal wordmark "Phabricator" as an image. Instead we'll use the new updated eye logo and plain text for "Phabricator", both of which are more friendly and less industrial.

Installs that already use the `header-logo` customization setting will need to rebuild their logo to 80px x 80px. They will then also get to use plain text to whitebox their install as they see fit.

Test Plan:
Tested new logo at desktop, tablet, and mobile sizes. Set a random instance name, saw new wordmark. Created a really long wordmark of MMMMMMMMMMMM, saw text cut off so UI doesn't break. May need some additional tweaking, but I think we covered the most edge cases here.

{F1751791, size=full}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: edibiase, bjshively, yelirekim, Korvin

Maniphest Tasks: T4214, T11096

Differential Revision: https://secure.phabricator.com/D16373
2016-08-07 11:35:21 -07:00
Chad Little
b53d38315f Fix Differental Filetree browser hotkey
Summary: Adds a class for explicitly hiding the sidenav.

Test Plan: Set Config to Enable Filetree. View a diff, see tree. Press `f`, see it go away. Reload page, see persistence.

Reviewers: avivey, epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D16359
2016-08-01 14:36:48 -07:00
Chad Little
11e84c166a Redesign Application Search
Summary: This moves aphront-side-nav to use same table css display as profile nav. Slightly less code to support. Cleans up AppSearch UI, think I've gotten all the edge cases here, but bang on it, can hold until after release cut.

Test Plan: Config, Maniphest, Differential, Diffusion, Home.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D16346
2016-08-01 12:23:36 -07:00
epriestley
2e41c85cc9 Clean up recurring event information on Calendar events
Summary: Ref T11326. This adds prev/next links for recurring events (ala D16179) and moves the "accept/decline" buttons closer to the invite list. This might need some fiddling, but should be a little more human-friendly.

Test Plan: {F1740541}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11326

Differential Revision: https://secure.phabricator.com/D16339
2016-07-28 10:59:28 -07:00
epriestley
eab74a9d7c Provide better headers and crumbs for Calendar result views
Summary:
Ref T11326. This isn't perfect, but should be a little easier to use and less weird/confusing.

Generally, provide a "Query > Month > Day" crumb on day views, and a "Wed, July 3" header.

Generally, provide a "Query > Month" crumb on month views, and a "July 2019" header.

Also try to fix a bit of padding/spacing on the day view.

Test Plan: {F1739128}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11326

Differential Revision: https://secure.phabricator.com/D16338
2016-07-27 09:44:56 -07:00
epriestley
ef6c689e87 When a Calendar day has too many events, show a "More..." link
Summary: Fixes T8361.

Test Plan: {F1739073}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8361

Differential Revision: https://secure.phabricator.com/D16337
2016-07-27 09:44:35 -07:00
epriestley
89f6764e1b Give Calendar days from adjacent months a background color hint
Summary:
Ref T11326. When viewing "February", add a class to dates in January and March to let them be styled a little differently as a UI hint.

For now, I've given them a grey background. (Calendar.app changes the date number color instead.)

Test Plan: {F1738990}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11326

Differential Revision: https://secure.phabricator.com/D16336
2016-07-27 09:38:18 -07:00
epriestley
aee9d88c17 Give the Calendar month view a nice hover effect
Summary:
Ref T11326. Currently, we link Calendar days using hidden DOM nodes.

This is nice because it's simple, and right-clicking a day works properly. However, it's a bit ugly/unintuitive, messy, and unclear. It's especially messy because days are really two different rows, one for events and one for day/week numbers.

Instead, use JS to highlight day cells. You can still right-click by clicking the actual day number, which seems like a reasonable compromise.

Test Plan: {F1738941}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11326

Differential Revision: https://secure.phabricator.com/D16334
2016-07-27 09:36:07 -07:00
epriestley
020df6f5cb Add a numeric input control for TOTP codes
Summary:
Fixes T11365. I tested these variants:

  - `<input type="number" />`
  - `<input type="text" pattern="\d*" />`

Of these, this one (using `pattern`) appears to have the best behavior: it shows the correct keyboard on iOS mobile and does nothing on desktops.

Using `type="number"` causes unwanted sub-controls to appear in desktop Safari, and a numbers + symbols keyboard to appear on iOS (presumably so users can type "." and "-" and maybe ",").

Test Plan: Tested variants in desktop browsers and iOS simulator, see here and T11365 for discussion.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11365

Differential Revision: https://secure.phabricator.com/D16323
2016-07-23 21:13:47 -07:00
epriestley
4859a33739 Make Calendar day view a little more consistent
Summary: Ref T11326. This just cleans things up a little and removes some of the obvious layout/CSS issues.

Test Plan:
- Viewed day view before/after. Also viewed profile panel.

Before:

{F1725547}

After:

{F1725548}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11326

Differential Revision: https://secure.phabricator.com/D16308
2016-07-15 14:24:29 -07:00
epriestley
b6c3d184d2 Make Calendar month view events render a little more consistently
Summary:
Ref T11326. This just inches things forward a little bit:

  - Make it easier to see current day.
  - Line-through cancelled events.
  - Don't colorize the whole event title, just use an Attending/Invited/Custom icon.
  - Slightly subtler treatment for all-day events.

Test Plan: See screenshot in T11326.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11326

Differential Revision: https://secure.phabricator.com/D16306
2016-07-15 13:24:54 -07:00
epriestley
08ac49e15a Remove old paged forms
Summary:
Ref T11326. This gets rid of the old multi-paged form stuff used in the last version of Diffusion.

This incidentally removes a callsite for a date control to make it a little easier to simplify them.

Test Plan: Grepped for all removed classes, no more callsites.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11326

Differential Revision: https://secure.phabricator.com/D16302
2016-07-14 13:05:59 -07:00
epriestley
8062423271 Respect 12 hour vs 24 hour time formats in Calendar day views
Summary: Fixes T9202.

Test Plan:
  - Viewed day in 12-hour, saw "8:00 PM".
  - Viewed day in 24-hour, saw "16:00".

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9202, T10932

Differential Revision: https://secure.phabricator.com/D16290
2016-07-13 15:39:20 -07:00
Aviv Eyal
1a303e7d2a Make "/" focus the search input again
Summary:
See D1902, T989, T11263, D15984, T4103 , D15976, https://secure.phabricator.com/w/changelog/2016.22/, T2527, T11231, T8286, T11264 for discussion!

When we get another copy of T989, I will rename it to "Build a complicated keybinding settings page like a cool video game" and leave it open forever.

Test Plan: Pressed "/" in Firefox, had my pristine browsing experience inexplicably hijacked by this horrible application.

Reviewers: avivey, chad

Reviewed By: avivey

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15984
2016-07-08 14:18:35 -07:00
epriestley
bd6d300282 Strip timestamps from popup notification bubbles
Summary:
Fixes T11097. Currently, popup notifications show a useless timestamp with the current time, after D16041 made some things more consistent.

Strip these from the popup bubbles.

Test Plan:
  - Saw a popup bubble, no timestamp.
  - Viewed main notification list, saw timestamps.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11097

Differential Revision: https://secure.phabricator.com/D16258
2016-07-08 07:46:09 -07:00
epriestley
c7e7f113fd Open "Help" menu links in a new window
Summary: Fixes T11243. Seems reasonable to open this stuff in a new window so you don't put any application state in Herald, etc., at risk -- looking in this menu for help with a currently-executing workflow is reasonable and normal.

Test Plan: Clicked a help menu link, saw it open in a new page.

Reviewers: avivey, chad

Reviewed By: chad

Maniphest Tasks: T11243

Differential Revision: https://secure.phabricator.com/D16230
2016-07-04 10:59:40 -07:00
epriestley
dc37789d53 Build that thing someone posted a screenshot of on Facebook
Summary: Seemed kinda cool.

Test Plan: {F1707244}

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D16210
2016-07-01 04:36:24 -07:00
epriestley
2c43d055b1 Remove old ObjectBox tab cruft
Summary: Ref T10628. Cleans up remaining weird, unused tab behaviors in ObjectBoxView to simplify ObjectBox.

Test Plan: Toggled tabs in Files.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10628

Differential Revision: https://secure.phabricator.com/D16208
2016-06-30 18:50:25 -07:00
epriestley
5a4ecc7a9c Convert "Diff Details" tabs to PHUITabGroup
Summary:
Ref T10628. Switch this to be nicer and more modern.

  - When there's only one tab, add an option to hide it.

Test Plan:
  - Viewed normal revisions (no tabs).
  - Viewed X vs Y revisions (two tabs, rightmost tab selected by default).

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10628

Differential Revision: https://secure.phabricator.com/D16206
2016-06-30 18:49:51 -07:00
epriestley
189910d615 Make TabGroups a standalone UI element
Summary:
Ref T10628. Currently, tabs are part of ObjectBoxes. However, the code is a bit of a mess and I want to use them in some other contexts, notably the "prose diff" dialog to show "old raw, new raw, diff".

Pull them out, and update Files to use the new stuff. My plan is:

  - Update all callsites to this stuff.
  - Remove the builtin-in ObjectBox integration to simplify ObjectBox a bit.
  - Move forward with T10628.

This is pretty straightforward. A couple of the sigils are a little weird, but I'll update the JS later. For now, the same JS can drive both old and new tabs.

Test Plan: Viewed files, everything was unchanged.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10628

Differential Revision: https://secure.phabricator.com/D16205
2016-06-30 18:49:37 -07:00
epriestley
7a315780b4 When using the "Close as Duplicate" relationship action, limit the UI to 1 task
Summary:
Ref T4788. When closing a task as a duplicate of another task, you can only select one task, since it doesn't really make sense to merge one task into several other tasks (this operation is //possible//, but probably not what anyone ever wants to do, I think?).

Make the UI understand this: after you select a task, disable all of the "select" buttons in the UI to make this clear.

Test Plan:
  - Used "Close as Duplicate", only allowed to select 1 task.
  - Used other editors like "Merge Duplicates In", allowed to select lots of tasks.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4788

Differential Revision: https://secure.phabricator.com/D16203
2016-06-30 13:48:21 -07:00
epriestley
7574f8dcf5 When all actions in a submenu are disabled, disable the submenu header
Summary: Fixes T11240. Also simplify things a little and share a bit more code.

Test Plan:
  - Viewed revisions and tasks, opened submenu.
  - Viewed as a user without edit permission, saw the menus greyed out.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11240

Differential Revision: https://secure.phabricator.com/D16201
2016-06-30 10:57:33 -07:00
epriestley
60c55387ab Don't show client-side setup prompts until user accounts activate
Summary: Fixes T11198. These are confusing or premature if you aren't an activated user: disabled or unapproved accounts won't be able to act on them.

Test Plan: Changed timezone, went through flow to correct it

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11198

Differential Revision: https://secure.phabricator.com/D16167
2016-06-22 11:54:15 -07:00
epriestley
dbf13f79e9 Allow the object selector dialog to be resized
Summary: Ref T11179.

Test Plan: Dragged the resize handle around, saw the dialog change size.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11179

Differential Revision: https://secure.phabricator.com/D16165
2016-06-22 11:17:51 -07:00
epriestley
4bbe6f307a Resolve relationship edit conflicts more naturally
Summary:
Ref T11179. Ref T4768. Currently, on `master`, if two users open "Edit Revisions" at the same time, then add revisions A and B, only the last state wins (just "B").

Instead, apply these as "add A" and "add B" so they merge in a natural way.

Test Plan:
  - Opened edit dialog in two windows.
  - Added "A" in one, "B" in the other.
  - Saved both.
  - Saw "Added A" and "Added B" transactions, instead of "Added A" and "Removed A, added B".

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4768, T11179

Differential Revision: https://secure.phabricator.com/D16164
2016-06-22 11:17:30 -07:00
epriestley
bf62badfda Modularize "related objects" menu items in Maniphest
Summary:
Ref T11179. This generates the Maniphest menu items in a modular way. It doesn't change any of the underlying code yet.

Searching for commits doesn't work particularly well so I've just hidden that for now, but the item itself works fine.

Test Plan: {F1696849}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11179

Differential Revision: https://secure.phabricator.com/D16162
2016-06-22 11:16:16 -07:00
epriestley
56d3197fe0 Fold task-relationship actions into an accordion dropdown
Summary:
Ref T11179. Alternative to D16152. I think this turned out a bit better than the other one did.

Currently, we render two copies of the menu (one for mobile, one for desktop). A big chunk of this is sharing the nodes instead: when you open the mobile dropdown menu, it steals the nodes from the document. When you close it, it puts them back. Magic! Sneaky!

Test Plan:
{F1695499}

{F1695500}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11179

Differential Revision: https://secure.phabricator.com/D16157
2016-06-20 19:14:27 -07:00
epriestley
3198aa1659 Allow dialogs to opt in to being resizable
Summary: Ref T11034. Ref T4788. This allows you to resize the typeahead browse dialog if you want. I plan to let you resize the object selector dialog in the future.

Test Plan: {F1695433}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4788, T11034

Differential Revision: https://secure.phabricator.com/D16156
2016-06-20 19:13:58 -07:00
epriestley
851aba80ce Render dropdown metadata earlier
Summary:
Ref T11179. One issue I'm getting with trying to turn actions into dropdowns is that we currently render this menu very late, which can cause us to try to add more metadata after we start resolving metadata. This won't work right now (and making it work seems unreasonably complicated), so stop doing it and fatal if something tries.

(This might make some things fatal but //should// be safe -- anything that fatals should have been broken already.)

Test Plan:
Browsed around looking for fatals, didn't see any.

(This primarily avoids a broken state / fatal in a future diff.)

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11179

Differential Revision: https://secure.phabricator.com/D16151
2016-06-20 15:35:29 -07:00
Asher Baker
f0eb6f4fe0 Add client-side check for protocol mismatch
Summary:
Fixes T10402.
I tried about 50 variations on the wording and notification layout, this seemed by far the most reasonable.
Didn't implement a way to ignore the warning, which might be required - but figured this is serious and broken enough while being completely invisible 99% of the time that it's worth shouting about.

Test Plan: Messed around with $_SERVER['HTTPS'] on the server side and client_uri on the client side - saw reasonable results in all combinations.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley

Maniphest Tasks: T10402

Differential Revision: https://secure.phabricator.com/D16064
2016-06-07 15:54:48 +00:00
epriestley
fc45de29a6 Modernize various menu collapse settings
Summary: Ref T4103. Fully modernize the filetree show/hide, durable column show/hide, and profile menu collapse/wide settings.

Test Plan:
  - Toggled filetree on/off, reloaded page, setting stuck.
  - Same with conpherence column and profile menus.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4103

Differential Revision: https://secure.phabricator.com/D16034
2016-06-04 14:44:36 -07:00
epriestley
109917a94b Turn DarkConsole settings into real settings
Summary:
Ref T4103. These settings long-predate proper settings and are based on hard-coded user properties. Turn them into real settings.

(I didn't try to migrate the value since they're trivial to restore and only useful to developers.)

Test Plan:
  - Toggled console on/off.
  - Swapped tabs.
  - Reloaded page, everything stayed sticky.

Reviewers: chad

Reviewed By: chad

Subscribers: eadler

Maniphest Tasks: T4103

Differential Revision: https://secure.phabricator.com/D16029
2016-06-04 14:43:43 -07:00
epriestley
44e88f186c Modernize "favorite project policies" setting
Summary:
Ref T4103. Convert this into a proper internal setting and use transactions to mutate it.

Also remove some no-longer-used old non-modular settings constants.

Test Plan:
  - Used policy dropdown, saw recently-used projects.
  - Selected some new projects, saw them appear.
  - Grepped for all removed constants.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4103

Differential Revision: https://secure.phabricator.com/D16027
2016-06-04 14:42:11 -07:00
epriestley
67482fd19d Continue modernizing application access to user preferences
Summary:
Ref T4103. This is just incremental cleanup:

  - Add "internal" settings, which aren't editable via the UI. They can still do validation and run through the normal pathway. Move a couple settings to use this.
  - Remove `getPreference()` on `PhabricatorUser`, which was a sort of prototype version of `getUserSetting()`.
  - Make `getUserSetting()` validate setting values before returning them, to improve robustness if we change allowable values later.
  - Add a user setting cache, since reading user settings was getting fairly expensive on Calendar.
  - Improve performance of setting validation for timezone setting (don't require building/computing all timezone offsets).
  - Since we have the cache anyway, make the timezone override a little more general in its approach.
  - Move editor stuff to use `getUserSetting()`.

Test Plan:
  - Changed search scopes.
  - Reconciled local and server timezone settings by ignoring and changing timezones.
  - Changed date/time settings, browsed Calendar, queried date ranges.
  - Verified editor links generate properly in Diffusion.
  - Browsed around with time/date settings looking at timestamps.
  - Grepped for `getPreference()`, nuked all the ones coming off `$user` or `$viewer` that I could find.
  - Changed accessiblity to high-contrast colors.
  - Ran all unit tests.
  - Grepped for removed constants.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4103

Differential Revision: https://secure.phabricator.com/D16015
2016-06-04 14:37:56 -07:00
epriestley
ebd8f3c987 Make translation, timezone and pronoun into real settings
Summary:
Ref T4103. These are currently stored on the user, for historic/performance reasons.

Since I want administrators to be able to set defaults for translations and timezones at a minimum and there's no longer a meaningful performance penalty for moving them off the user record, turn them into real preferences and then nuke the columns.

Test Plan:
  - Set settings to unusual values.
  - Ran migrations.
  - Verified my unusual settings survived.
  - Created a new user.
  - Edited all settings with old and new UIs.
  - Reconciled client/server timezone disagreement.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4103

Differential Revision: https://secure.phabricator.com/D16005
2016-06-02 06:29:47 -07:00
epriestley
edfc6a6934 Convert some loadPreferences() to getUserSetting()
Summary:
Ref T4103. This doesn't get everything, but takes care of most of the easy stuff.

The tricky-ish bit here is that I need to move timezones, pronouns and translations to proper settings. I expect to pursue that next.

Test Plan:
- Grepped for `loadPreferences` to identify callsites.
- Changed start-of-week setting, loaded Calendar, saw correct start.
- Visited welcome page, read "Adjust Settings" point.
- Loaded Conpherence -- I changed behavior here slightly (switching threads drops the title glyph) but it wasn't consistent to start with and this seems like a good thing to push to the next version of Conpherence.
- Enabled Filetree, toggled in Differential.
- Disabled Filetree, no longer visible in Differential.
- Changed "Unified Diffs" preference to "Small Screens" vs "Always".
- Toggled filetree in Diffusion.
- Edited a task, saw sensible projects in policy dropdown.
- Viewed user profile, uncollapsed/collapsed side nav, reloaded page, sticky'd.
- Toggled "monospaced textareas", used a comment box, got appropriate fonts.
- Toggled durable column.
- Disabled title glyphs.
- Changed monospaced font to 18px/36px impact.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4103

Differential Revision: https://secure.phabricator.com/D16004
2016-06-02 06:29:20 -07:00
epriestley
9b27b5c7da Convert "Display Preferences" to modular settings
Summary: Ref T4103. Just porting these directly for now, no attempt to organize things yet.

Test Plan: {F1669263}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4103

Differential Revision: https://secure.phabricator.com/D15997
2016-06-01 04:44:46 -07:00