Homec4science

Fix some issues where Conpherence would make to many draft requests

Authored by epriestley <git@epriestley.com> on Mar 1 2014, 20:23.

Description

Fix some issues where Conpherence would make to many draft requests

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.

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran, chad

Differential Revision: https://secure.phabricator.com/D8380

Details

Committed
epriestley <git@epriestley.com>Mar 1 2014, 20:23
Pushed
aubortJan 31 2017, 17:16
Parents
rPHb383d2c338fa: Replace "Edit" controller with "EditPro" controller
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHe556d205772a: Fix some issues where Conpherence would make to many draft requests (authored by epriestley <git@epriestley.com>).Mar 1 2014, 20:23