-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Improve interface when comparing a branch which has created a pull request #17911
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
Changes from all commits
1fe345b
88c7342
8361adb
539219b
e69338c
e381d58
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -187,8 +187,22 @@ | |
| {{end}} | ||
| {{else if and .PageIsComparePull (gt .CommitCount 0)}} | ||
| {{if .HasPullRequest}} | ||
| <div class="ui segment"> | ||
| {{.i18n.Tr "repo.pulls.has_pull_request" (Escape $.RepoLink) (Escape $.RepoRelPath) .PullRequest.Index | Safe}} | ||
| <div class="ui segment grid title"> | ||
| <div class="twelve wide column issue-title"> | ||
| {{.i18n.Tr "repo.pulls.has_pull_request" (Escape $.RepoLink) (Escape $.RepoRelPath) .PullRequest.Index | Safe}} | ||
| <h1> | ||
| <span id="issue-title">{{RenderIssueTitle .PullRequest.Issue.Title $.RepoLink $.Repository.ComposeMetas}}</span> | ||
| <span class="index">#{{.PullRequest.Issue.Index}}</span> | ||
| </h1> | ||
| </div> | ||
| <div class="four wide right middle aligned column"> | ||
| {{- if .PullRequest.HasMerged -}} | ||
| <a href="{{Escape $.RepoLink}}/pulls/{{.PullRequest.Issue.Index}}" class="ui button purple show-form">{{svg "octicon-git-merge" 16}} {{.i18n.Tr "repo.pulls.view"}}</a> | ||
| {{else if .Issue.IsClosed}} | ||
| <a href="{{Escape $.RepoLink}}/pulls/{{.PullRequest.Issue.Index}}" class="ui button red show-form">{{svg "octicon-issue-closed" 16}} {{.i18n.Tr "repo.pulls.view"}}</a> | ||
| {{else}} | ||
| <a href="{{Escape $.RepoLink}}/pulls/{{.PullRequest.Issue.Index}}" class="ui button green show-form">{{svg "octicon-git-pull-request" 16}} {{.i18n.Tr "repo.pulls.view"}}</a> | ||
|
||
| {{end}}</div> | ||
|
||
| </div> | ||
| {{else}} | ||
| {{if and $.IsSigned (not .Repository.IsArchived)}} | ||
|
|
||
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.
According to your picture, I'm confused about what the PR shown is supposed to convey.
It's not immediately visible that that wants to show us that such a PR already exists.
I'd say there are two possible approaches here to avoid confusion:
View already open Pull Request(at best combined with a name change)If we use this approach, do we even need
repo.pulls.has_pull_requestanymore?repo.pulls.has_pull_request(minus the link at the end) before displaying the open pull request.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.
I just did a quick search using grep -irn.
According to that,
is the only other place that uses
pulls.has_pull_request, which already does not seem particularly wanted.What should we do about it then?
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.
The pull request maybe closed or merged, not always
openstate.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.
It's not related with this PR so I left as it.