Page MenuHomePhabricator

Improve rendering of tokenizer tokens in Herald when editing rules
ClosedPublic

Authored by epriestley on Dec 5 2015, 7:12 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 20, 11:56 PM
Unknown Object (File)
Thu, Dec 19, 7:17 PM
Unknown Object (File)
Sun, Dec 15, 4:06 PM
Unknown Object (File)
Thu, Dec 12, 8:28 AM
Unknown Object (File)
Wed, Dec 11, 11:58 PM
Unknown Object (File)
Sun, Dec 1, 10:08 AM
Unknown Object (File)
Sun, Dec 1, 7:33 AM
Unknown Object (File)
Sun, Dec 1, 7:33 AM
Subscribers

Details

Summary

Fixes T7848. @jasonfsmitty discussed an issue in great detail there and in D14359, and I completely missed it. Specifically:

  • If you save a "Change status to: Open" rule in Maniphest, and then edit it again, the token shows "Unknown Object (???)" instead of the correct token.
  • That's because loadHandles() has no idea what to do with the value "open", since it's not a real PHID.

The way we render tokenizer tokens in Herald is quite hacky right now. Fortunately, I wrote a slightly better way for EditEngine yesterday or the day before. Use the slightly better way to fix the issue with D14359.

This could still be better than it is, but the badness is mostly hidden now and can be cleaned up later without impacting anything.

Test Plan

Edited a Herald rule with projects and status changes, saw proper tokens.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Improve rendering of tokenizer tokens in Herald when editing rules.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
epriestley added a subscriber: jasonfsmitty.
chad edited edge metadata.
This revision is now accepted and ready to land.Dec 5 2015, 7:14 PM