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

2110 commits

Author SHA1 Message Date
epriestley
0a554c2ed5 Allow profile menus to be collapsed and expanded
Summary:
Ref T10054. I think this gets everything except:

  - circles on icons;
  - I spent ~15 minutes poking at animations but wasn't able to get anything that looked reasonable whatsoever.

Test Plan:
  - Collapsed menus.
  - Expanded menus.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10054

Differential Revision: https://secure.phabricator.com/D15056
2016-01-19 13:16:54 -08:00
epriestley
bf18b59f5f Update quickstart template
Summary: This hasn't been updated in about 6 months, and keeping it fresh makes tests and instance launches a little faster.

Test Plan: Ran `storage upgrade` on clean namespaces before and after patch, got ~5.6s before and ~4.2s after.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15055
2016-01-19 10:08:11 -08:00
Chad Little
f7646b40aa Remove defunt project image choices
Summary: These are old project image choices, remove and only go with FontAwesome related images.

Test Plan: Project -> Edit Picture -> Save

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15051
2016-01-19 08:50:59 -08:00
Chad Little
550793f9a4 Remove header gradients for flat colors
Summary: Removes header gradient images for flat, CSS controlled colors. I didn't convert the "pony" colors over, going with few options for easier theme-ability.

Test Plan:
Test each color choice.

{F1063828}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15052
2016-01-19 07:17:02 -08:00
Chad Little
2144d877ee PHUIIconCircleView
Summary: Icon in a circle. Base class, not much in the way of color choices.

Test Plan:
UIExamples, Chrome.

{F1062027}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15034
2016-01-18 09:02:58 -08:00
epriestley
5d0222d532 Fix an issue where the profile menu could become enormous
Summary: Ref T10054. Without `max-width`, Safari can make this too large with a long project name (maybe because of `table-cell`?).

Test Plan: Saw normal-width menu instead of huge menu on very long project.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10054

Differential Revision: https://secure.phabricator.com/D15046
2016-01-18 08:47:25 -08:00
epriestley
7ab970d1a7 Eat right-click, etc., on autocomplete suggestion menu
Summary:
Ref T10163. If you right-click the suggestion menu, just eat it. I don't think we can really choose a different behavior reasonably, or that users have any reason to do this.

I'm leaving "clicking the header dismisses it", I think that behavior is fine and reasonable.

Test Plan: Control-clicked a suggestion menu, didn't trigger a suggestion.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10163

Differential Revision: https://secure.phabricator.com/D15042
2016-01-16 15:52:26 -08:00
epriestley
b7fe07bbd6 When autocompleting, add a space if a user didn't already add something
Summary: Ref T10163. When a user autocompletes, add a space for them, unless they already added a comma, colon, or space themsevles.

Test Plan: Autocompleted `@dog`, got `@dog `. Autocompleted `@epriestley,` got `@epriestley,`.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10163

Differential Revision: https://secure.phabricator.com/D15041
2016-01-16 15:18:49 -08:00
epriestley
75781dba1a Improve autocomplete behavior in lists and with noncompleting results
Summary:
Ref T10163. Currently, we don't activate on indented lines, but were too aggressive about this, and would not activate on lines like `  - Hey, @user...`, where we should.

Instead, don't activate on indented lines if there's only an indent (i.e., `#` probably means enumerated list).

Also, if results don't have autocompletes (rare but possible with projects missing slugs), improve behavior.

Test Plan:
  - Typed `  #a`, got no autocomplete.
  - Missing slug thing is a pain to test locallly, `#1 z z z z` reproduces in production. I'll just verify it there.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10163

Differential Revision: https://secure.phabricator.com/D15040
2016-01-16 15:18:24 -08:00
epriestley
75b8d3312b Hide the autocompleter intelligently when you ignore it and keep typing
Summary:
Ref T10163. When we think the user has finished typing a word (because they typed a space, period, or other similar characters) and nothing else they might type could possibly change the outcome (usually because the words they have typed already match nothing), just deactivate the autocomplete.

As a special case, if the word they have typed already select exactly one result, //and// they have already typed exactly that result,  assume they just typed it from memory and deactivate.

