Page MenuHomePhabricator

When authors add inlines to their own revisions/commits, mark them as "Done" by default
ClosedPublic

Authored by epriestley on Sep 4 2018, 7:08 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 19, 11:48 AM
Unknown Object (File)
Fri, Nov 15, 4:43 PM
Unknown Object (File)
Mon, Nov 11, 4:32 AM
Unknown Object (File)
Thu, Nov 7, 9:05 AM
Unknown Object (File)
Sun, Oct 27, 1:21 AM
Unknown Object (File)
Oct 13 2024, 9:45 PM
Unknown Object (File)
Oct 13 2024, 9:44 PM
Unknown Object (File)
Oct 13 2024, 9:44 PM
Subscribers
None

Details

Summary

Ref T13195. Fixes T8573. When you're adding inlines to your own stuff, mark them "Done" by default. You can unmark them as "Done" if you're legitimately leaving TODOs for yourself, although I think this is unusual.

(If this turns out to be less unusual than I think, we could consider an alternate rule: mark replies by the author as "Done" by default.)

Test Plan

Added some inlines as an author and a non-author. Saw my author inlines marked as "Done" by default. Submitted them; unmarked and submittted them.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

src/infrastructure/diff/PhabricatorInlineCommentController.php
238

Shouldn't this be PhabricatorInlineCommentInterface::STATE_DONE?

src/infrastructure/diff/PhabricatorInlineCommentController.php
238

The checkbox has four states, because checking the box doesn't apply immediately. When you check the box, only you can see that you've checked it until you submit it (in the UI, there's a dashed outline). The states are:

  • Done: The box is checked.
  • Undone: The box is not checked.
  • Draft: The box is publicly not checked. Someone has checked the box, but they haven't submitted the checkmark yet. They see a dashed checkmark, everyone else sees a solid empty box. When they comment, they "mark 6 inlines as done".
  • Undraft: The box is publicly checked. Someone has unchecked the box, but they haven't submitted the checkmark yet. They see a dashed empty box, everyone else sees a solid checkmark.

This is different from the inline itself being a "draft", which is confusing since both mechanisms use the same term.

So "Draft" means that the box is not checked, but the author will see a dashed checkmark indicating that when they submit a comment it will become checked. This is the same state you get into if we remove this logic, then you manually click the box -- when you click, your checkoff is still a draft. Basically, this is simulating clicking the box.

(Possible that some of this logic isn't entirely right since there are so many different states, of course.)

amckinley added inline comments.
src/infrastructure/diff/PhabricatorInlineCommentController.php
238

👍

This revision is now accepted and ready to land.Sep 7 2018, 5:42 PM
This revision was automatically updated to reflect the committed changes.