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
F15435988: D8380.id.diff
Tue, Mar 25, 11:16 AM
F15435987: D8380.id19915.diff
Tue, Mar 25, 11:16 AM
F15435986: D8380.id19916.diff
Tue, Mar 25, 11:16 AM
F15390313: D8380.id19915.diff
Sat, Mar 15, 6:07 AM
F15387169: D8380.id19916.diff
Sat, Mar 15, 1:56 AM
F15334376: D8380.id.diff
Mar 8 2025, 8:37 AM
Unknown Object (File)
Feb 24 2025, 11:33 AM
Unknown Object (File)
Feb 23 2025, 4:49 PM
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