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
F13996926: D8380.id19916.diff
Thu, Oct 24, 1:05 AM
F13989030: D8380.diff
Mon, Oct 21, 5:36 PM
F13969547: D8380.id19915.diff
Thu, Oct 17, 3:04 AM
F13955597: D8380.id19916.diff
Mon, Oct 14, 2:08 AM
Unknown Object (File)
Sep 20 2024, 11:59 AM
Unknown Object (File)
Sep 20 2024, 9:25 AM
Unknown Object (File)
Aug 25 2024, 12:47 PM
Unknown Object (File)
Aug 25 2024, 11:32 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