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)
Mon, Nov 18, 9:43 PM
Unknown Object (File)
Sat, Nov 16, 5:44 PM
Unknown Object (File)
Oct 24 2024, 1:05 AM
Unknown Object (File)
Oct 21 2024, 5:36 PM
Unknown Object (File)
Oct 17 2024, 3:04 AM
Unknown Object (File)
Oct 14 2024, 2:08 AM
Unknown Object (File)
Sep 20 2024, 11:59 AM
Unknown Object (File)
Sep 20 2024, 9:25 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