New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[git-webkit] Add screen-reader friendly review wizard (Part 2) #28389
[git-webkit] Add screen-reader friendly review wizard (Part 2) #28389
Conversation
EWS run on previous version of this PR (hash 1ed0d3f) |
This is stacked on #27628, because the reading and writing are pretty distinct operations and should be evaluated separately. |
|
1ed0d3f
to
98f4331
Compare
EWS run on previous version of this PR (hash 98f4331) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing too surprising in the code. I did notice that we're inconsistent about whether PRs are called "pull requests" or "pull-requests". GitHub uses the former, and I think that's the generally accepted spelling. Would be nice to clean that up before landing.
|
||
if pull_request.opened and did_approve is None and user and pull_request.author != user: | ||
did_approve = dict(Yes=True, Block=False).get(Terminal.choose( | ||
'Would you like approve this change?', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
grammar: "Would you like to approve this change?"
if pull_request.opened and did_approve is None and user and pull_request.author != user: | ||
did_approve = dict(Yes=True, Block=False).get(Terminal.choose( | ||
'Would you like approve this change?', | ||
default='No', options=('Yes', 'No', 'Block'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes / No / Block does not feel very intuitive to me. In response to the question "Would you like to approve this change?", "No" sounds like r-, but it's actually what GitHub calls "Comment".
Could we use the same idioms as GitHub? Like: "How would you like to review this change?" with choices "Comment only", "Approve", "Request changes"
98f4331
to
2d8839c
Compare
https://bugs.webkit.org/show_bug.cgi?id=261242 rdar://115083100 Reviewed by Andres Gonzalez and Elliott Williams. Allow user to review and comment on a pull request by editing a local file. * Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/review.py: (Review.truncate_strs): Turn a nested dictionary of strings into a nested dictionary of lists of string based on where newline are in strings. (Review.user_delta): Detect which users have been added or removed from a list of users. (Review.invoke_wizard): Diff the original file with a user's local edits and return those local edits to be converted into actions on a pull request. (Review.main): Given the difference returned by invoke_wizard, programatically add comments, change pull request metadata and approve (or reject) the pull request. * Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/review_unittest.py: (TestReview.editor_callback): (TestReview.editor_callback.callback): (TestReview.test_truncate_strs): (TestReview.test_user_delta_github): (TestReview.test_user_delta_bitbucket): (TestReview.test_edit_metadata): (TestReview.test_comment_commit_message): (TestReview.test_comment): (TestReview.test_comment_reply): (TestReview.test_comment_reply_only_one): (TestReview.test_comment_reply_both): (TestReview.test_diff_file_comment): (TestReview.test_diff_inline_comment): (TestReview.test_github_read_comments): (TestReview.test_bitbucket_no_edit): (TestReview.test_github_no_edit): (TestReview.test_bitbucket_approve): (TestReview.test_github_deny): (TestReview.test_bitbucket_edit_deny): (TestReview.test_github_edit_approve): (TestReview.test_bitbucket_edit_refresh): (TestReview.test_github_edit_refresh): (TestReview.test_bitbucket_edit_comment): (TestReview.test_github_edit_comment): (TestReview.test_bitbucket_edit_comment_commit_message): (TestReview.test_github_edit_comment_commit_message): (TestReview.test_bitbucket_edit_comment_inline_diff): (TestReview.test_github_edit_comment_inline_diff): (TestReview.test_bitbucket_edit_title): (TestReview.test_github_edit_title): (TestReview.test_bitbucket_edit_open): (TestReview.test_github_edit_close): (TestReview.test_bitbucket_edit_merged_close): (TestReview.test_github_edit_merged_open): (TestReview.test_bitbucket_add_labels): (TestReview.test_github_edit_labels): (TestReview.test_github_edit_invalid_labels): Canonical link: https://commits.webkit.org/279255@main
2d8839c
to
74313d0
Compare
Committed 279255@main (74313d0): https://commits.webkit.org/279255@main Reviewed commits have been landed. Closing PR #28389 and removing active labels. |
74313d0
2d8839c
π§ͺ wpe-wk2π§ͺ wincairo-testsπ§ͺ ios-wk2-wptπ§ͺ api-iosπ§ͺ gtk-wk2π tv-simπ§ͺ api-gtkπ watch