Test Plan:
  - Typed `@dog qwer zxcv` and saw autocomplete deactivate on the space before `z` (on my local install, `@dog` is ambiguous but `@dog qwer` matches nothing).
  - Typed `@epriestley ` and saw autocomplete deactivate on space.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10163

Differential Revision: https://secure.phabricator.com/D15039
2016-01-16 14:41:43 -08:00
epriestley
849b4c765a When the autocompleter would fall off the bottom of the screen, put it above the text instead
Summary: Ref T10163. In cases like Conpherence, the autocompleter can currently render off the bottom of the screen. Put it above if it would be offscreen.

Test Plan: {F1062286}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10163

Differential Revision: https://secure.phabricator.com/D15038
2016-01-16 14:38:25 -08:00
epriestley
14ebf662f3 Don't show the autocompleter until the user types at least one character
Summary: Ref T10163. Activate on `@d`, not just `@`. Note that if you type `@d` and then press delete once so you're left with `@`, we stay active (and show the "type a username" hint).

Test Plan:
  - Typed `@`, no completer.
  - Typed `d`, got completer.
  - Typed delete, still had completer, now showing hint prompt.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10163

Differential Revision: https://secure.phabricator.com/D15037
2016-01-16 14:38:11 -08:00
epriestley
4f3a9a8aca Immediately cancel autocomplete if the user types certain characters anywhere
Summary:
Ref T10163. Some characters are almost certainly punctuation or markup rather than autocomplete requests. Immediately cancel any active autocomplete when the user types one of these.

Note that some of these are also suffix characters. If you type `@dog,`, you have until the next character to decide you actually mean to autocomplete. Once you type something else we deactivate.

If you type `#dog#` or `##`, we deactivate immediately.

Test Plan: Typed `@dog#`, etc.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10163

Differential Revision: https://secure.phabricator.com/D15036
2016-01-16 14:38:00 -08:00
epriestley
df272dfa26 Allow autocomplete to activate after ">", ":" or "!"
Summary: Ref T10163. This allows activation in blockquotes or after `NOTE:`, for consistency.

Test Plan: Typed `>@dog`, etc., got autocomplete.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10163

Differential Revision: https://secure.phabricator.com/D15035
2016-01-16 13:28:48 -08:00
epriestley
2d495e9701 Improve autocomplete behavior when typing ordered lists
Summary:
Ref T10163.

  - If a user types an autocomplete character ("@" or "#") and then a space, deactivate immediately (probably an ordered list).
  - If a user types an autocomplete character indented on a line with no other prior text, don't activate (probably an ordered list or code block).

Test Plan:
Typed:

  - `# `, saw immediate deactivation.
  - ` #`, saw no activation in the first place.
  - `#x`, saw activation.
  - `asdf #x`, saw activation.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10163

Differential Revision: https://secure.phabricator.com/D15033
2016-01-15 11:19:04 -08:00
epriestley
7f19216e44 Better fix for autocomplete blur (select on mousedown instead of delaying blur)
Summary: Ref T10163. I would still sometimes not get a replacement after clicking with the delayed blur. This seems to fix the issue more consistently: instead of listening for a click event (which fires after the blur), listen for a mousedown event (which fires before the blur).

Test Plan: Observed consistent selection via mouse locally.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10163

Differential Revision: https://secure.phabricator.com/D15032
2016-01-15 09:47:23 -08:00
epriestley
3c19004f9f Fix blur and sort behavior for autocomplete
Summary:
Ref T10163.

  - If you click a result, we get a blur before your click hits, and deactivate before the click can work. Instead, wait before responding to blur.
  - Use the standard sort handler which puts unixnames over human names. Also use the standard filter which deals with disabled users not matching unless they're the only match.

Test Plan:
  - Clicked a result, got a replacement.
  - Named myself "dog dog", typed "@dog", user "@dog" was now first match despite me being "@admin".
  - Used normal typeaheads to make sure I didn't break sort handler.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10163

Differential Revision: https://secure.phabricator.com/D15031
2016-01-15 09:33:15 -08:00
epriestley
77447fc945 Add a motivational profile menu panel
Summary: Motivate your employees with inspirational quotes. A new quote every day!

