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

3788 commits

Author SHA1 Message Date
epriestley
caa7fcef58 render_tag -> tag: more miscellaenous easy cases
Summary: These all yeilded fairly easily.

Test Plan: Inspection / loaded pages.

Reviewers: vrana

Reviewed By: vrana

CC: aran

Maniphest Tasks: T2432

Differential Revision: https://secure.phabricator.com/D4694
2013-01-28 18:46:48 -08:00
epriestley
da27b448fa render_tag -> tag: DifferentialResultsTableView
Summary: Fix lint and unit results escaping.

Test Plan:
Looked at lint/unit results. Clicked show/hide:

{F30680}

Reviewers: vrana

Reviewed By: vrana

CC: aran

Maniphest Tasks: T2432

Differential Revision: https://secure.phabricator.com/D4693
2013-01-28 18:46:04 -08:00
epriestley
114ed6c7fe DarkConsole: fix rendering, move request log, load over ajax
Summary:
This accomplishes three major goals:

  # Fixes phutil_render_tag -> phutil_tag callsites in DarkConsole.
  # Moves the Ajax request log to a new panel on the left. This panel (and the tabs panel) get scrollbars when they get large, instead of making the page constantly scroll down.
  # Loads the panel content over ajax, instead of dumping it into the page body / ajax response body. I've been planning to do this for about 3 years, which is why the plugins are architected the way they are. This should make debugging easier by making response bodies not be 50%+ darkconsole stuff.

Additionally, load the plugins dynamically (the old method predates library maps and PhutilSymbolLoader).

Test Plan:
{F30675}

  - Switched between requests and tabs, reloaded page, saw same tab.
  - Used "analyze queries", "profile page", triggered errors.
  - Verified page does not load anything by default if dark console is closed with Charles.
  - Generally banged on it a bit.

Reviewers: vrana, btrahan, chad

Reviewed By: vrana

CC: aran

Maniphest Tasks: T2432

Differential Revision: https://secure.phabricator.com/D4692
2013-01-28 18:45:32 -08:00
epriestley
9a0ae6376f render_tag -> tag: pinboards
Summary: Fix pinboard callsites.

Test Plan: Looked at Pholio and Macro.

Reviewers: vrana

Reviewed By: vrana

CC: aran

Maniphest Tasks: T2432

Differential Revision: https://secure.phabricator.com/D4690
2013-01-28 18:44:54 -08:00
epriestley
edfcd7bd2d render_tag -> tag: phame, remarkup
Summary: Converts various callsites from render_tag variants to tag variants.

Test Plan: See inlines.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T2432

Differential Revision: https://secure.phabricator.com/D4689
2013-01-28 18:44:15 -08:00
epriestley
820c6279f3 More render_tag -> tag (misc, form inset view)
Summary: Converts some callsites.

Test Plan: Grepped; looked -- see inlines.

Reviewers: vrana

Reviewed By: vrana

CC: aran

Maniphest Tasks: T2432

Differential Revision: https://secure.phabricator.com/D4688
2013-01-28 18:42:57 -08:00
epriestley
fb6dbd7d3a Convert more render_tag -> tag
Summary: Mostly straightforward.

Test Plan: Browsed most of the affected interfaces.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T2432

Differential Revision: https://secure.phabricator.com/D4687
2013-01-28 18:41:43 -08:00
epriestley
08bcb8c30a Simplify form/lightbox stuff
Summary:
I broke this a bit a few revisions ago by making `phabricator_render_csrf_magic()` return array instead of string without actually grepping for callsites.

Instead of building a form in JS, build it in PHP and just change its action in JS. This is simpler and doesn't require us to expose CSRF magic in more places.

This change triggered a rather subtle bug: if we rendered a normal form on the page (and thus installed the "disable forms when submitted" behavior), the download button would incorrectly disable after being clicked. This doesn't currently happen in Files because we don't put a form on the same page as the download button.

Instead, make the "disable" behavior check if the form is downloading stuff, and not disable stuff if it is. Then mark the lightbox and Files form as both download forms.

Test Plan: Used lightbox; used Files. Verified download buttons download the right stuff and behave correctly. Grepped for other download forms, but all the other places where we write "download" don't appear to actually be download links.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T2432

