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

682 commits

Author SHA1 Message Date
epriestley
b02f64f6ee Make project token sorting and normalization a little less hacky
Summary:
Ref T8510. Use "\n" as a delimiter between name sections. Specifically, project "AAA" with tag "zzz" should be a better match for query "AAA" than project "AAA BBB" is.

Make use of this delimiter slighlty more obvious in the UI.

Test Plan:
  - Created projects "Phacility" and "Phacility Core Access".
  - Typed "Phacility".
  - Before patch: first hit is "Phacility Core Access".
  - After patch: first hit is "Phacility".
  - Viewed debugging output table, saw visual explanation of behavior.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8510

Differential Revision: https://secure.phabricator.com/D16886
2016-11-17 08:02:23 -08:00
Chad Little
d2f3e7f7f3 Remove sidenav from Workboards
Summary: Visually, I think these are much cleaner (with colors), and provide more workspace. I also don't really use the sidenav here and if I did, it would be to go back to the project homepage. I think this is overall better. If navigation page to project home is difficult or hard to find, we can maybe make a better header / crumbs bar to reduce that.

Test Plan: New project -> basic new board. Existing project -> color board. Desktop, Mobile, Fullscreen

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D16882
2016-11-16 16:43:46 -08:00
epriestley
4c540fb01b Fix some policy CSS
Summary:
Ref T11853. My CSS change for the more enormous policy dialog was a little too broad, and affected the "You shall not pass!" dialog too.

Narrow the scope of the CSS rules.

Also add a missing "." that I caught.

Test Plan:
  - Looked at policy exception dialogs.
  - Looked at policy explanation dialogs.
  - Looked at the end of that sentence.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11853

Differential Revision: https://secure.phabricator.com/D16841
2016-11-11 13:43:13 -08:00
epriestley
40d3bcb891 Fix a complicated object caching issue with the policy filter
Summary:
Fixes T11853. To set this up:

  - Create "Project A".
  - Join "Project A".
  - Create a subproject, "Project A Subproject 1".
    - This causes Project A to become a parent project.
    - This moves you to be a member of "Project A Subproject 1" instead of "Project A" directly.
  - Create another subproject, "Project A Subproject 2".
    - Do not join this subproject.
  - Set the second subproject's policy to "Visible To: Members of Project A".
  - Try to edit the second subproject.

Before this change, this fails:

  - When querying projects, we sometime try to skip loading the viewer's membership in ancestor projects as a small optimization.
  - Via `PhabricatorExtendedPolicyInterface`, we may then return the parent project to the policy filter for extended checks.
  - The PolicyFilter has an optimization: if we're checking an object, and we already have that object, we can just use the object we already have. This is common and useful.
  - However, in this case it causes us to reuse an incomplete object (an object without proper membership information). We fail a policy check which we should pass.

Instead, don't skip loading the viewer's membership in ancestor projects.

Test Plan:
  - Did all that stuff above.
  - Could edit the subproject.
  - Ran `arc unit --everything`.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11853

Differential Revision: https://secure.phabricator.com/D16840
2016-11-11 13:42:18 -08:00
epriestley
9a1d59ad5b Separate sever-side typeahead queries into "prefix" and "content" phases
Summary:
Ref T8510. When users type "platypus" into a typeahead, they want "Platypus Playground" to be a higher-ranked match than "AAA Platypus", even though the latter is alphabetically first.

Specifically, the rule is: results which match the query as a prefix of the result text should rank above results which do not.

I believe we now always get this right on the client side. However, WMF has at least one case (described in T8510) where we do not get it right on the server side, and thus the user sees the wrong result.

The remaining issue is that if "platypus" matches more than 100 results, the result "Platypus Playground" may not appear in the result set at all, beacuse there are 100 copies of "AAA Platypus 1", "AAA Platypus 2", etc., first. So even though the client will apply the correct sort, it doesn't have the result the user wants and can't show it to them.

To fix this, split the server-side query into two phases:

  - In the first phase, the "prefix" phase, we find results that **start with** "platypus".
  - In the second phase, the "content" phase, we find results that contain "platypus" anywhere.

