Skip to content

I can reply to a pitch without leaving the dashboard #192

Description

@jamescrosswell

Context

Yes is one of two answers to a pitch. The other — not yet, because… — still means a browser today.
This slice adds it to the reader, and with it the way you ask for a pitch to be shelved: the Lead is
already required to move a pitch back to Idea when you ask, and allowed() permits
lead:Pitched>Idea exactly while that comment is unanswered, so there's no third key to build.

The one thing to get right: your comment must carry no marker. comment lead/comment dev
append <!-- a-team:<role> -->, and unanswered() treats any <!-- a-team: marker as "not the
reviewer" — so a marked comment would be invisible as feedback and no run would ever be started by
it.

Needs #191 merged first: same reader, same hint bar, same command registrations.

Pitch: #180

Acceptance criteria

  • a-team board <team> comment you <n> <file> posts the file as a comment on #<n>
    with no marker appended and no 👀 left on anything. check_role accepts you for
    comment (and keeps refusing unknown roles).
  • c in the reader opens a comment dialog titled Comment on #<n>, with a TextView for
    the body, opened focused on it and empty.
  • Ctrl+Enter posts it — not Enter, because the field is multi-line (style guide §5) — and
    TabKeyAddsTab is false so Tab still moves focus.
  • Esc cancels and loses nothing else: you're back in the reader, still on the same pitch,
    scrolled where you were.
  • After posting, the dialog closes, the reader stays open, and the MessageBar says
    commented on #<n>.
  • An empty comment posts nothing and says so; it doesn't create a blank comment.
  • The dialog's hint bar reads Ctrl+Enter post · Esc cancel, each a clickable Button per
    the style guide's Hint helper.
  • The reader's hint bar carries all four:
    Up/Down/PgUp/PgDn scroll · a approve · c comment · o on GitHub · Esc close, with a absent
    on anything that isn't a Pitched pitch and c offered on any item.
  • Registered: work.comment — "Comment on the item you're reading".
  • A failed post keeps your text. The dialog stays open with what you wrote in it and the
    reason on the MessageBar in its Error colour — nothing you typed is thrown away.
  • Work's own hint bar is unchanged.

Tests

  • tests/scripts.sh: comment you posts a body containing no <!-- a-team: at all; it leaves no
    👀; feedback lead then reports that comment as the reviewer's unanswered feedback (the round trip
    that matters); an unknown role is still refused; --dry-run prints the body and posts nothing.
  • tests/Dashboard.Tests: c opens the dialog with the item's number in its title and an empty
    TextView; Ctrl+Enter runs comment you with the typed body; Enter inside the field does not
    post; Esc cancels and posts nothing; an empty body posts nothing and shows a message; a failed
    post leaves the dialog open with the text intact; the reader's hint bar text with and without a;
    work.comment is registered with its label.

Out of scope

  • A shelve key. Asking for it in a comment is the mechanism, and the Lead already has to honour
    it.
  • Editing your own comment, or reading the thread. o covers both.
  • Editing the pitch from the dashboard. You reply; the Lead revises.
  • Markdown preview of what you're writing.
  • Anything about telling your comments from the team's — I can't tell what the team said from what I said, and neither can GitHub #150.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    a-team:devClaimed by the a-team DevblockedWaiting on another issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions