Set the base for future customization to easier differentiate between human actors and machines.
Details
- Reviewers
- None
- Group Reviewers
O1: Blessed Committers - Maniphest Tasks
- T16051: Add a CSS class on comments to indicate whether the comment author is a bot
Inspect the CSS of a bot account handle and a user account handle in a Maniphest task. See that <a> has an additional phui-system-agent class.
Diff Detail
- Repository
- rP Phorge
- Branch
- T16051 (branched from master)
- Lint
Lint Passed - Unit
Tests Passed - Build Status
Buildable 1923 Build 1923: arc lint + arc unit
Event Timeline
Uhm... can we sleep with the very possible possibility of having "User Bot" possibly everywhere? 🌈
Uhm. I don't know why but locally I cannot find the selector. Also this should help in getting the selector but without success, both from the home, or from a task created and assigned to a bot.
.phui-system-agent { background: red !important; }
P.S., maybe useful for the test plan: to create a task from a bot, create a bot, with conduit token, then:
arc --conduit-uri http://phorge.localhost --conduit-token=api-asdasd todo ASD
Edited: maybe better phui-link-system-agent like the other one already present that has phui-link - sorry lol
@matmarex: please look at the screenshots of Andre above: can I ask if such new selector would really simplify your downstream job? or, is there anything else missing / that we should do instead?
I ask this since the new selector will be very specific to the "user handle", but maybe you would love to easily catch the .phui-timeline-shell, with a .phui-timeline-shell-bot or similar, and not the handle.
Thanks for guiding us a bit here, so we better understand how deep we have to dig.
src/applications/phid/PhabricatorObjectHandle.php | ||
---|---|---|
380 | Maybe a little comment that explains why currently we have no CSS rules and why it still makes sense | |
381 | Maybe with -link prefix like the other selector in old line 368 |
Note that in the screenshots I used an extremely broad CSS selector as that broad one was specifically mentioned in the previous comment here.
Also, avivey does not like this approach so I'll likely decline this patch anyway.
I was drunk sorry. The phui-link-system-agent makes more sense.
Also, avivey does not like this approach so I'll likely decline this patch anyway.
I see. But aren't you curious about what @matmarex would like, to see where that would lead? I think the selector should be on the biggest container (e.g. phui-timeline-shell). Let's wait for feedback but, if yes, I think 90% of the patch is perfect as-is, and 10% could be moved to the thing who generates phui-timeline-shell (since it could now read PhabricatorObjectHandle#getSystemAgent() - so it's possible).
I mean, at least WMF Phabricator or other installs can pull this patch, if they want, and it would be probably exactly what they need to easily beautify 10 years of legacy data.
For my use case of styling Maniphest comments and other actions, it would be most convenient to have the extra class on phui-timeline-shell. But I'll be fine with maintaining my styles the way they currently are, if we drop this patch.