Differential Revision: https://secure.phabricator.com/D4685
2013-01-28 18:12:09 -08:00
epriestley
fc4cb57357 Fix JSON encoding of PhutilSafeHTML for browser consumption
Summary:
If you run this code:

  json_encode(array('tag' => phutil_tag('div', array())));

...you get this result, because json_encode() does not call toString() on objects:

  {"tag":{}}

Instead, convert such objects to their underlying strings. Javelin has support for JX.HTML and for implicit conversion (which is kind of sketchy for other reasons) but it's sort of complicated (only happens on Ajax, not behaviors) and messy (not metadata-based), so ignore it for now.

We'll need to do something similar for serialization to the database. My plan there is just to throw on any objects. The only time we put HTML in the database is cache-related and those tiny number of callsites can manually handle it.

Test Plan: Various ajax things now receive the correct data.

Reviewers: vrana

Reviewed By: vrana

CC: aran

Maniphest Tasks: T2432

Differential Revision: https://secure.phabricator.com/D4684
2013-01-28 18:11:27 -08:00
epriestley
47f2df5f51 Fix most timeline escaping
Summary: Some content might be broken but it's hard to test since JS/Ajax is also a bit broken.

Test Plan: Looked at timeline examples.

Reviewers: vrana

Reviewed By: vrana

CC: aran

Maniphest Tasks: T2432

Differential Revision: https://secure.phabricator.com/D4683
2013-01-28 18:09:33 -08:00
epriestley
d83257c29a Fix object ObjectItemListView attributes
Summary: This works after pht() + html got sorted out.

Test Plan: Looked at some object attribute lists.

Reviewers: vrana

Reviewed By: vrana

CC: aran

Maniphest Tasks: T2432

Differential Revision: https://secure.phabricator.com/D4645
2013-01-28 18:09:00 -08:00
epriestley
f9030885c4 Merge branch 'master' into phutil_tag
(Just synchronizing master into the tag branch.)
2013-01-27 06:02:06 -08:00
Lauri-Henrik Jalonen
ba3b7854fc Documentation fix
Summary: Fixed documentation to reflect reality.

Test Plan: .

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4675
2013-01-27 05:25:36 -08:00
Bob Trahan
24b274ded3 Conpherence - make attaching files work better
Summary: unifies the code and presentation between adding files via email and web. Also makes it possible to "attach" the same file multiple times, either by just talking about it in the different messages or multiple times in the same message.

Test Plan: sent message with attachment - it worked! sent a message referencing previous attachment - it work! sent a message with the same attachment in it like 12 times - it worked!

Reviewers: epriestley, chad

Reviewed By: chad

CC: aran, Korvin

Maniphest Tasks: T2399

Differential Revision: https://secure.phabricator.com/D4679
2013-01-26 19:56:39 -08:00
Bob Trahan
c046aa64c1 realized should probably wrap this in idx... and i haven't cowboy committed in a bit. :P 2013-01-26 19:03:00 -08:00
Bob Trahan
ad29c98610 Remarkup - add as much image dimension hinting as possible
Summary: this was done for conpherence so the auto-scroll actually works. NOTE we actually use the 220 preview UI for file attachments right now so this really only helps in the macro case. :/

Test Plan: sent some conpherences with macros and files. verified image width / height was set as expected.

Reviewers: epriestley, chad

Reviewed By: chad

CC: aran, Korvin

Maniphest Tasks: T2399

Differential Revision: https://secure.phabricator.com/D4678
2013-01-26 18:59:35 -08:00
Bob Trahan
22ce74c5a8 Conpherence - fix unread counts
Summary: we weren't updating the "latest seen transaction PHID" properly. do that and ONLY do it from the view handler so we know the user got a real good chance of actually seeing the message. also we weren't searching through the transactions correctly; fix that.

Test Plan: sent a test user some messages. noted the proper count of unread messages.

Reviewers: epriestley, chad

Reviewed By: chad

CC: aran, Korvin

Maniphest Tasks: T2399