We skip the "prefix" phase if the user has not typed a query (for example, in the browse view).

Test Plan:
This is a lot of stuff, but the new ranking here puts projects which start with "w" at the top of the list. Lower down the list, you can see some projects which contain "w" but do not appear at the top (like "Serious Work").

{F1913931}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8510

Differential Revision: https://secure.phabricator.com/D16838
2016-11-10 08:54:59 -08:00
epriestley
706c21375e Remove empty implementations of describeAutomaticCapabilities()
Summary:
This has been replaced by `PolicyCodex` after D16830. Also:

  - Rebuild Celerity map to fix grumpy unit test.
  - Fix one issue on the policy exception workflow to accommodate the new code.

Test Plan:
  - `arc unit --everything`
  - Viewed policy explanations.
  - Viewed policy errors.

Reviewers: chad

Reviewed By: chad

Subscribers: hach-que, PHID-OPKG-gm6ozazyms6q6i22gyam

Differential Revision: https://secure.phabricator.com/D16831
2016-11-09 15:24:22 -08: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
2dd376055a Super Pro Dexule fix for project icon timeline
Summary: It's super

Test Plan: Set lots of project icons

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D16513
2016-09-07 10:48:06 -07:00
Chad Little
7368859d8d Properly set project icon in timeline
Summary: This fixes a bug where the icon won't display since it doesn't include `fa-`.

Test Plan: Change icon on a project, revisit timeline and see icon.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D16512
2016-09-07 10:37:15 -07:00
epriestley
8f4a63d708 Use consistent tag order in Maniphest list views and workboard cards
Summary: Fixes T11420. These are selected in newest-to-oldest order from the database, but we should show them in oldest-to-newest order in the UI.

Test Plan:
Tagged a couple tasks with "A, B, C" projects, saw correct order in UI:

{F1749351}

{F1749352}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11420

Differential Revision: https://secure.phabricator.com/D16367
2016-08-03 16:46:40 -07:00
epriestley
6f275ba144 Render browse results with global result style
Summary:
Ref T11034. This seems a little more promising. Two problems at the moment:

  - This doesn't actually provide any useful information at all right now.
  - Many object types have no profile images.

Test Plan:
{F1695254}

{F1695255}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11034

Differential Revision: https://secure.phabricator.com/D16155
2016-06-20 16:49:02 -07:00
epriestley
95d95e3fb4 Try to get to the bottom of the sporradic test failures in testColumnExtendedPolicies()
Summary:
This test has been failing occasionally in a way that does not reproduce, and only when no one is looking at it.

Try to add some extra assertions to maybe get more information.

Test Plan: `arc unit`

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D16137
2016-06-17 07:58:31 -07:00
epriestley
ad0562e15e Improve some typeahead matching behaviors
Summary:
Ref T8510. Sort prefix matches above non-prefix matches, so that "Ape Discovery" does not match "discovery" better than "Discovery".

Sort functions last.

Rename function internal strings so they don't get over-promoted the prefix-match rules.

Add kind of a hack to get "Project X" sorting above all the "Project X (Milestone 1)" results.

Test Plan:
Created "Ape Discovery", "Baboon Discovery", "Chimpanzee Discovery", etc.

Main project now sorts above milestones:

{F1681773}

Prefix matches now sort above other matches:

{F1681774}

Function results (rarely used) are now less prominent:

{F1681775}

Better function results here:

{F1681776}

More function results:

{F1681777}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8510

Differential Revision: https://secure.phabricator.com/D16094
2016-06-09 13:22:34 -07:00
epriestley
f97d120c3f When a task is removed from projects, remove its position on proxy columns for those projects
Summary:
Fixes T11088. When a task is removed from a project, we don't normally delete its column positions. If you accidentally remove a project and then restore the project, it's nice for the task to stay where you put it.

However, we do need to remove its positions in proxy columns to avoid the issue in T11088.