Test Plan: So inspirational.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15026
2016-01-15 09:14:24 -08:00
epriestley
22aebab1c1 Add a visual divider element to profile menus
Summary: Ref T10054.

Test Plan: {F1061529}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10054

Differential Revision: https://secure.phabricator.com/D15024
2016-01-15 09:14:01 -08:00
epriestley
f4c8cdb39a Remove icon nav entirely
Summary: Ref T10054. People, projects, and instances no longer use icon nav, so we can get rid of it in favor of profile menus.

Test Plan: Grepped for everything, looked through workboards/profiles again.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10054

Differential Revision: https://secure.phabricator.com/D15022
2016-01-15 09:13:39 -08:00
epriestley
c019f76283 Make profile menu full-height
Summary:
Ref T10054. This makes the profile menu full-height. It uses two pieces of dark magic:

  - `calc()`, which allows you to do math in CSS.
  - The `vh` unit, which is CSS for "viewport height".

Apparently this kind of stuff just works now? CSS got good at some point?

Test Plan:
  - Page looks correct in Safari, Chrome, Firefox.
  - Checked `caniuse.com` for `vh` and `calc()`, saw they're supported?

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10054

Differential Revision: https://secure.phabricator.com/D15017
2016-01-15 09:12:34 -08:00
epriestley
468031d1fd Rough initial cut of profile new profile menu
Summary:
Ref T10054. I haven't done any of the big-picture layout stuff yet, but this should get look-and-feel somewhere in the ballpark of reasonablness, I think.

Major missing stuff:

  - No "collapse" state or action yet.
  - Menu is not full-height (requires changes to the rendering pipeline).

Test Plan: {F1060941}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10054

Differential Revision: https://secure.phabricator.com/D15016
2016-01-15 09:12:09 -08:00
epriestley
5d6dd7df7d Add a basic remarkup typeahead for users and projects
Summary: Ref T3725. This probably has 900,000 bugs. This will need updates for subprojects/milestones.

Test Plan:
  - Tested very gently in Safari, Firefox and Chrome.
  - Reasonable inputs appear to work.
  - Clicking, escape, tab, return, arrow keys work OK?

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T3725

Differential Revision: https://secure.phabricator.com/D15029
2016-01-15 09:11:46 -08:00
epriestley
1c5167dc74 Allow profile menu items to be reordered
Summary: Ref T10054. Allows users to drag menu items to reorder them.

Test Plan: Reordered a project menu.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10054

Differential Revision: https://secure.phabricator.com/D15011
2016-01-13 11:45:57 -08:00
epriestley
f24318f308 Make "profile menu" configuration mostly work
Summary:
Ref T10054. This does a big chunk of the legwork to let users reconfigure profile menus (currently, just project menus).

This includes:

  - Editing builtin items (e.g., you can rename the default items).
  - Creating new items (for now, only links are available).

This does not yet include:

  - Hiding items.
  - Reordering items.
  - Lots of fancy types of items (dashboards, etc).
  - Any UI changes.
  - Documentation (does feature: TODO link for documentation).

Test Plan:
{F1060695}

{F1060696}

{F1060697}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10054

Differential Revision: https://secure.phabricator.com/D15010
2016-01-13 11:45:31 -08:00
epriestley
fdd5500fec Change wording of "Show Entire File" to "Show All Context"
Summary: Fixes T10139. This clarification seems reasonable to me.

Test Plan:
  - Viewed a revision with context.
  - Clicked "Show All Context".
  - Saw "All Context Shown".

{F1060624}

{F1060625}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10139

Differential Revision: https://secure.phabricator.com/D15009
2016-01-13 11:09:01 -08:00
epriestley
1eab16c395 Move repository URIs to a dedicated index
Summary:
Ref T4705 (there are also some other adjacent related tasks dealing with URIs).

Currently, we issue a "get repositories matching URIs: ..." query by loading every possible repository and then checking their URIs in PHP.

Instead, put URIs in a separate table. I plan for each repository to potentially have multiple URIs soon, so this prepares for that.

Test Plan:
  - Ran migrations.
  - Looked at index table, made sure it appeared sensible.
  - Ran some queries by `uri` to find repositories, found the repositories I expected.
  - Updated the remote URI of a repository, saw queries / index update appropriately.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4705

