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)
Mon, Mar 4, 10:32 PM
Unknown Object (File)
Sat, Mar 2, 12:33 AM
Unknown Object (File)
Jan 20 2024, 6:26 PM
Unknown Object (File)
Jan 17 2024, 12:50 AM
Unknown Object (File)
Dec 29 2023, 11:34 PM
Unknown Object (File)
Dec 13 2023, 3:56 AM
Unknown Object (File)
Nov 30 2023, 2:17 AM
Unknown Object (File)
Nov 15 2023, 11:26 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
Branch
selfinline3
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 20735
Build 28189: Run Core Tests
Build 28188: arc lint + arc unit

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.