• 
      

    Allow commenting on draft (unpublished) items.

    Review Request #12949 — Created April 12, 2023 and submitted — Latest diff uploaded

    Information

    Review Board
    release-6.x

    Reviewers

    For as long as Review Board has existed, we've disallowed commenting on
    items before they're published. The reasoning here was that if you add a
    diff comment, replacing the diff will delete the comment (and similar
    for file attachments).

    This change updates the comment dialog to remove the hasDraft checks.
    This is replaced with a new mechanism whereby we add a public state to
    diffs and file attachments, and use that to show a warning to the user
    if they're commenting on something which has not yet been published. The
    bulk of the code changes here are just plumbing that state all the way
    down to the comment block models, which use it to decide what to display
    to the user.

    • Ran unit tests.
    • Created review requests with published and unpublished diffs and file
      attachments. Checked that adding a comment to published items worked
      as normal, and that the draft warnings were correctly shown for draft
      diffs and file attachments, as well as for interdiffs and file
      attachment diffs involving an unpublished tip revision.

    Commits

    Files