Differential Revision: https://secure.phabricator.com/D15005
2016-01-13 09:34:31 -08:00
epriestley
9fb929dff3 Show repositories in global autocomplete dropdown
Summary: Fixes T9523.

Test Plan: {F1059225}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9523

Differential Revision: https://secure.phabricator.com/D14994
2016-01-11 09:32:23 -08:00
epriestley
96ebd35824 Change repository "Clone/Checkout As" to "Short Name"
Summary:
Ref T4245.

  - Rename "Clone/Checkout As" to "Short Name" in the UI.
  - Allow any repository to have a short name, not just hosted repositories.

Test Plan:
  - Ran migration.
  - Reviewed old transactions, saw they looked good.
  - Edited an existing repository's short name.
  - Gave an imported repository a new short name.
  - Removed a repository's short name.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D14989
2016-01-11 09:17:32 -08:00
epriestley
5a723bff91 Support synthetic submits from stacked actions
Summary: Fixes T10116.

Test Plan:
  - Prior to patch: Control/Command + Enter submitted form but ignored actions.
  - After patch: verifid command + enter submits actions.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10116

Differential Revision: https://secure.phabricator.com/D14991
2016-01-11 09:16:53 -08:00
epriestley
0b3d10c3da Enforce sensible, unique clone/checkout names for repositories
Summary:
Fixes T7938.

  - Primarily, users can currently shoot themselves in the foot by putting `../../etc/passwd` and other similar nonsense in these fields (this is not dangerous, but also does not work). Require sensible names.
  - Enforce uniqueness so these names can be used in URIs and as identifiers in the future.
  - (This doesn't start actually using them for anything fancy yet.)

Test Plan:
  - Gave several repositories clone names: a valid name, two duplicate names, an invalid, name, some with no names.
  - Ran migrations.
  - Got clean conversion for valid names, appropriate errors for invalid/duplicate names.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T7938

Differential Revision: https://secure.phabricator.com/D14986
2016-01-11 02:06:44 -08:00
epriestley
01fba34327 Give <hr /> in remarkup clear: both
Summary: Ref T10110.

Test Plan:
Before:

{F1058545}

After:

{F1058546}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10110

Differential Revision: https://secure.phabricator.com/D14984
2016-01-10 09:34:14 -08:00
epriestley
9ab22e21b3 Allow installs to customize project icons
Summary:
Ref T10010. Ref T5819. General alignment of the stars:

  - There were some hacks in Conduit around stripping `fa-...` off icons when reading and writing that I wanted to get rid of.
  - We probably have room for a subtitle in the new heavy nav, and using the icon name is a good starting point (and maybe good enough on its own?)
  - The project list was real bad looking with redundant tag/names, now it is very slightly less bad looking with non-redundant types?
  - Some installs will want to call Milestones something else, and this gets us a big part of the way there.
  - This may slightly help to reinforce "tag" vs "policy" vs "group" stuff?

---

I'm letting installs have enough rope to shoot themselves in the foot (e.g., define 100 icons). It isn't the end of the world if they reuse icons, and is clearly their fault.

I think the cases where 100 icons will break down are:

  - Icon selector dialog may get very unwieldy.
  - Query UI will be pretty iffy/huge with 100 icons.

We could improve these fairly easily if an install comes up with a reasonable use case for having 100 icons.

---

The UI on the icon itself in the list views is a little iffy -- mostly, it's too saturated/bold.

I'd ideally like to try either:

  - rendering a "shade" version (i.e. lighter, less-saturated color); or
  - rendering a "shade" tag with just the icon in it.

However, there didn't seem to be a way to do the first one right now (`fa-example sh-blue` doesn't work) and the second one had weird margins/padding, so I left it like this for now. I figure we can clean it up once we build the thick nav, since that will probably also want an identical element.

(I don't want to render a full tag with the icon + name since I think that's confusing -- it looks like a project/object tag, but is not.)

Test Plan:
{F1049905}

{F1049906}

Reviewers: chad

Reviewed By: chad

Subscribers: 20after4, Luke081515.2

Maniphest Tasks: T5819, T10010

