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

13258 commits

Author SHA1 Message Date
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
Chad Little
96219ab568 Fiddle with Conpherence textarea
Summary: Slightly larger, consistent colors.

Test Plan: Mobile, Tablet, Desktop

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D16843
2016-11-11 22:22:59 +00: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
Chad Little
32d2955f22 Give more space for new select dropdown image
Summary: On really wide selects, text will go over the background image. Give it more padding.

Test Plan: Review selects on email preferences page.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D16842
2016-11-11 13:42:38 -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
ff677c1964 Fix two error strings in the diffusion.uri.edit Conduit method
Summary: Fixes T11839. Both are missing a parameter and one is a copy/paste slop.

Test Plan:
{F1913812}

{F1913813}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11839

Differential Revision: https://secure.phabricator.com/D16837
2016-11-10 08:55:12 -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
Chad Little
6dc94fc10a Clean up fullscreen remarkup UI
Summary: Some aftermath fallout from rebuilding the comment box.

Test Plan: Go fullscreen, pop back out.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D16836
2016-11-10 08:09:07 -08:00
epriestley
63c2665df1 Vegetables? Dortios™ Brand® snack chips are healthy corn chips packed full of vitamins and nutrients. 2016-11-09 17:15:56 -08:00
epriestley
663629e8ad Use Doritos™ Brand® perfect circles to indicate Busy/Away/Disabled
Summary:
Fixes T11829.

  - Currently in use: Doritos™ Brand® "Nacho Cheese"® perfect circles: •
  - Available alternative: Doritos™ Brand® "Cool Ranch"® perfect circles: ●

Test Plan: {F1913116}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11829

Differential Revision: https://secure.phabricator.com/D16834
2016-11-09 17:13:10 -08:00
Chad Little
554b3c3810 Normalize form inputs a little
Summary: Lots of minor details, colors, spacing, padding.

Test Plan:
View carefully in create task, mobile create task, comment form, tokenizers.

{F1913060}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D16832
2016-11-09 16:41:58 -08:00
Aviv Eyal
e634812a6d Remove plain-text file view of Diffusion files.
Summary:
fixes T11792.
There's no good reason any more to have this option, so just drop it.

Test Plan: Load a file, toggle remaining "blame" button. Load search results page and an image too, which are serviced by the same controller.

Reviewers: chad, #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Maniphest Tasks: T11792

Differential Revision: https://secure.phabricator.com/D16833
2016-11-10 00:40:09 +00: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
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
Chad Little
d78802f3ab Redesign Comment Box
Summary: Redesign the action comment box for better use in two column, mobile, nuance.

Test Plan: Test in mobile / desktop / tablet, adding and removing actions. Actionless comment boxes, etc.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: cspeckmim, Korvin

Differential Revision: https://secure.phabricator.com/D16811
2016-11-09 10:36:25 -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
d032eea216 Discourage new users from exploring too much
Summary: Fixes T11834. Actually adding the step wasn't in the `if (...)` block. Also, typo fix.

Test Plan: Saw only one "Explore" on `/guides/`.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11834

Differential Revision: https://secure.phabricator.com/D16828
2016-11-08 13:27:15 -08:00
epriestley
999fae524f Fix a typo of the word "granularity"
Summary: This isn't spelled as well as it could be.

Test Plan: O_O

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D16827
2016-11-08 12:39:45 -08:00
epriestley
9a10413dbc Improve typeahead behavior with mixed-case matches
Summary:
Ref T8510. We had two issues with mixed-case result sorting, like typing `@joe` to match user `Joe`.

  - The fallback sort was not normalized properly, so "J" could sort after "j". Instead, normalize values for sorting.
  - The `prefix_hits` and older `priority_hits` mechanisms were competing destructively. The `prefix_hits` mechanism completely replaces the `priority_hits` mechanism. Instead, use only the `prefix_hits` mechanism.

Test Plan:
  - Copied results for "joe" from WMF.
  - Hard-coded the controller to return them.
  - Searched for `@joe`.
  - After patches, first hit is user "Joe".

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8510