Differential Revision: https://secure.phabricator.com/D4677
2013-01-26 18:53:30 -08:00
Bob Trahan
9437bc019d Conpherence - make updating title + picture a dialogue that uses drag and drop upload control
Summary: decent title. Stylistically its probably a bit rough. Also, I think @chad describes an even hotter workflow in T2418. Note this removes the "default image" thing which I don't think makes sense conceptually since by default the image changes to who replied last...

Test Plan: uploaded an image - worked. uploaded a txt file - got ugly errors that file was not supported.

Reviewers: epriestley, chad

Reviewed By: chad

CC: aran, Korvin

Maniphest Tasks: T2417

Differential Revision: https://secure.phabricator.com/D4668
2013-01-26 17:14:58 -08:00
Bob Trahan
64543a9476 attempt 3 at fixing conpherence mail handler
Summary: you have to attach files and participants before you can start editing the conpherenece

Test Plan: push it live and try again

Reviewers: chad, epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2399

Differential Revision: https://secure.phabricator.com/D4674
2013-01-26 17:12:52 -08:00
Chad Little
dca2048bab Notifcation icons for Conpherence
Summary: Adds notification icons for Conpherence and re-writes the CSS a bit for the new icons and states. I removed the background bubble here and went straight CSS. I also seem to have a JS error and the notification menu doesn't display, but I'm tired and wanted to look at this in Differential. Will update after JS fix.

Test Plan: Turned on notification numbers and conpherence numbers, turned them off. Made them big. Checked FF and IE.

Reviewers: epriestley, btrahan

Reviewed By: btrahan

CC: aran, Korvin

Maniphest Tasks: T2415

Differential Revision: https://secure.phabricator.com/D4666
2013-01-26 17:04:18 -08:00
Chad Little
251a7b0602 Reasonable pht pass at auth.
Summary: Spent some time going through auth stuff for pht's.

Test Plan: Tested logging in, logging out, reseting password, using Github, creating a new account. I couldn't quite test everything so will double read the diff when I submit it.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4671
2013-01-26 16:17:44 -08:00
Lauri-Henrik Jalonen
5cb8787d91 Removed psth column from herald transcript
Summary: Added patch file to remove psth column in herald transcript tabe

Test Plan: Verified that column was removed with ./bin/storage upgrade

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2425

Differential Revision: https://secure.phabricator.com/D4672
2013-01-26 15:22:18 -08:00
epriestley
1670f5841d Set messageIDHash from SendGrid and Test controllers
Summary:
Most mail comes in through the script, but we can also generate it with the test controller or the SendGrid receiver.

In these cases, we produce a `null` message hash ID, which fails on inserts into MySQL databases configured in strict mode.

Instead, correctly generate the hash ID in these cases (for tests, make one up).