Test Plan:
  - Added a failing unit test, made it pass.
  - Added a task to "X > Milestone 1", loaded workboard, used "Edit Projects" to move it to "X" instead, loaded workboard.
    - Before, it stayed in the "Milestone 1" column.
    - After, it moves to the "Backlog" column.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11088

Differential Revision: https://secure.phabricator.com/D16052
2016-06-05 16:06:01 -07:00
epriestley
7969f66dfe Fully modularize the "Quick Actions" menu
Summary:
Ref T10077. Currently, we issue 6+ queries on every page to build this menu, since the menu is built application-by-application.

Build the menu with dedicated modules instead so a single "EditEngine" module can provide all of them with one query.

I'd like to reduce this to 0 queries but I'm not totally sure what we want to do with this menu.

This change removes these items, because EditEngine can not currently provide them:

  - Calendar: Eventually via EditEngine eventually.
  - Conpherence: Probably via EditEngine, doesn't seem too important.
  - People: Maybe via EditEngine, doesn't seem too important? "Welcome" is likely better?
  - Pholio: Eventually via EditEngine.

It adds a bunch of other items as a side effect:

{F1677151}

This reduces the queries issued on every page by ~5.

This also makes quick create actions visible while logged out (see T7073).

Test Plan:
  - Viewed menu while logged in.
  - Viewed menu while logged out.
  - Viewed standalone version of menu.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10077

Differential Revision: https://secure.phabricator.com/D16045
2016-06-05 10:32:01 -07:00
Chad Little
7126025fe6 Add information dialogs to adding project members if unsupported
Summary: If you try to join or add members to a parent project, we currently return 404. This instead adds an informational dialog. Fixes T11055

Test Plan: Click on Join Project and Add Members while on a Parent Project or Milestone.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T11055

Differential Revision: https://secure.phabricator.com/D16000
2016-06-01 12:42:58 -07:00
epriestley
727a7de759 Sort project typeahead tokens by display name, not hashtag
Summary:
Fixes T8510. Results are internally ordered by "name", which is the full list of strings a user can type to match a result. On the balance, it is probably good/correct to order by this (particularly, it allows `function(x)` to sort near `x`).

However, the way projects were built put the tags first, so a project like "Discovery" could end up last if it had originally been created with a different name like "Search Team", so that its first slug is "search-team".

Instead, put the display name first in the ordering.

Test Plan:
{F1661775}

To reproduce in particular:

  - Create a project named "Zebra".
  - Create a lot of projects named "Armadillo-blahblahblah".
  - Rename "Zebra" to "Armadillo".

Before the patch, the new "Armadillo" project would still sort as though it were named "Zebra". After the patch, it sorts as expected normally.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8510

Differential Revision: https://secure.phabricator.com/D15981
2016-05-26 10:47:09 -07:00
Chad Little
969d3be035 Clean up "points" display on workboards
Summary: Couple of edge cases here I never cleaned up. This inlines points and projects better, with spacing and use of grey to better differentate from project tag colors.

Test Plan:
Review edge cases on workboard with multiple short and long project names.

{F1653998}

{F1653999}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15956
2016-05-20 13:06:57 -07:00
epriestley
cac26c8824 Fix errant rules for associating projects when dragging tasks within a milestone column
Summary:
Fixes T10912. When you drag tasks within a milestone, we currently apply an overbroad, API-focused rule and add the parent board's project. This logic was added fairly recently, as part of T6027, to improve the behavior of API-originated moves.

Later on, this causes the task to toggle in and out of the parent project on every alternate drag.

This logic is also partially duplicated in the `MoveController`.

  - Add test coverage for this interaction.
  - Fix the logic so it accounts for subproject / milestone columns correctly.
  - Put all of the logic into the TransactionEditor, so the API gets the exact same rules.

Test Plan:
  - Added a failing test and made it pass.
  - Dragged tasks around within a milestone column:
    - Before patch: they got bogus project swaps on every other move.
    - After patch: projects didn't change (correct).
  - Dragged tasks around between normal and milestone columns.
    - Before patch: worked properly.
    - After patch: still works properly.