Differential Revision: https://secure.phabricator.com/D16826
2016-11-08 11:50:15 -08:00
epriestley
afa1bb2860 Fix some grammatical gender constants
Summary: Ref T5267. I missed these in the variable types conversion.

Test Plan: `arc unit --everything`

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T5267

Differential Revision: https://secure.phabricator.com/D16824
2016-11-08 08:45:14 -08:00
epriestley
9803674525 Extract variable type information from pht() calls
Summary:
Ref T5267. When extrating data from `pht()` calls, also extract the argument types and export them into the map so they can be used by consumers.

We recognize plurals (`phutil_count()`, `new PhutilNumber`) and genders (`phutil_person()`). We'll need to annotate the codebase for those, since they're currently runtime-only.

Test Plan:
Rebuilt extraction maps, got data like this (note "number" type annotation).

```
  "Scaling pool \"%s\" up to %s daemon(s).": {
    "uses": [
      {
        "file": "/daemon/PhutilDaemonOverseer.php",
        "line": 378
      }
    ],
    "types": [
      null,
      "number"
    ]
  },
```

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T5267

Differential Revision: https://secure.phabricator.com/D16823
2016-11-08 08:33:15 -08:00
epriestley
3f5109b668 In prose diff dialogs (like "Show Details" in transactions), show "old", "new" and "diff" tabs
Summary:
Ref T7643. When you do something like this:

  - Edit a task description.
  - Click "Show Details" on the resulting transaction.
  - Get a prose diff dialog showing the change.

...now add some "Old" and "New" tabs. These are useful for:

  - reverting to the old text by copy/pasting;
  - reading just the new/old text if the diff is noisy;
  - sometimes just nice to have?

