-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Fix incorrect url of searching repo by language in user profile page when user have .profile
repository
#26425
Fix incorrect url of searching repo by language in user profile page when user have .profile
repository
#26425
Conversation
@@ -40,7 +40,7 @@ | |||
</div> | |||
<div class="flex-item-trailing"> | |||
{{if .PrimaryLanguage}} | |||
<a class="muted" href="{{$.Link}}?q={{$.Keyword}}&sort={{$.SortType}}&language={{.PrimaryLanguage.Language}}"> | |||
<a class="muted" href="{{$.Link}}?{{if $.PageIsUserProfile}}tab={{$.TabName}}&{{end}}q={{$.Keyword}}&sort={{$.SortType}}&language={{.PrimaryLanguage.Language}}"> |
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.
<a class="muted" href="{{$.Link}}?{{if $.PageIsUserProfile}}tab={{$.TabName}}&{{end}}q={{$.Keyword}}&sort={{$.SortType}}&language={{.PrimaryLanguage.Language}}"> | |
<a class="muted" href="{{$.Link}}?tab={{$.TabName}}&q={{$.Keyword}}&sort={{$.SortType}}&language={{.PrimaryLanguage.Language}}"> |
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.
If it is not user profile page, we will always have a strange tab
param in the url.
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.
This bug is similar to #26374,Without a user profile page, it's not surprising that tab=repositories
when you visit repositories.
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.
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.
ops, this page can not filter repo by language. We need to fix this in another PR.
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.
-> Make profile page work with repositories list #26475 One line change:
Oops, not ideal either. close that. |
I this we should backport this. |
This has been fixed by #28320. ps: don't know why nobody review this one 😕 |
Oops |
Caused by
overview
tabs (custom profile page). If user have.profile
repo, thenoverview
tab will become the default tab instead ofrepository
tab.And
$.Link
does not have query info, so we will search in overview tab by default but not in repository tab which is not expected, so we just need to add?tab=xxx
in the query.Before:


If user doesn't have
.profile
repo, it works well. But if user has, it will redirect to the wrong page:After:
