Page MenuHomePhabricator

Fix some issues where Conpherence would make to many draft requests
ClosedPublic

Authored by epriestley on Mar 1 2014, 7:19 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Aug 25, 12:47 PM
Unknown Object (File)
Sun, Aug 25, 11:32 AM
Unknown Object (File)
Sat, Aug 24, 7:10 PM
Unknown Object (File)
Wed, Aug 21, 9:17 PM
Unknown Object (File)
Aug 20 2024, 10:05 PM
Unknown Object (File)
Aug 19 2024, 5:24 PM
Unknown Object (File)
Jul 31 2024, 2:21 AM
Unknown Object (File)
Jul 28 2024, 12:52 AM
Subscribers
Tokens
"Haypence" token, awarded by btrahan.

Details

Summary

A few minor fixes:

  • When we build a tag with "meta" => null, strip the attribute like we do for all other attributes. Previously, we would actually set the metadata to null. This happened with the Conpherence form.
  • Just respond to the draft request with an empty (but valid) response, instead of building a dialog.
  • PhabricatorShapedRequest is confusingly named and I should have caught this in review, but the basic shape of it is:
    • You make one object.
    • You call trigger() when stuff changes (e.g., a keystroke).
    • It manages making a small number of requests (e.g., one request after the user stops typing for a moment).
  • The way it was being used previously would incorrectly send a request for every keystroke.

I think I'm going to simplify ShapedRequest and merge it into some larger queue for T430.

Test Plan

Typed some text, no longer saw a flurry of requests. Reloaded page, still saw draft text.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

I'm just going to push this since I think it's pretty safe and Conpherence is super spinny right now when you type into it.

chad added a reviewer: chad.
This revision is now accepted and ready to land.Mar 1 2014, 7:21 PM

Well, @chad is typing something, I'll wait for him to finish. :3