Page MenuHomePhabricator

Adjustments to tags in HeaderView breaks workboard "point" tags
Closed, ResolvedPublic

Description

At HEAD, after D15396, workboards break because the "Points" tag isn't where the JS expects it to be. Here's a minimal fix:

diff --git a/src/view/phui/PHUIHeaderView.php b/src/view/phui/PHUIHeaderView.php
index 0e76aaf..c274bc7 100644
--- a/src/view/phui/PHUIHeaderView.php
+++ b/src/view/phui/PHUIHeaderView.php
@@ -346,7 +346,7 @@ final class PHUIHeaderView extends AphrontTagView {
         ));
     }
 
-    if ($this->properties || $this->policyObject) {
+    if ($this->properties || $this->policyObject || $this->tags) {
       $property_list = array();
       foreach ($this->properties as $type => $property) {
         switch ($type) {

This fixes things, but the rendering in the UI is a little funny, so maybe we don't want to do that:

Screen Shot 2016-03-04 at 5.58.56 PM.png (1×1 px, 113 KB)

The specific error is:

Error: JX.DOM.find(<node>, "span", "column-points"): matched no nodes.

That's coming out of this in WorkboardColumn.js:

this._pointsNode = JX.DOM.find(this._panel, 'span', 'column-points');

That should be pretty flexible about changes, but a possible fix might involve adjusting it.

Local repro is probably:

  • Enable "points" field.
  • View any workboard which you expect to have cards.
  • Check console for error / see no points node in DOM.

(This repros for me locally.)

This is only in master so not a big deal, HEAD of stable is fine.