1. 12 Sep, 2018 3 commits
    • epriestley's avatar
      Add a Phriction hint when a draft exists, and fix some draft editing bugs · b6ba75d9
      epriestley authored
      Summary:
      Depends on D19662. Ref T13077. See PHI840.
      
        - If you're looking at the published version of a document, but a draft version exists and you can edit it, add a hint/link.
        - Fix an issue where the "draft" transaction would complain when you created a document since the initial content is empty and no "draft" transaction is adding any content.
      
      Test Plan: Created new documents, viewed documents with current published versions and unpublished drafts.
      
      Reviewers: amckinley
      
      Reviewed By: amckinley
      
      Maniphest Tasks: T13077
      
      Differential Revision: https://secure.phabricator.com/D19663
      b6ba75d9
    • epriestley's avatar
      Allow Phriction document edits to be saved as drafts · 550028a8
      epriestley authored
      Summary:
      Depends on D19661. Ref T13077. See PHI840.
      
      When a user edits a page normally, add a "Save as Draft" button. Much of this change is around making that button render and behave properly: it needs to be an `<input type="submit" ...>` so browsers submit it and we can figure out which button the user clicked.
      
      Then there are a few minor rules:
      
        - If you're editing a page which is already a draft, we only give you "Save as Draft". This makes edits to update/revise a draft more natural.
        - Highlight "Publish" if it's a likely action that you might want to take.
      
      Internally, there are two types of edits. Both types create a new version with the new content. However:
      
        - A "content" edit sets the version shown on the live page to the newly-created version.
        - A "draft" edit does not update the version shown on the live page.
      
      Test Plan: Edited a published document, edited the draft. Published documents. Reverted documents.
      
      Reviewers: amckinley
      
      Reviewed By: amckinley
      
      Maniphest Tasks: T13077
      
      Differential Revision: https://secure.phabricator.com/D19662
      550028a8
    • epriestley's avatar
      Remove obsolete, nonfunctional draft auto-saving in Phriction · 152e7713
      epriestley authored
      Summary:
      Depends on D19660. Ref T5811. Ref T13077.
      
      Long ago, if you started editing a Phriction document but didn't save it, we'd save the draft in the background as part of the preview.
      
      D11169 updated the preview to use shared infrastructure and broke this function, since we never save drafts.
      
      Since this doesn't work right now, I want to add another thing called "draft", and the future of this feature should be more integrated with modern drafts and EditEngine (which fixed some bugs related to versioning), just get rid of this code for the moment.
      
      Test Plan: Edited documents. This code doesn't do anything since D11169, so no behavior changed.
      
      Reviewers: amckinley
      
      Reviewed By: amckinley
      
      Maniphest Tasks: T13077, T5811
      
      Differential Revision: https://secure.phabricator.com/D19661
      152e7713
  2. 30 Aug, 2018 1 commit
    • epriestley's avatar
      Store Phriction max version on Document, improve editing rules for editing documents with drafts · 3b1294cf
      epriestley authored
      Summary:
      Ref T13077. We need to know the maximum version of a document in several cases, so denormalize it onto the Document object.
      
      Then clean up some behaviors where we edit a document with, e.g., 7 versions but version 5 is currently published. For now, we: edit starting with version 7, save as version 8, and immediately publish the new version.
      
      Test Plan:
        - Ran migration.
        - Edited a draft page without hitting any weird version errors.
        - Checked database for sensible `maxVersion` values.
      
      Reviewers: amckinley
      
      Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam
      
      Maniphest Tasks: T13077
      
      Differential Revision: https://secure.phabricator.com/D19625
      3b1294cf
  3. 29 Aug, 2018 1 commit
    • epriestley's avatar
      Remove some unusual UI policy hints in Phriction · 04f8270a
      epriestley authored
      Summary:
      Ref T13077. We currently have these weird policy hints in Phriction that we don't use in other applications. Just remove them for consistency to make the eventual swap to EditEngine a little easier.
      
      Also nuke some unreacahble code.
      
      Test Plan: Loaded edit page, saw more standard UI.
      
      Reviewers: amckinley
      
      Maniphest Tasks: T13077
      
      Differential Revision: https://secure.phabricator.com/D19618
      04f8270a
  4. 31 Jul, 2018 1 commit
    • epriestley's avatar
      Add Spaces support to Phriction · 8d8086fc
      epriestley authored
      Summary:
      Ref T13164. See PHI774. Fixes T12435.
      
      Since Phriction is hierarchical, there isn't a super strong motivation to support Spaces: you can generally set policies on a small number of documents to get the desired effective policy behavior.
      
      However, it still improves consistency and there's no reason //not// to support Spaces. In the case where you have some moderately weird/complex policy on one or more Spaces, using Spaces to define the policy behavior can make things a bit simpler and easier to understand.
      
      This probably doesn't actually fix whatever the root problem in T12435 was (complicated, non-hierarchical access policies?). See also a bunch of discussion in T12442. So we might end up going beyond this to address other use cases, but I think this is reasonable regardless.
      
      Test Plan: Created and edited Phriction documents and shifted them between Spaces. Searched by Space, etc.
      
      Reviewers: amckinley
      
      Reviewed By: amckinley
      
      Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam
      
      Maniphest Tasks: T13164, T12435
      
      Differential Revision: https://secure.phabricator.com/D19553
      8d8086fc
  5. 27 Apr, 2018 1 commit
    • Austin McKinley's avatar
      Extend PhabricatorPolicyCodex interface to handle "interesting" policy defaults · 9a0dd554
      Austin McKinley authored
      Summary:
      Fixes T13128. Ref PHI590. This is a rough-and-ready implementation of a new `PhabricatorPolicyCodex->compareToDefaultPolicy()` method that subclasses can override to handle special cases of policy defaults. Also implements a `PolicyCodex` for Phriction documents, because the default policy of a Phriction document is the policy of the root document.
      
      I might break this change into two parts, one of which maintains the current behavior and another which implements `PhrictionDocumentPolicyCodex`.
      
      Test Plan: Created some Phriction docs, fiddled with policies, observed expected colors in the header. Will test more comprehensively after review for basic reasonable-ness.
      
      Reviewers: epriestley
      
      Reviewed By: epriestley
      
      Subscribers: Korvin, swisspol
      
      Maniphest Tasks: T13128
      
      Differential Revision: https://secure.phabricator.com/D19409
      9a0dd554
  6. 16 Feb, 2018 1 commit
  7. 06 Sep, 2017 1 commit
  8. 23 May, 2017 1 commit
  9. 16 May, 2017 1 commit
  10. 11 Sep, 2016 1 commit
    • Luke081515's avatar
      Fixed inconsistency at phriction · 9e4bca83
      Luke081515 authored
      Summary:
      * All Applications are useing the description "Tags", Phriction actually uses "Projects"
      * Changed "Projects" to "Tags" for phriction
      Ref T11614
      
      Test Plan:
      * Edited a document, took a look at the description for that input line
      * Added a project to a page and saved it
      
      Reviewers: chad, #blessed_reviewers
      
      Reviewed By: chad, #blessed_reviewers
      
      Subscribers: avivey, chad, epriestley
      
      Tags: #phriction
      
      Maniphest Tasks: T11614
      
      Differential Revision: https://secure.phabricator.com/D16537
      9e4bca83
  11. 09 Sep, 2016 1 commit
  12. 16 Apr, 2016 1 commit
    • June Rhodes's avatar
      Support relative links in Phriction · dd1023e5
      June Rhodes authored
      Summary:
      Resolves T7691.  This turned out more complex than I really wanted, mainly because I needed to feed the slug information through to both the document renderer and the preview window that appears in the edit controller.
      
      After this change, you can now create relative links in Phriction by doing `[[ ./../some/relative/path ]]`.  Relative paths aren't handled anywhere else (they'll still render, but the dots are turned into a literal 'dot' as per existing behaviour).
      
      Test Plan: Created some Phriction documents with relative links, saw them all link correctly.
      
      Reviewers: #blessed_reviewers, epriestley
      
      Reviewed By: #blessed_reviewers, epriestley
      
      Subscribers: Korvin
      
      Maniphest Tasks: T7691
      
      Differential Revision: https://secure.phabricator.com/D15732
      dd1023e5
  13. 02 Apr, 2016 1 commit
  14. 22 Nov, 2015 1 commit
    • Chad Little's avatar
      Update Phriction for PHUIDocumentViewPro · bf227f77
      Chad Little authored
      Summary: Moves Phriction to use PHUIDocumentViewPro
      
      Test Plan: Read lots of documents, tablet, mobile, and desktop. Check ToC, non ToC, Edit a Maniphest Task, New Phriction Document, edit Phriction Document.
      
      Reviewers: epriestley
      
      Reviewed By: epriestley
      
      Subscribers: Korvin
      
      Maniphest Tasks: T9826
      
      Differential Revision: https://secure.phabricator.com/D14399
      bf227f77
  15. 03 Sep, 2015 1 commit
  16. 22 Jul, 2015 1 commit
  17. 25 Jun, 2015 1 commit
  18. 13 Jun, 2015 1 commit
    • Chad Little's avatar
      [Redesign] Move basefont to Lato, remove Source Sans Pro · 9170e901
      Chad Little authored
      Summary: Working towards a more unified look and feel. This brings in Lato as a complete base font over Helvetica Neue, as well as removing Source Sans Pro from DocumentView and Conpherence. Design-wise Lato provides the nice readability at larger font sizes that Source Sans Pro did, with the ability to scale down to tables and UI widgets with ease. This gives us one font instead of two, and now Object descriptions and Timeline posts all can benefit from a consistent, readable font.
      
      Test Plan:
      Test main UI, smaller elements like tables, menus, DocumentViews, Previews, Conpherence.
      
      {F498135}
      
      {F498136}
      
      Reviewers: btrahan, epriestley
      
      Reviewed By: epriestley
      
      Subscribers: epriestley, Korvin
      
      Differential Revision: https://secure.phabricator.com/D13276
      9170e901
  19. 22 May, 2015 1 commit
  20. 01 Mar, 2015 1 commit
    • Chad Little's avatar
      Move PHUIErrorView to PHUIInfoView · c038c643
      Chad Little authored
      Summary: Since this element isn't strictly about errors, re-label as info view instead.
      
      Test Plan: Grepped for all callsites, tested UIExamples and a few other random pages.
      
      Reviewers: btrahan, epriestley
      
      Reviewed By: epriestley
      
      Subscribers: hach-que, Korvin, epriestley
      
      Differential Revision: https://secure.phabricator.com/D11867
      c038c643
  21. 20 Feb, 2015 1 commit
    • Bob Trahan's avatar
      Phriction - clarify error message when trying to delete already deleted content · 0a0ac114
      Bob Trahan authored
      Summary: Fixes T7325, T7326, T7328. When you have deleted a document already you have to specify content; this makes this more clear to the user in this specific delete pathway. Also, includes bonus bug fix for T7326 where we weren't moving the title of the wiki page with the rest of the page.
      
      Test Plan: moved a wiki doc and verified it had the title I had specified. tried to delete an already deleted doc via setting the content to blank (i.e. hitting save after making some other edits) and got more clear error UI state
      
      Reviewers: epriestley
      
      Reviewed By: epriestley
      
      Subscribers: Korvin, epriestley
      
      Maniphest Tasks: T7328, T7325, T7326
      
      Differential Revision: https://secure.phabricator.com/D11829
      0a0ac114
  22. 02 Feb, 2015 1 commit
    • Chad Little's avatar
      PHUIErrorView · 3da38c74
      Chad Little authored
      Summary: Clean up the error view styling.
      
      Test Plan:
      Tested as many as I could find, built additional tests in UIExamples
      
      {F280452}
      
      {F280453}
      
      Reviewers: btrahan, epriestley
      
      Reviewed By: epriestley
      
      Subscribers: hach-que, Korvin, epriestley
      
      Differential Revision: https://secure.phabricator.com/D11605
      3da38c74
  23. 11 Nov, 2014 1 commit
  24. 07 Nov, 2014 1 commit
    • Bob Trahan's avatar
      Phriction - policy front end changes · c8d20d3c
      Bob Trahan authored
      Summary:
      Ref T4029. Fixes T6034.
      
      Various front-end miscellania here. See D10814#96251. This more or less makes policy work but I am not going to call it "fixed" here since we need D10814 to be deployed too and will do that manually.
      
      Test Plan:
      - changed document policy from web ui and changes persisted
      - changed document policy from web and had form error and changes persisted
      - created a structure like users/users/justmyuserpolicy and made sure another user could delete the users/users/ doc
      - moved a doc from a to b and verified policy persisted
      - verified stub documents inherited policy of the document that stub them...!
      - uploaded a file and verified that it 1) had the permissions of the page it was added to and 2) had an "attached" tab linking back to the page on the file page (this means T6034 is fixed with this)
      
      Reviewers: epriestley
      
      Reviewed By: epriestley
      
      Subscribers: Korvin, epriestley
      
      Maniphest Tasks: T6034, T4029
      
      Differential Revision: https://secure.phabricator.com/D10816
      c8d20d3c
  25. 06 Nov, 2014 1 commit
    • Bob Trahan's avatar
      Phriction - consolidate edit business logic into Editor · 37bc0474
      Bob Trahan authored
      Summary:
      Ref T4029. Some business logic lives outside the editor. This revision moves that logic from the edit controller into the editor proper. This makes re-using that business logic across other endpoints - say like a conduit end point - possible. This is also part of the general modernization quest for phriction I am on.
      
      This diff also restores the functionality where you can delete a document by wiping out the content and saving.
      
      Test Plan: tried to make a document with no title or content and saw errors. opened a document for edit with user 1, then made edits with user 2, then saw an error when i made the edit with user 1. clicking "overwrite changes" then worked.  deleted a document by wiping out the body and clicking save.
      
      Reviewers: epriestley
      
      Reviewed By: epriestley
      
      Subscribers: Korvin, epriestley
      
      Maniphest Tasks: T4029
      
      Differential Revision: https://secure.phabricator.com/D10795
      37bc0474
  26. 30 Oct, 2014 1 commit
    • Bob Trahan's avatar
      Phriction - start the move towards transactions and an editor · a9fc343d
      Bob Trahan authored
      Summary:
      This implements as little as possible to stick a working transactions + editor codepath in the basic create / edit flow. Aside from the transaction tables, this also required adding a mailKey to a phrictionDocument.
      
      Future work would include adding more transactions types for things like "move" and all the pertinent support. Even future work is to add things like policies which will work easily in the transaction framework. Ref T4029.
      
      Test Plan:
       - made a wiki doc
       - edit a wiki doc
       - had someone subscribe to a wiki doc and edited it
      
      For all three, the edits worked, a reasonable email was sent out, and feed stories were generated.
      
       - made a wiki doc at a /location/like/this
      
      document "stubs" were made as expected in /location and /location/like
      
      Reviewers: epriestley
      
      Reviewed By: epriestley
      
      Subscribers: chad, Korvin, epriestley
      
      Maniphest Tasks: T4029
      
      Differential Revision: https://secure.phabricator.com/D10756
      a9fc343d
  27. 07 Oct, 2014 1 commit
  28. 23 Jun, 2014 1 commit
  29. 21 May, 2014 1 commit
    • epriestley's avatar
      Don't warn about conflicts when reverting Phriction documents · 3c8d88de
      epriestley authored
      Summary:
      Fixes T5144. This was incorrectly checking the //content// version, not the //head// version, so reverts would raise the "conflict" warning.
      
      Also fix a couple of FontAwesome icons.
      
      Test Plan:
        - Edited a document.
        - Reverted a document.
        - Opened two edit tabs. Edited one, tried to edit #2, got a warning.
        - Opened two revert tabs. Reverted in one, tried to revert in #2, got a warning.
      
      Reviewers: btrahan, chad
      
      Reviewed By: chad
      
      Subscribers: epriestley
      
      Maniphest Tasks: T5144
      
      Differential Revision: https://secure.phabricator.com/D9249
      3c8d88de
  30. 19 May, 2014 2 commits
    • epriestley's avatar
      Use PhrictionDocumentQuery to load documents · 4d7c1026
      epriestley authored
      Summary: Ref T4029. We use a lot of very outdated content loading in Phriction, which blocks T4029.
      
      Test Plan:
      - Called phriction.info
      - Called phriction.history
      - Called phriction.edit
      - Viewed document list.
      - Deleted a document.
      - Viewed history.
      - Viewed a diff.
      - Created a document.
      - Edited a document.
      - Moved a document.
      - Tried to overwrite a document with "new".
      - Tried to overwrite a document with "move".
      - Viewed a moved document note.
      
      Reviewers: btrahan
      
      Reviewed By: btrahan
      
      Subscribers: shadowhand, epriestley
      
      Maniphest Tasks: T4029
      
      Differential Revision: https://secure.phabricator.com/D9194
      4d7c1026
    • epriestley's avatar
      Add very basic conflict detection to Phriction · b1ec4a9a
      epriestley authored
      Summary: Ref T4768. This is extremely basic, but will stop conflicts from going silently unnoticed.
      
      Test Plan: {F156219}
      
      Reviewers: btrahan
      
      Reviewed By: btrahan
      
      Subscribers: epriestley
      
      Maniphest Tasks: T4768
      
      Differential Revision: https://secure.phabricator.com/D9167
      b1ec4a9a
  31. 10 Jan, 2014 1 commit
  32. 19 Dec, 2013 1 commit
    • epriestley's avatar
      Provide convenience method addTextCrumb() to PhabricatorCrumbsView · a5dc9067
      epriestley authored
      Summary: We currently have a lot of calls to `addCrumb(id(new PhabricatorCrumbView())->...)` which can be expressed much more simply with a convenience method. Nearly all crumbs are only textual.
      
      Test Plan:
        - This was mostly automated, then I cleaned up a few unusual sites manually.
        - Bunch of grep / randomly clicking around.
      
      Reviewers: btrahan, chad
      
      Reviewed By: btrahan
      
      CC: hach-que, aran
      
      Differential Revision: https://secure.phabricator.com/D7787
      a5dc9067
  33. 07 Nov, 2013 1 commit
    • Bob Trahan's avatar
      Phriction - make the check for project sub pages more fine-grained · 9084f1fe
      Bob Trahan authored
      Summary:
      we were just checking if projects/ was in the URI before barfing. Use some more fun utility functions such that we only complain if there is no project.
      
      Fixes T4071.
      
      Test Plan: made a subpage under a project - success! tried to make a project wiki page where there was no project - successful failure! tried to make a project wiki sub page where there was no project - successful failure!
      
      Reviewers: epriestley, chad
      
      Reviewed By: epriestley
      
      CC: Korvin, epriestley, aran
      
      Maniphest Tasks: T4071
      
      Differential Revision: https://secure.phabricator.com/D7527
      9084f1fe
  34. 25 Sep, 2013 1 commit
    • Chad Little's avatar
      Move PHUIFormBoxView to PHUIObjectBoxView · 9be7a948
      Chad Little authored
      Summary: I'd like to reuse this for other content areas, renaming for now. This might be weird to keep setForm, but I can fix that later if we need.
      
      Test Plan: reload a few forms in maniphest, projects, differential
      
      Reviewers: epriestley, btrahan
      
      Reviewed By: epriestley
      
      CC: Korvin, aran
      
      Differential Revision: https://secure.phabricator.com/D7120
      9be7a948
  35. 26 Aug, 2013 1 commit
    • Chad Little's avatar
      Update Form Layouts · fe2a96e3
      Chad Little authored
      Summary:
      This attempts some consistency in form layouts. Notably, they all now contain headers and are 16px off the sides and tops of pages. Also updated dialogs to the same look and feel. I think I got 98% of forms with this pass, but it's likely I missed some buried somewhere.
      
      TODO: will take another pass as consolidating these colors and new gradients in another diff.
      
      Test Plan: Played in my sandbox all week. Please play with it too and let me know how they feel.
      
      Reviewers: epriestley, btrahan
      
      Reviewed By: epriestley
      
      CC: Korvin, aran
      
      Differential Revision: https://secure.phabricator.com/D6806
      fe2a96e3
  36. 20 Aug, 2013 1 commit
  37. 05 Aug, 2013 1 commit