Here's what the bad changes look like, the task is swapping projects with every other move:

{F1255957}

The "every other" is because the logic was trying to do this:

  - Add both the parent and milestone project.
  - Whichever one exists already gets dropped from the change list because it would have no effect.
  - The other one then applies.
  - In applying, it forces removal of the first one.
  - Then this process repeats in the other direction the next time through.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10912

Differential Revision: https://secure.phabricator.com/D15834
2016-05-03 07:59:05 -07:00
Chad Little
7b16f5d807 Convert Project Pages to new UI
Summary: Updating the subproject and member pages in Projects to new UI

Test Plan: Visit a subproject parent page, visit members pages

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15687
2016-04-14 18:26:43 +00:00
Chad Little
8aad862cd4 Normalize casing on property boxes
Summary: Going to render these all normal case instead of all caps, and bump up the font size. Should be more consistent. Yellow if you green anything orange.

Test Plan: grep, lint

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15645
2016-04-06 15:33:15 -07:00
epriestley
9b3c09d248 Put older milestones back on the left
Summary:
This reverts commit 3f50ba90f1.

Fixes T10412. Everyone seems to hate this and I don't feel strongly about it. It's definitely a little weird.

Test Plan: Straight revert.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10412

Differential Revision: https://secure.phabricator.com/D15644
2016-04-06 14:14:01 -07:00
epriestley
ded0344745 Have milestones inherit colors from parent projects
Summary: Fixes T10737. I agree that this is a better behavior than always making them blue (boring).

Test Plan:
what

{F1208333}

wut

Reviewers: hach-que, chad

Reviewed By: chad

Maniphest Tasks: T10737

Differential Revision: https://secure.phabricator.com/D15643
2016-04-06 14:13:40 -07:00
epriestley
4d32c990ab Allow stacked comment actions to be explicitly ordered
Summary:
Ref T6027. Normally, actions use the same order as the form, but in some cases (like moving stuff on workboards) it makes sense to reorder them explicitly.

Pin "Move on board" near the bottom, and "projects/subscribers" at the bottom. I think these are generally reasonable rules in all cases.

Test Plan: Opened menu, saw slightly better action order.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T6027

Differential Revision: https://secure.phabricator.com/D15639
2016-04-06 09:15:27 -07:00
epriestley
86b08514ab Merge TYPE_PROJECT_COLUMNS and TYPE_COLUMN transactions into a more general TYPE_COLUMNS transaction
Summary:
Ref T6027. We currently have two different transaction types:

  - `TYPE_PROJECT_COLUMNS` does most of the work, but has a sort of weird structure and isn't really suitable for API use.
  - `TYPE_COLUMN` is this weird, junk transaction which mostly just creates the other transaction.

Merge them into a single higher-level `TYPE_COLUMNS` transaction which works properly and has a sensible structure and comprehensive error checking.

Remaining work here:

  - I've removed the old rendering logic, but not yet added new logic. I need to migrate the old transaction types and add new rendering logic.
  - Although the internal representation is now //suitable// for use in the API, it isn't properly exposed yet.

Test Plan:
  - Created tasks into a column.
  - Ran unit tests.
  - Moved tasks between columns.
  - Will perform additional testing in followups.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T6027

Differential Revision: https://secure.phabricator.com/D15634
2016-04-06 09:13:31 -07:00
epriestley
1507e8dc8b Change "Projects" to "Tags" for curtain extension
Summary: This doesn't hit the ambiguous case in Diffusion so it seems fine to make it more consistent.

Test Plan: Looked at a little task-o.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15561
2016-04-01 07:20:32 -07:00
Chad Little
a939bbc4fa Update EditEngine for two column
Summary: Cleans up EditEngine, adds new layout to EditEngine and descendents

Test Plan: Test creating a new form, reordering, marking and unmarking defaults. View new forms.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15531
2016-03-28 09:18:55 -07:00
epriestley
601aaa5a86 Modularize content sources
Summary:
Ref T10537. For Nuance, I want to introduce new sources (like "GitHub" or "GitHub via Nuance" or something) but this needs to modularize eventually.

