Page MenuHomePhabricator

Support comments as an EditEngine field
ClosedPublic

Authored by epriestley on Nov 18 2015, 11:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 2, 11:08 AM
Unknown Object (File)
Thu, Apr 25, 3:45 AM
Unknown Object (File)
Wed, Apr 17, 12:58 PM
Unknown Object (File)
Mon, Apr 15, 2:29 AM
Unknown Object (File)
Tue, Apr 9, 10:36 PM
Unknown Object (File)
Mar 31 2024, 10:59 AM
Unknown Object (File)
Mar 30 2024, 5:25 PM
Unknown Object (File)
Mar 11 2024, 3:07 PM
Subscribers
None

Details

Summary

Ref T9132. This adds an automatic "Comments" field, like the Subscribers/Projects/Policy fields.

The primary goals here are:

  • Allow users to make comments via Conduit.
  • In the future, get stackable action support.

As a side effect, this also allows you to put comments on create forms. This is a little silly but seems fine, and may be relevant on edit forms (which I'm not 100% sure how I want to handle yet). I've just hidden them by default for now.

Test Plan

Screen Shot 2015-11-18 at 2.33.10 PM.png (145×1 px, 28 KB)

Screen Shot 2015-11-18 at 2.33.07 PM.png (103×1 px, 22 KB)

Screen Shot 2015-11-18 at 2.33.23 PM.png (1×1 px, 151 KB)

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Support comments as an EditEngine field.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.

yeahh..... idk about this.

chad edited edge metadata.

mostly, I wonder what it'd be like to always have it on edit forms. so with that in mind, how would I design the interation (show/hide) for example. Sounds like you're hiding it by default, but people could turn it on?

This revision is now accepted and ready to land.Nov 19 2015, 6:24 AM

Yeah, things are a little murky here. Current behavior (as of this diff) is:

  • When you click "Create Thing" (button in the UI on the list view), you always use the default form.
  • When you click "Edit Thing" (action link from the detail view), you always use the default form.
  • You can only use custom forms by knowing the URLs.

So after this diff, you could unhide the "Comment" input, but it would appear on both the "Create" and "Edit" forms. I think it's pretty much always confusing/undesirable on the "Create" flow, even though it technically works, so this is probably not what anyone would want.

Soon (next diff or so) my planned behavior is:

  • Each form can be added or removed from the "Create Menu" (i.e., has a "show this in create menu?" flag). (We might need to hammer out terminology here a bit -- for now, none of this interacts with the "Quick Create" menu in the global nav.)
  • If you have only one "Create" form, the "Create Menu" is just a button, like it is today ("Create Thing") and uses the specified form.
  • If you have several "Create" forms, the "Create Menu" is a dropdown ("Create New Bug", "Create New Feature Request") that lets you choose between the options, similar to how Calendar currently works.
  • Clicking "Edit Thing" still always uses the default form.

So then you could do this:

  • Create a new form, add it to the create menu. It becomes the "Create Thing" form.
  • Remove the default form from the create menu. It becomes the "Edit Thing" form, only.
  • Enable the comment field in the "Edit Thing" form.

That would let you individually customize the create and edit forms.

There are some other interactions here which might make sense:

  • Maybe we should have separate "Edit" and "Create" forms by default in every application? I think this is more confusing, but it might be less confusing if users often want to separate the forms.
  • Maybe controls should have a fourth "Disclosable" setting (in addition to Visible, Locked and Hidden) which would hide them by default but let you click to show them. (Or maybe this is two settings, "Disclosable, Editable" and "Disclosable, Locked").
  • Maybe we should let you specify multiple edit forms, and then "Edit Thing" turns into a dropdown menu ("Quick Edit", "Full Edit")? Offhand, this seems silly/confusing/slow/worse to me.

I'm generally not sold on the value of putting comment inputs everywhere, particularly by default:

  • I think most of the feedback requesting this has really been trying to address other root problems (performance problems on specific installs, concern about "spamming" other users).
  • I think something in the vein of stackable actions is generally a more promising way to accomplish the same goals.
  • On an install without performance problems, I've never personally wanted this field to exist.

So my current plan is to just do the "Create" stuff, then leave this for now and see how it feels, then look at "Edit" stuff again after figuring out stackable actions since that probably informs the decision substantially.

That is, my ideal outcome here is that we're able to completely hide this field from the "Form" part of EditEngine, so it only exists in the API and stackable actions. I think that's much simpler overall. I might just do that for now in a couple diffs.

Getting this field into the API / actions is my primary goal here, getting it into the form is more of a "we could technically take this approach without really ruining anything" proof-of-concept than a direction I'm particularly happy with.

This revision was automatically updated to reflect the committed changes.