Differential Revision: https://secure.phabricator.com/D14918
2016-01-08 14:01:53 -08:00
epriestley
c7520cd9f2 Improve rendering of commit branching graph
Summary:
Fixes T9323. Two minor fixes:

  - On the first commit, don't render a downward line.
  - Clean up a 1px spacing issue that had cropped up a while ago when we added icons or something, I think.

Test Plan:
Before:

{F1057248}

After:

{F1057249}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9323

Differential Revision: https://secure.phabricator.com/D14974
2016-01-08 11:52:07 -08:00
Chad Little
fe6224f505 Add Next and Previous UI to PhamePostView
Summary: Creates a new next/previous UI for PhamePosts, and adds a setFoot to PHUIDocumentViewPro for future use in other apps.

Test Plan:
Test first, next, last posts on Phame in mobile, desktop, and tablet breakpoints.

{F1050152}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14919
2015-12-31 13:09:59 -08:00
epriestley
972788b8b5 Give IconSetControl a meaningful disabled state
Summary: Ref T10004. This control doesn't disable visually or behaviorally, e.g. when locked in an EditEngine configuration.

Test Plan:
  - Locked field for Projects.
  - Reviewed form in EditEngine.
  - Created/edited a project.
  - Swapped default.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10004

Differential Revision: https://secure.phabricator.com/D14911
2015-12-30 14:42:27 -08:00
epriestley
7c5ad63fd1 Add very basic UI for creating milestones and subprojects
Summary:
Ref T10010. This has a lot of UI/UX problems but I think it:

  - technically allows subproject creation;
  - technically allows milestone creation;
  - doesn't let users unwittingly destroy their installs (probably).

Test Plan:
  - Created milestones.
  - Created subprojects.
  - Created and edited normal projects.
  - Observed some reasonable interactions (e.g., you can't create milestones for a milestone or edit a superproject's members).
  - Observed plenty of silly/confusing interactions that need additional work.

{F1046657}

{F1046658}

{F1046655}

{F1046656}

{F1046654}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10010

Differential Revision: https://secure.phabricator.com/D14904
2015-12-29 10:40:16 -08:00
epriestley
373ff7f9d4 Read materialized project members instead of real members
Summary:
Ref T10010. This will allow us to find superprojects with `withMemberPHIDs(...)` queries.

  - Copy all the current real member edges to materialized member edges.
  - Redirect all reads to look at materialized members.
  - This table is already kept in sync by earlier work with indexing.

Basically, flow is:

  - Writes (joining, leaving, adding/removing members) write to the real member edge type.
  - After a project's members change, they're copied to the materialized member edge type for that project and all of its superprojects.
  - Reads look at materialized members, so "Parent" sees the members of "Child" and "Grandchild" as its own members, but we still have the "real members" edge type to keep track of "natural" or "direct" members.

Test Plan:
  - Ran migration.
  - Ran unit tests.
  - Saw the same projects as projects I was a member of.
  - Added some `var_dump()` stuff to verify the Owners changed.
  - Used `grep` to look for other readers of this edge type.
  - Made some project updates.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10010

Differential Revision: https://secure.phabricator.com/D14893
2015-12-27 09:26:27 -08:00
epriestley
aa2089ba68 Support field previews in EditEngine
Summary: Ref T10004. This primarily supports moving Phame to EditEngine.

Test Plan: {F1045166}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10004

Differential Revision: https://secure.phabricator.com/D14887
2015-12-27 08:17:18 -08:00
epriestley
367955f3fd Improve UX and messaging for certain errors when landing revisions
Summary:
Ref T9994.

  - Allow errors to be dismissed.
  - Tailor messaging for closed/abandoned revisions.
  - Reduce scare messaging on land dialog, since it's not really that scary anymore.

Test Plan:
  - Dismissed errors.
  - Hit new warnings.
  - Wasn't as scared when landing.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9994

Differential Revision: https://secure.phabricator.com/D14886
2015-12-27 08:01:20 -08:00
epriestley
854e27d1c9 End of limited time only
This feature was only available for a limited time! Looks like you missed out.

This reverts commit 53fac2f89a.
2015-12-26 02:37:42 -08:00
epriestley
53fac2f89a Limited Time Only!
Summary: I'll revert this within 24 hours, before I promote.

