Page MenuHomePhabricator

Task view's HTML: Provide ID parameters for unique items
Closed, WontfixPublic

Description

As a ticket triager I'm used to using local scripts (Greasemonkey) to semi-automate some tasks in the browser (not via API) which requires accessing certain items.

Looking at the HTML of a task in Maniphest, in "phui-property-list-properties-wrap" I only see generic key/value classes:

  • <dt class="phui-property-list-key">
  • <dd class="phui-property-list-value">

(Similar problem for items under "phui-property-list-actions")

It would be lovely if at least the values had unique ID parameters (or in case of multiple values possible, like for "Subscribers", a wrapper with an ID).
This would allow using getElementById() instead of more cumbersome getElementsByClassname() or going down the DOM tree via XPath.

Also, are items like
<button name="submit" type="submit">Avast!</button>
<div class="remarkup-assist-bar">
unique on a task page? In that case they'd also be good candidates for IDs.

I appreciate that <textarea id="transaction-comments"> already has an ID. :)

Event Timeline

aklapper raised the priority of this task from to Needs Triage.
aklapper updated the task description. (Show Details)
aklapper added a project: Maniphest.
aklapper added a subscriber: aklapper.
epriestley triaged this task as Wishlist priority.Apr 11 2014, 9:48 PM
epriestley added a subscriber: epriestley.

We're unlikely to pursue this, at least in the near term:

  • No one else has ever asked for it.
  • It serves an awkward place between user friendly tools like the Batch Editor and full-power API/CLI tools, but is way worse for us to build/maintain than those things are.
  • The DOM isn't a stable API and we don't want to encourage users to use it like one (see T4213: Provide custom themes, skinning, or custom CSS for discussion). Particularly, this bit applies fairly well to including other markers in the DOM, even if the goal is Greasemonkey scripting rather than themeing:

If we'd had theming support a year ago, everyone who had written custom CSS would have had their theme completely broken multiple times. If we provided support today, everyone's themes would almost certainly break a dozen times in the next year. There's no way we can avoid this while still moving the software forward as quickly as we do: providing custom CSS support basically makes all of our CSS and HTML a public-facing API, but an API which is highly unstable, has huge surface area, and is impossible to document or version effectively.

  • (Even though you personally may be fine with your stuff breaking, historically users use stuff we provide and aren't happy when it breaks. Even if the original author is fine with it, people will give stuff to coworkers and then they get upset when it stops working, etc., etc.)

We are more open to providing ways to automate workflows via the supported tools. If there are specific things which are hard to do in bulk right now, we'd at least be interested in hearing about them.

epriestley claimed this task.

We don't plan to pursue this (at least, not any time soon), but are happy to work to improve specific workflows so you hopefully don't need greasemonkey scripts.