(This looks a little rough but I didn't want to put a negative margin on tab groups inside dialogs? Not sure what the best fix here is.)

Test Plan: {F1909390}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T7643

Differential Revision: https://secure.phabricator.com/D16817
2016-11-07 15:18:19 -08:00
epriestley
6a7dde03cc On @username mentions in remarkup, show the "busy" dot color
Summary:
Ref T11809. I missed this when adding a "Busy" status.

Also the other dot is orange? Just make them all orange for consistency.

Test Plan: Viewed `@username` of busy users (orange), away users (red).

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11809

Differential Revision: https://secure.phabricator.com/D16819
2016-11-07 14:57:32 -08:00
epriestley
729492a8ff Allow transactions to specialize their mail headers for diff sections
Summary: Ref T7643. When we send mail about a change to a package description, allow it to say "CHANGES TO PACKAGE DESCRIPTION" instead of "EDIT DETAILS". Smooth!

Test Plan: {F1909417}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T7643

Differential Revision: https://secure.phabricator.com/D16818
2016-11-07 12:16:39 -08:00
epriestley
a8866c0b31 In Maniphest, don't render the task graph drawing if we're only showing parents/children
Summary:
Ref T4788. I thought I implemented this, but actualy didn't.

When we're in the "mid-sized" fallback mode (graph has more than 100 nodes, but not more than than 100 parents/children), don't actually draw the graph. It's almost always uninteresting and huge.

Instead, this just renders a list of direct parents, then the task, then the direct children, which is pretty straightforward.

Test Plan: Set limit to 5, saw mid-sized fallback graph with no actual graph drawing.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4788

Differential Revision: https://secure.phabricator.com/D16816
2016-11-07 11:09:20 -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
7ddd570fa5 Provide a standalone bin/calendar reload ... workflow for testing/debugging
Summary:
Ref T11801. This makes testing/debugging a little easier.

Also fix some inconsistencies with `importAuthorPHID` handling -- it should be the import's author PHID in all cases, so we update imported events properly.

Test Plan: Imported a French holiday with `bin/calendar reload ...`.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11801

Differential Revision: https://secure.phabricator.com/D16814
2016-11-07 10:55:18 -08:00
epriestley
2f93ce4c25 Don't show "Limited" or "Test" translations unless an install is in developer mode
Summary:
Ref T5267. Although translations with very few strings are already put into a "Limited Translations" group, this isn't necessarily clear and was empirically confusing to at least one user, who was surprised that selecting "Spanish" had no UI effect.

Instead, hide limited and test translations entirely unless the install is in developer mode.

Test Plan: In a non-developer-mode install, viewed translations menu. No longer saw translations with very few strings.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T5267

Differential Revision: https://secure.phabricator.com/D16807
2016-11-06 14:31:41 -08:00
epriestley
960c0be689 Fix some issues with Phabricator i18n string extraction
Summary: Ref T5267. Fix one minor bug (paths were not being resolved properly) and one minor string issue (missing `%d` in a string).

Test Plan: Extracted strings, got a cleaner result.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T5267

Differential Revision: https://secure.phabricator.com/D16808
2016-11-06 11:12:45 -08:00
epriestley
f4f3b90c87 On tasks, put Task Graph, Mocks and Mentions into a tabgroup
Summary:
Fixes T4788. This change:

  - converts the "Task Graph" into a "Related Objects" tabgroup.
  - makes "Task Graph" the first tab in the group.
  - moves "Mocks" to become a tab.
  - adds a new "Mentions" tab, which shows inbound and outbound mentions.

Primary goal of "mocks" is to give us room for a pinboard/thumbnail view after the next Pholio iteration. Might make sense to make it the default tab (if present) at that point, too, since mocks are probably more important than related tasks when they're present.

Primary goal of "mentions" is to provide a bit of general support for various freeform relationships between tasks: if you want to treat tasks as "siblings" or "related" or "following" or whatever, you can at least find them all in one place. I don't plan to formalize any of these weird one-off relationships in the upstream, although it's vaguely possible that some far-future update might just let you define arbitrary custom relationships and then you can do whatever you want.

Test Plan: {F1906974}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4788

Differential Revision: https://secure.phabricator.com/D16806
2016-11-06 09:05:14 -08:00
epriestley
17bd483207 Queue large ICS files for background import
Summary: Ref T11801. When a file is larger than 512KB, queue it for background import instead of trying to do it in the foreground, sinc we risk hitting `max_execution_time`.

Test Plan: {F1906943}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11801

Differential Revision: https://secure.phabricator.com/D16805
2016-11-06 07:46:21 -08:00
epriestley
e1566bef63 Fix a Calendar import issue where we looked up attendees by object instead of name
Summary:
Ref T11801. This issue led to the stack trace in T11801#199042.

It wasn't obvious that this was wrong because the recover-on-duplicate-key code made it work correctly.

Test Plan: Imported an event with external attendees with no warnings in the log.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11801

Differential Revision: https://secure.phabricator.com/D16804
2016-11-05 11:12:20 -07:00
epriestley
bd3233d3ab Use a more conventional placement of parentheses
Auditors: avivey
2016-11-04 16:59:09 -07:00
epriestley
90fb8a1516 Fix an issue with editing application default policies in Calendar
Summary: Ref T11816. We're running this code on empty events which haven't been initialized and don't have a source attached -- just use a more explanatory check which doesn't need anything attached.

Test Plan: Edited default Calendar policies.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11816

Differential Revision: https://secure.phabricator.com/D16803
2016-11-04 16:55:56 -07:00
epriestley
e337029769 Allow users to mark themselves as "Available", "Busy" or "Away" while attending an event
Summary:
Ref T11816.

  - Now that we can do something meaningful with them, bring back the yellow dots for "busy".
  - Default to "busy" when attending events (we could make this "busy" for short events and "away" for long events or something).
  - Let users pick how to display their attending status on the event page.
  - Also show which event the user is attending since I had to mess with the cache code anyway. We can get rid of this again if it doesn't feel good.

Test Plan:
{F1904179}

{F1904180}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11816

Differential Revision: https://secure.phabricator.com/D16802
2016-11-04 16:55:44 -07:00
epriestley
ac8b156e4b Raise ICS warnings in Phabricator on ICS import
Summary: Ref T11816. Depends on D16800. Show warnings generated by ICS import in the UI.

Test Plan: {F1904122}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11816

Differential Revision: https://secure.phabricator.com/D16801
2016-11-04 16:36:55 -07:00
epriestley
c2565d5e24 Fix a bug with creating Phortune merchant accounts without applying an email address transaction and some null field issues
Summary:
When Phortune merchant accounts are created via mechanisms other than the web UI (for example, by Phacility unit tests) this validation check may fail.

Transactions are validated even if no transactions of the given type are being applied, to allow the editor to raise errors like "Name is required!".

If there's no TYPE_INVOICEEMAIL transaction, we'll get called with empty `$xactions` and fail on `strlen($new_email)` because the variable is never defined.

As a secondary issue, if contactInfo, invoiceEmail or invoiceFooter are not provided the record will fail to insert (none of these are nullable).

Test Plan: Ran Phacility unit tests, got a clean result for new instance creation.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D16798
2016-11-04 09:52:48 -07:00
epriestley
0f1785c0aa Allow EditEngine to build NUX buttons that point at the right place
Summary:
Fixes T11812.

  - Pull the logic for building the "Create Whatever" dropdown out.
  - Use it to generate NUX buttons, too.
  - Use the new logic in Paste and Maniphest.

Test Plan:
  - Viewed Paste NUX, button worked.
  - Viewed Maniphest NUX with multiple create forms, button worked.

Reviewers: chad, avivey

Reviewed By: avivey

Subscribers: avivey

Maniphest Tasks: T11812

Differential Revision: https://secure.phabricator.com/D16797
2016-11-04 09:51:25 -07:00
epriestley
e4c6ae5345 Smooth out various transaction/editing behaviors for Calendar
Summary:
Ref T11809.

  - Allow users to remove the "Until" date from recurring events.
  - When removing "Until", show a sensible string ("...set this event to repeat forever.")
  - When users go through the "Make Recurring" workflow, don't require them to explicitly select "Recurring: Recurring" from the dropdown. This intent is clear from clicking "Make Recurring".
  - When editing "All Future Events", don't literally apply date changes to them, since that doesn't make sense. We update the template, then reschedule any events which haven't been edited already. I think this is what users probably mean if they make this edit.
  - When creating an event with a non-default icon, don't show "alice changed the icon from Default to Party.".
  - Hide the "recurring mode" transaction, which had no string ("alice edited this Event.") and was redundant anyway.
  - Also, add a little piece of developer text to make hunting these things down easier.

Test Plan: Edited various events, parents, children, made events recur, set until, unset until, viewed transactions, rescheduled parents, rescheduled children.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11809

Differential Revision: https://secure.phabricator.com/D16796
2016-11-03 11:03:20 -07:00
epriestley
e9b861ff15 Write a basic Calendar user guide
Summary:
Ref T11809. Roughly documents most of the tricky/unintuitive stuff.

Also fixes a bug with "Make Recurring" with no "Until" date.

Test Plan: Read document.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11809

Differential Revision: https://secure.phabricator.com/D16792
2016-11-02 14:48:29 -07:00
epriestley
29313372e7 Improve some commenting/editing behaviors for recurring events
Summary:
Ref T11809. Currently, commenting on a recurring event hits the same "one or all?" dialog that other edits do.

For comments and edits submitted via the comment widget, we can safely assume that you mean "just this one", since it doesn't really make sense to try to bulk-edit an event from that UI.

Test Plan: Commented on a recurring event parent and an event in the series.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11809

Differential Revision: https://secure.phabricator.com/D16795
2016-11-02 14:08:55 -07:00
epriestley
64cf9204c1 In Calendar, only include the event description in the original event mail
Summary: Ref T11809. This makes the mail more consistent with Differential and Maniphest, which only include additional details in the first mail in the thread.

Test Plan:
  - Created an event with a description.
  - First mail included it.
  - Followups did not.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11809

Differential Revision: https://secure.phabricator.com/D16794
2016-11-02 13:46:05 -07:00
epriestley
c9510cc118 Make it more clear that red dots next to usernames mean Calendar availability
Summary:
Ref T11809. We show a red dot next to a username to indicate that the user is away (on vacation, in a meeting, etc).

It's not very obvious what this means unless you know that's what it is: when you click the username or view a hovercard, there's no visual hint about what the red dot means. It does say "Away", but there is a lot of information and it doesn't visually connect the two.

Connect the two visually by putting a red dot next to the "Away" bit, too.

Test Plan:
Here's my version of it, this feels OK to me but could maybe be more designed:

{F1893916}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11809

Differential Revision: https://secure.phabricator.com/D16791
2016-11-02 13:45:43 -07:00
epriestley
bf0004744b Move "Calendar" above "Badges" on user profiles
Summary:
Ref T11809. As we move toward unprototyping, this panel is probably more relevant/dynamic/interesting more often than the badges panel, I think?

Particularly, I want to make the red dots a little easier to understand, and I think putting this above the fold will help aid discovery (red dot -> click -> see red dot -> see "away until ..." -> see calendar -> "oh they're at a meeting"?).

This is entirely a product/subjective thing so I'm fine with not doing it or using a different order.

I think there's maybe even an argument for putting this above "Projects", but "Projects" feels more core to me, at least for now.

Test Plan: Viewed a user profile, saw "Calendar" above "Badges".

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11809

Differential Revision: https://secure.phabricator.com/D16790
2016-11-02 13:13:45 -07:00
epriestley
713f8fb373 Fix a bug which could cause imported events to set themselves as their own parents
Summary: Ref T11808. This variable is wrong, and would sometimes cause events to set themsevles as their own parents. They would then fail to load, and disrupt cursor paging.

Test Plan:
  - Reproduced T11808 locally by reloading test data 2+ times, creating events with themselves as their own parents.
  - Appplied fix.
  - Nuked data, reloaded, no more self-parents.
  - Test datafile: {F1894017}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11808

Differential Revision: https://secure.phabricator.com/D16793
2016-11-02 11:44:09 -07:00
epriestley
3f2f81a1c8 Remove obsolete Calendar event date storage fields
Summary: Ref T11809. These have been replaced with more flexible storage that accommodates a wider range of behaviors, including those in the ICS format and RRULEs.

Test Plan:
  - Ran migration.
  - Viewed, created, edited events.
  - Grepped for all removed names/symbols.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11809

Differential Revision: https://secure.phabricator.com/D16789
2016-11-02 09:49:08 -07:00
epriestley
6982bded71 Remove ancient "Holiday" storage
Summary:
Ref T11809. This came out of Facebook many years ago for computing the number of business days that revisions had been stale.

We removed the little staleness marker a few months ago and haven't seen complaints about it.

If we did holidays now it would make sense to integrate them more directly with Calendar as real events, but I have no plans to pursue this anytime soon. It's easy enough to add the federal holidays manually (~5 minutes of work per year?) if you want them, and they're commentable/editable and you can add local holidays if you're not in the US.

Test Plan:
  - Ran `bin/storage upgrade -f`.
  - Grepped for `CalendarHoliday`.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11809

Differential Revision: https://secure.phabricator.com/D16788
2016-11-01 16:03:44 -07:00
epriestley
191b9398a5 Fix some minor Calendar issues, including a paging issue on imports
Summary:
Fixes T11808. I couldn't reproduce the issue there locally so I'm just cheating a little bit until a better reproduction case shows up.

We don't need to do a full load here anyway, and testing for any row is more efficient.

Test Plan: Poked around imports without issues, but couldn't reproduce this problem locally.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11808

Differential Revision: https://secure.phabricator.com/D16787
2016-11-01 14:40:30 -07: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
6b16f930c4 Automatically send (not-so-great) email notifications for upcoming events
Summary: Ref T7931. This is still quite rough, but should technically send vaguely-useful email as part of the standard trigger infrastructure.

Test Plan: Ran `bin/phd start`, created an event shortly, saw reminder email send in `bin/mail list-outbound`.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T7931

Differential Revision: https://secure.phabricator.com/D16784
2016-11-01 13:24:40 -07:00