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)
Thu, Apr 25, 3:29 AM
Unknown Object (File)
Thu, Apr 11, 4:31 PM
Unknown Object (File)
Thu, Apr 11, 10:47 AM
Unknown Object (File)
Sat, Apr 6, 6:38 AM
Unknown Object (File)
Tue, Apr 2, 5:41 AM
Unknown Object (File)
Sat, Mar 30, 1:01 AM
Unknown Object (File)
Mar 16 2024, 6:42 PM
Unknown Object (File)
Mar 16 2024, 6:38 PM
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