Test Plan: Had completely functional but greatly enhanced Phabricator experience in Firefox, Safari and Chrome.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D14884
2015-12-25 08:16:12 -08:00
epriestley
e0ad791247 Fix hovercard behavior for multiple copies of the same object
Summary: Ref T8980. Previously, if you had like `T123 T123 T123` and waved your mouse over them, we wouldn't move the card. Now, move the card.

Test Plan: Waved mouse. Saw the card move.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8980

Differential Revision: https://secure.phabricator.com/D14881
2015-12-24 13:24:00 -08:00
epriestley
8025bc6432 Keep hovercards on screen a little harder
Summary: Ref T8980. This calculation was not quite right and you could sneak one off screen if you tried carefully.

Test Plan: Couldn't sneak one off screen anymore.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8980

Differential Revision: https://secure.phabricator.com/D14880
2015-12-24 12:38:36 -08:00
epriestley
e88dbbe1b1 Keep hovercards mostly on screen
Summary: Ref T8980.

Test Plan: {F1043268}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8980

Differential Revision: https://secure.phabricator.com/D14879
2015-12-24 12:18:41 -08:00
epriestley
bdc517485c Modernize Hovercard implementation
Summary:
Ref T8980. Move away from events to EngineExtensions.

This also simplifies hovercards a bit:

  - Removes tasks from revision cards.
  - Removes blockers/blocked from task cards.
  - Removes "Send Message" from user cards.

These mostly felt cluttery to me. Open to arguments to retain them. I think we can make better use of the space, though (e.g., flags, projects + board columns).

Test Plan:
  - Viewed people, task, revision, commit and project hovercards.

{F1043256}

{F1043257}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8980

Differential Revision: https://secure.phabricator.com/D14878
2015-12-24 12:18:28 -08:00
epriestley
70f6bf306f Implement child/descendant query rules in Projects
Summary:
Ref T10010. This adds infrastructure for querying projects by type, depth, parent and ancestor.

I needed to revise the "extended policy check" cycle detection rules. When, e.g., querying a grandchild, they incorrectly detected a cycle because both the child and grandchild needed to check the policy of the grandparent.

Instead, simplify it to just do a basic runaway calldepth check. There are many other safety mechanisms to make it so this can't ever occur.

(Cycle detection does have existing test coverage, and those tests still pass, it just takes a little longer to detect the cycle internally.)

There is still no way to create subprojects in the UI.

Test Plan: Added and executed unit tests.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10010

Differential Revision: https://secure.phabricator.com/D14862
2015-12-23 14:38:51 -08:00
epriestley
3068639ccf Implement query and policy rules for subprojects
Summary:
Ref T10010. This implements technical groundwork for subprojects. Specifically, it implements policy rules like Phriction:

  - to see a project, you must be able to see all of its parents (and the project itself).
  - you can edit a project if you can edit any of its parents (or the project itself).

To facilitiate this, we load all project ancestors when querying projects so we can do the view/edit checks.

This does NOT yet implement:

  - proper membership rules for these projects (up next);
  - any kind of UI to let users create subprojects.

Test Plan:
  - Added unit tests.
  - Executed unit tests.
  - Browsed Projects (no change in behavior is expected).

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10010

Differential Revision: https://secure.phabricator.com/D14861
2015-12-23 14:38:35 -08:00
epriestley
c4df80b39e Remove various unused beahviors from PHUIWorkboardView
Summary: Ref T5240. We don't currently use any of these options and I don't think we have any plans to use them. Strip them out for now to make fixing drag-and-drop stuff easier.

Test Plan: Grepped for removed stuff, no hits.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T5240

Differential Revision: https://secure.phabricator.com/D14864
2015-12-23 14:01:14 -08:00
epriestley
f422c9b955 Allow users to swipe away stacked actions on mobile
Summary:
Ref T10004. This might be a little too funky or magical, but is probably not necessary too often and easier than doing new layout with the CSS.

Also make the desktop icons a little meatier.

Test Plan: Swiped things away on mobile. Clicked things away on desktop.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10004

Differential Revision: https://secure.phabricator.com/D14857
2015-12-22 19:17:11 -08:00