Instead of making the whole card interactive, I decided to make the
heading interactive. This avoids nesting the copyable ID as an
interactive element. Nested interactive elements are generally hard to
deal with for implementers and users [1].
I also cleaned up the flex layout in the card heading.
[1]: https://accessibilityinsights.io/info-examples/web/nested-interactive/
For local storage updates to be persisted it had to be assigned for
example with `storage.value = storage.value`. It was easy to forget this
and it’s not immediately obvious why this is needed. (In fact, eslint
complains.)
We introduce an `update` method for the local storage and an
`updateStoredDraftReview` to encapsulate the necessary logic.
This makes the issue list behave the same way as patch list. We don't change
the filter, just reload the issue list so that the new issue state is properly
reflected in the list.
We decide during onboarding to display different things based on the
error code received from the backend.
Due to the new `InvokeError` type we lost this `error.code` string.
This patch moves the revision list from the tab bar drop-down to a sidebar
on wide screens and above the current revision on narrow screens. This
way all revisions are visible at all times.
We also move and nest the revision reviews into that list so that one
can see whether there's anything actionable at a glance.
Other tweaks:
- added comment counts to revisions and reviews
- displayed unresolved comment thread counts per review
- swapped icons for accepted/rejected and neutral reviews to avoid clashing
with resolved/unresolved comment icons
- made label and assignee sections more compact with hover-triggered "+" buttons
- added author and status sections to the sidebar
- enabled patch state changes from the title bar
- made "Review revision" the primary action and "Checkout patch" secondary
- added "Draft" label to draft patches
- capitalized all badges for consistent UI text
While a patch review is still in draft mode we should allow it to be
changed to no verdict or an empty summary.
The validation logic being taken care of by the `Publish draft` button.
Reviews are locally persisted but only published to the network by an
explicit user action.
- [ ] Delete line comments on draft reviews
[squash] Sort imports, separate type imports into own section