Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Validate PR review state before allowing submission. #1582
Conversation
Split the `PullRequestReviewAuthoringViewModel.Submit` command into 2 separate commands and add a `CanExecute` observable for them: - `Approve` can always be submitted - `Comment` needs either a review body or >0 review comments - `RequestChanges` always needs a review body
|
This LGTM - except I thought that |
|
@meaghanlewis oh, yes you're right! Fixed that. |
Sigh. Seems that hyperlinks don't respect dependency property precedence, so the `IsEnabled=False` trigger for `Hyperlink.Foreground` doesn't override the foreground `TemplateBinding`. Not sure what we can do here other than set the control's opacity when disabled, so that's what we'll do for now.
Split the
PullRequestReviewAuthoringViewModel.Submitcommand into 2 separate commands and add aCanExecuteobservable for them:Approvecan always be submittedCommentneeds either a review body or >0 review commentsRequestChangesneeds either a review body or >0 review commentsHACK
Disabling the
GitHubActionLinks that are used for the approve/comment/request changes buttons had no visual effect. Seems that hyperlinks don't respect dependency property precedence, so theIsEnabled=Falsetrigger forHyperlink.Foregrounddoesn't override the foregroundTemplateBinding. Not sure what we can do here other than set the control's opacity when disabled, so that's what I did for now.Depends on #1581
Part of #1491