Test Plan: Generated test mail. (I'll see if @sokcevic can test SendGrid).

Reviewers: btrahan

Reviewed By: btrahan

CC: sokcevic, aran

Maniphest Tasks: T2423

Differential Revision: https://secure.phabricator.com/D4667
2013-01-26 15:22:06 -08:00
Bob Trahan
3f91559b8a fix mail handler for conpherence try 2
Summary: the editor methods are protected so just build a reply handler directly

Test Plan: push it live and try again

Reviewers: epriestley, chad

Reviewed By: chad

CC: aran, Korvin

Maniphest Tasks: T2399

Differential Revision: https://secure.phabricator.com/D4670
2013-01-26 10:49:20 -08:00
Chad Little
ab80d52290 Shorten text area in conpherence.
Summary: I'm having a hard time on a 15" display reading the thread due to the height of the text box. I shortened it and it still allows you to wax and wane for quite a while.

Test Plan: reload page, see shortened bar. Check FF and Chrome.

Reviewers: epriestley, btrahan

Reviewed By: btrahan

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4669
2013-01-26 09:59:21 -08:00
Bob Trahan
3a4e0045be make conpherence reply handler work
Summary: it doesn't work right now. updating this regex should fix it methinks

Test Plan: gotta push it live

Reviewers: chad, epriestley

Reviewed By: chad

CC: aran, Korvin

Maniphest Tasks: T2399

Differential Revision: https://secure.phabricator.com/D4663
2013-01-26 09:14:19 -08:00
Ricky Elrod
323cd82518 Entries, not entry.
Test Plan: Untested.

Reviewers: vrana, epriestley

Reviewed By: vrana

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4664
2013-01-25 20:05:29 -08:00
epriestley
a1ff679f41 Fix AphrontCrumbView (phutil_tag)
Summary: Proper fix is to do some layout work in Diffusion. Short of that, make this escape properly.

Test Plan: Viewed various crumbs, no more overescaping for non-diffusion crumbs.

Reviewers: vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D4641
2013-01-25 17:07:07 -08:00
epriestley
f6622f43e6 Replace all array_combine(x, x) with array_fuse(x) in Phabricator
Summary: Fixes various array_combine() warnings for PHP < 5.4

Test Plan: lint/unit/grep

Reviewers: btrahan, vrana, chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D4660
2013-01-25 17:06:55 -08:00
Bob Trahan
4d22c9104f Conpherence - reply handler integration
Summary: Added a reply handler. A few problems -- first, I can't seem to get this to actually send me email so I haven't been able to reply (which I would have done by generating a reply, then copying the raw email into scripts/mail_handler.php). Second, the subject is often terrible on these emails -- unless the conpherence is named its something gross like "E4:" Third, on create I am noticing an error on array_combine() which I think is related to the need to write array_combine_not_broken or what have you I saw go by... (PhabricatorTransactionEditor does array_combine(xaction->getOldValue(), xaction->getOldValue()) and complains that the arrays are empty)

Test Plan: noted that /mail/ said mails were being sent

Reviewers: epriestley

Reviewed By: epriestley

CC: chad, aran, Korvin

Maniphest Tasks: T2399

Differential Revision: https://secure.phabricator.com/D4656
2013-01-25 16:03:54 -08:00
Chad Little
e344f57df1 Conpherence CSS tweaks.
Summary: Just a rough pass at the CSS on Conpherence. Need a second pass for the widgets.

Test Plan: Reload Conpherence, Chrome, FF

Reviewers: btrahan, epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4661
2013-01-25 15:48:04 -08:00
Nick Harper
d980adfe3f Don't do string concatenation in queryfx_all()
Summary: Searching for image macros was broken, and this fixes it.

Test Plan: load /macro/?name=test - the page loads instead of throwing an exception

Reviewers: vrana, epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4658
2013-01-25 15:22:36 -08:00
Chad Little
48c5356111 Tweak spacing a little more on ObjectList
Summary: Just a hair tighter, also checked out Ponder as well.

Test Plan: Check Ponder, Config groups, and Config options list.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4655
2013-01-25 14:57:10 -08:00
Chad Little
4ae548f9ba Reduce vertical height on object list.
Summary: Tightens up the spacing between the title and subtitle, helps shave 3px an object.

Test Plan: epriestley

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4654
2013-01-25 14:30:14 -08:00
Chad Little
564d926650 Conpherence Icons
Summary: Reload Homepage. See icons. Not positive will keep this icon, as it's smaller in mass than others. Will look around.

Test Plan: Photoshop

Reviewers: epriestley, btrahan

Reviewed By: btrahan

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4652
2013-01-25 13:37:11 -08:00
Lauri-Henrik Jalonen
3838e14ad8 Enhanced PholioMockQuery
Summary:
Images and cover files can now be attached calling need functions for PholioMockQuery.
Mock list will show cover files for mocks.
MockView uses new feature to show the first image

Test Plan: Verified that images are shown.

Reviewers: epriestley

CC: aran, Korvin

Maniphest Tasks: T2364

Differential Revision: https://secure.phabricator.com/D4644
2013-01-25 13:29:54 -08:00
Bob Trahan
9d23a49c91 random cleanup from long ago
Summary: was doing some work in here and noticed this old crap lying around. T547 was last updated in December 2011 so I think its okay to delete these old mail hashes now.

Test Plan: careful code inspection, though I will be testing mail like whoa for the rest of the day probably

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T547

Differential Revision: https://secure.phabricator.com/D4650
2013-01-25 13:11:20 -08:00
Bob Trahan
b7f7b8aff0 Conpherence - hide file transactions
Summary: added support for when showHide is true AND set showHide to true for Files.

Test Plan: loaded a conpherence and saw no more "updated files" transacations

Reviewers: chad, epriestley

Reviewed By: chad

CC: aran, Korvin

Maniphest Tasks: T2399, T2411

Differential Revision: https://secure.phabricator.com/D4649
2013-01-25 13:04:40 -08:00
epriestley
b9f394164f Add renderHTMLView
Summary:
  - Implement AphrontView->renderHTMLView(), which works like AphrontView->renderSingleView() but always return PhutilSafeHTML.

Test Plan: Action list view no longer as broken.

Reviewers: vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D4642
2013-01-25 12:57:47 -08:00
epriestley
3093d1663d Add javelin_tag(), convert easy callsites
Summary:
  - Implements `javelin_tag()`, which is `javelin_render_tag()` on top of `phutil_tag()` instead of `phutil_render_tag()`.
  - Manually converts all or almost all of the trivial callsites.

Test Plan:
  - Site does not seem any more broken than before.

Reviewers: vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D4639
2013-01-25 12:57:17 -08:00
epriestley
94da7c2033 Restore string cast for textarea control
Summary: Removed in 48561a8b but actually necessary.

Test Plan: Differential now renders textareas correctly.

Reviewers: vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D4643
2013-01-25 12:56:11 -08:00
vrana
fc6838b890 Fix double escaping after D4638
Auditors: epriestley
2013-01-25 12:05:03 -08:00
epriestley
3e147dd61c Fix some easy phutil_render_tag()
Summary:
  - Grepped for phutil_render_tag().
  - Fixed some easy ones.

Test Plan:
  - Browsed around; site didn't seem more broken than it was before.

Reviewers: vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D4638
2013-01-25 11:39:23 -08:00
Vedha Sayyaparaju
cf346d3c81 T2385: Add "Delete Document" action to Phriction pages
Summary: If a page has not been deleted, this adds an action button to delete the document in the menu on the Phriction Page.

Test Plan:
1. Created a document, checked whether "Delete Document" button was visible.
2. Clicked on "Delete Document" button, checked that the document had been deleted.
3. Went back to document page, checked that the "Delete Document" button no longer existed.

Reviewers: epriestley

CC: aran, Korvin

Maniphest Tasks: T2385

Differential Revision: https://secure.phabricator.com/D4636
2013-01-24 21:48:33 -08:00
epriestley
cf7534f971 Minor, fix formatting in configuration doc. 2013-01-24 21:26:27 -08:00
Chad Little
bf3d972e72 Add setStackable to ObjectItemList and use in Config
Summary:
This adds a new method for rendering the object list as a stackable set of items. Good for certain renderings like Config.

u

Test Plan: Review list on iOS, Chrome, FF.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4637
2013-01-24 21:00:47 -08:00
vrana
9670f0c636 Convert phutil_render_tag(X, Y, phutil_render_tag(...)) to phutil_render_html
Summary:
Created with spatch:

  lang=diff
  - phutil_render_tag
  + phutil_render_html
    (X, Y, phutil_render_tag(...))

  - phutil_render_tag
  + phutil_render_html
    (X, Y, phutil_render_html(...))

Test Plan: Loaded homepage

Reviewers: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4502
2013-01-24 19:35:51 -08:00
vrana
3c1b8df8ae Convert simple phutil_render_tag() to phutil_tag()
Summary: Done manually.

Test Plan: Loaded homepage.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4509
2013-01-24 19:30:50 -08:00
vrana
21a5956a35 Convert phutil_render_tag(X, Y, pht('...')) to phutil_tag
Summary:
Created with spatch:

  lang=diff
  - phutil_render_tag
  + phutil_tag
    (X, Y, pht('...'))

The searched for `<` and `&` by sgrep.

Test Plan: Loaded homepage.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4504
2013-01-24 19:20:30 -08:00
vrana
20768d65d5 Convert phutil_render_tag(X, Y, '...') to phutil_tag
Summary:
Created with spatch:

  lang=diff
  - phutil_render_tag
  + phutil_tag
    (X, Y, '...')

Then searched for `&` and `<` in the output and replaced them.

Test Plan: Loaded homepage.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4503
2013-01-24 19:20:27 -08:00