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
F17759748: D8380.id.diff
Tue, Jul 22, 6:47 PM
F17759557: D8380.id19916.diff
Tue, Jul 22, 6:37 PM
F17754522: D8380.id19915.diff
Tue, Jul 22, 10:56 AM
F17736911: D8380.diff
Sun, Jul 20, 6:50 PM
Unknown Object (File)
Jun 9 2025, 2:00 AM
Unknown Object (File)
May 19 2025, 7:40 PM
Unknown Object (File)
May 7 2025, 12:32 PM
Unknown Object (File)
May 6 2025, 5:22 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