Split ContentSource apart so applications can add new content sources.

Test Plan:
This change has huge surface area, so I'll hold it until post-release. I think it's fairly safe (and if it does break anything, the breaks should be fatals, not anything subtle or difficult to fix), there's just no reason not to hold it for a few hours.

- Viewed new module page.
- Grepped for all removed functions/constants.
- Viewed some transactions.
- Hovered over timestamps to get content source details.
- Added a comment via Conduit.
- Added a comment via web.
- Ran `bin/storage upgrade --namespace XXXXX --no-quickstart -f` to re-run all historic migrations.
- Generated some objects with `bin/lipsum`.
- Ran a bulk job on some tasks.
- Ran unit tests.

{F1190182}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10537

Differential Revision: https://secure.phabricator.com/D15521
2016-03-26 11:59:45 -07:00
Chad Little
2da9fcafbf Update project manage page for two column
Summary: Fixes T10545. Converts layout to two column.

Test Plan: Review a few project manage pages, see new layout and flag ability.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T10545

Differential Revision: https://secure.phabricator.com/D15450
2016-03-09 09:11:48 -08:00
epriestley
61f82bb97b Introduce "Curtain" views, panels, and extensions
Summary:
This opens up the new action column to have specialized rendering and behavior. Briefly:

  - Converted applications (right now, only Paste) render a `CurtainView` to build the column content.
  - This view uses new extensions to build panels (projects, subscribers, tokens).
  - The panel extension code and rendering can be changed without breaking old stuff.

Minor changes:

  - Token awards now load their tokens, for consistency/simplicity.
  - Removed the rest of the "fork of" / "forked from" UI in Paste -- I essentially removed these features a while ago, and no one has complained.

Test Plan:
UI is a bit rough, but works, and it's going to get changed now anyway:

{F1160550}

{F1160551}

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15414
2016-03-06 09:27:55 -08:00
epriestley
aaab1011e5 Give AphrontTagView a getViewer(), deprecate getUser()
Summary:
Two minor changes here:

  - Replace `get/setUser()` with `get/setViewer()` for consistency with everything else.
  - `getViewer()` now throws if no viewer is set. We had a lot of code that either "should" check this but didn't, or did check it in an identical way, duplicating work. In contrast, very little code checks for a viewer but works if one is not present.

Test Plan:
  - Grepped for `->user`.
  - Attempted to fix all callsites inside `*View` classes.
  - Browsed around a bunch of applications, particularly Calendar, Differential and Diffusion, which seemed most heavily affected.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15412
2016-03-06 09:27:38 -08:00
Chad Little
fe7e288cf5 Solidify PHUITwoColumnView as a page layout
Summary:
Rolls out a new "Object Page" design with PHUITwoColumnView. This is reasonably polished, but wanted to post it up for you now for feedback before chasing down minor bugs. This implements TwoColumn in the following applications:

 - Ponder
 - Paste
 - Slowvote
 - Countdown
 - Projects
 - Profile
 - Passphrase

This helped track down display issues and inconsistencies and make sure the layout was flexible for different pages.

Test Plan:
Test each of the applications on mobile, tablet, and desktop breakpoints.

{F1135705}

{F1135706}

{F1135707}

{F1135708}

{F1135709}

{F1135710}

{F1135711}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15366
2016-03-01 07:23:08 -08:00
epriestley
383b0bdc04 Fix missing cursor data for paging Projects by creation date
Summary: Fixes T10478.

Test Plan: Paged projects by "Created" without errors.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10478

Differential Revision: https://secure.phabricator.com/D15367
2016-02-29 16:08:28 -08:00
epriestley
2e19b78b8d Don't publish anything for "Disable Mail" / "Enable Mail" on projects
Summary:
Fixes T10466. Currently, clicking "Disable Mail" or "Enable Mail" on a project toggles an edge, but it gets a default "added an edge" story and transaction record.

These are confusing, useless and not interesting, so just hide them.

Test Plan:
  - Before patch: clicked enable/disable mail, saw "added an edge" / "removed an edge" stories in feed and project history.
  - After patch: clicked enable/disable mail, saw nothing in feed or project history.
  - (Note that this patch is not retroactive for feed, so already-published stories won't unpublish.)

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10466

Differential Revision: https://secure.phabricator.com/D15361
2016-02-28 16:32:32 -08:00
Chad Little
e9f4ca6ca3 Redesign PonderQuestionView
Summary: Full new UI, testing some upcoming treatments for consideration in other View controllers. Small tweaks to allow PHUITwoColumnView to have fixed and fluid width, and let TransactionCommentView go fullWidth.

Test Plan:
Tested a number of Ponder cases, New Question, with and without summary, with and without answers, with and without comments. Mobile, Tablet, and Desktop layouts. Verify Project and Profile UI's still in tact.

{F1120961}

{F1120962}

{F1120963}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15315
2016-02-23 17:20:07 -08:00
epriestley
9baae00fbd Fix a couple of column editing issues
Summary:
Ref T10349.

  - Don't show subproject columns on "Manage Board".
  - Fix "Edit Column" for milestone columns (allows you to set points, but not rename).

Test Plan:
  - Viewed "Manage Board" on a project with subprojects.
  - Edited a milestone column and set a point limit.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10349

Differential Revision: https://secure.phabricator.com/D15338
2016-02-23 14:45:05 -08:00
epriestley
76d4e85bfc Only hide archived project tags on workboard cards
Summary: Fixes T10413. I accidentally hid these //everywhere//, but only intended to hide them on workboards.

Test Plan:
  - Viewed a workboard, saw un-archived projects only.
  - Viewed a task detail page, saw archived and un-archived projects.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10413

Differential Revision: https://secure.phabricator.com/D15335
2016-02-23 10:47:27 -08:00
Chad Little
f5e2f9587c Add setHeader to PHUITwoColumnView for consistent page layouts
Summary: Working towards making PHUITwoColumnView into a page layout engine. Adds header support.

Test Plan: Use new header on Profile and Profiles. No visual changes, less duplicated code.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15292
2016-02-17 13:09:10 -08:00
Chad Little
12d8520059 Convert PHUIObjectBoxView to AphrontTagView
Summary: Attempting to clean PHUIObjectBoxView up a little as well as finally being able to `addClass` on the sucker. I'm running into some issue with `addTabs` though, which on Files isn't firing.

Test Plan: Bounce around tons of screens.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15291
2016-02-17 12:54:56 -08:00
epriestley
9a16e5c1aa Allow users to seach for projects by watcher
Summary:
Ref T10349. This capability didn't make a ton of sense when you had to be a member to watch a project and watch rules were simple, but makes more sense now.

A particular use case might be finding all the stuff you're watching so you can prune it.

Test Plan: Searched for stuff I was watching, got accurate results.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10349

Differential Revision: https://secure.phabricator.com/D15289
2016-02-17 11:47:55 -08:00
Chad Little
71be2b06a8 Add Workboard UI Color to sidenav, fix fullscreen CSS
Summary: Uses the background color changes to show also on the side nav. Places color on entire body so fullscreen doesn't show other body color.

Test Plan: Review various workboard colors at normal and fullscreen

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15283
2016-02-16 14:32:26 -08:00
epriestley
376c85a828 Make subproject/milestone watch rules work better
Summary:
Ref T10349. These got sort of half-weirded-up before I separated subscriptions and watching fully. New rules are:

  - You can watch whatever you want.
  - Watching a parent watches everything inside it.
  - If you're watching "Stonework" and go to "Stonework > Masonry", you'll see a "Watching Ancestor" hint to let you know you're already watching a parent or ancestor.

Test Plan:
  - Watched and unwatched "Stonework".
  - Watched and unwatched "Stonework > Iteration IV".
  - While watching "Stonework", visited "Iteration IV" and saw "Watching Ancestor" hint.
  - Created a task tagged "Stonework > Iteration IV". Got notified about it because I watch "Stonework".

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10349

Differential Revision: https://secure.phabricator.com/D15280
2016-02-16 10:42:07 -08:00
epriestley
483d90fac1 Allow workboard background colors to be configured
Summary:
Adds a UI for selecting background colors.

You can choose "Use Parent", which is the default, and allows you to set a color that all descendants inherit.

You can also choose "None", if a parent has a WHACKY BACKGROUND that you refuse to put up with.

Test Plan:
{F1114588}

{F1114589}

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15279
2016-02-16 08:15:12 -08:00
epriestley
5a44c85b6b Move uncommon workboard management options to "Manage Board" view
Summary:
This gives us room for less-common workboard management options like "Disable Board" without overloading the menus on the main board.

Particularly, we can add background color options here without anything getting weird.

I've left "Add Column" on the main UI since I think it's common enough to leave there. We could probably move "Hide Column" to this UI in the future, though.

Test Plan: {F1114475}

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15278
2016-02-16 08:13:31 -08:00
epriestley
e4690a3854 Fix an issue where newly created tasks could appear at the bottom of columns
Summary:
Ref T10349. At HEAD, if you create a task //on a board//, it floats to the top correctly.

If you create a task elsewhere and tag it with the board, you were subject to the whims of the layout engine and it would generally end up on the bottom.

Instead, make the rules consistent so that "virtual" positions (of tasks which haven't been committed to a particular position yet) still float to the top.

Test Plan:
  - Created tasks from a board.
  - Created tasks from Maniphest, then looked at them on a board.
  - Moved tasks around.
  - In all cases, newly created tasks floated to the top.
  - Sorted by natural and priority.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10349

Differential Revision: https://secure.phabricator.com/D15276
2016-02-15 15:18:05 -08:00
epriestley
f1f8ee8e6a Improve subproject/milestone error handling for users who can't create projects
Summary:
Fixes T10357.

  - Show a better (more descriptive) error message when a user who can't create projects tries to create a subproject or milestone.
  - Disable the subproject actions if you don't have create permission.

All this stuff was already enforced properly: this diff doesn't make any actual policy changes, just improves the UI for users who lack permission.

Test Plan:
  - As an unprivileged user (no "Can Create Projects"), tried to create a subproject or milestone.
  - After patch, got a disabled action, with more specific and helpful error than before.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10357

Differential Revision: https://secure.phabricator.com/D15274
2016-02-15 07:32:42 -08:00
Chad Little
3fdaf229a7 Convert Create/Edit Column pages to dialogs
Summary: Makes these pages a dialog endpoint, keeping you on the Workboard when possible.

Test Plan: Create a Column, Edit a Column, visit hard page. Test letters in the points field.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15270
2016-02-14 12:38:38 -08:00
Chad Little
c1f57605ab Normalize colors a bit better on Profiles/Projects, add Workboard backgrounds
Summary: Cleans up the backgrounds a little on Projects/Profiles and adds a number of colour choices for Workboards.

Test Plan:
Manually add each color for testing. Test new project / profile layouts with and without properties.

{F1109325}

{F1109326}

{F1109327}

{F1109328}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15269
2016-02-13 12:08:29 -08:00
epriestley
329d03661f Use an extended policy to bind column and board policies together
Summary:
Ref T10349. Columns have the same policies as the projects they belong to.

However, the current implementation just returns the policy directly. This usually works, but if the project has a policy like "Members of (This) Project", the policy filter tries to check if the viewer is a member of //the column itself//. That doesn't work, since columns don't have members. This leads to a situation where columns on "Editable By: Project Members" projects can not be edited.

Instead, return a permissive base policy and then use an extended policy to bind the column policy to the project policy.

Test Plan:
  - Edited a column on an "Editable By: Members of Project" board.
  - Added and ran a unit test covering this case.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10349

Differential Revision: https://secure.phabricator.com/D15268
2016-02-13 11:34:54 -08:00