Skip to content
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

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion templates/explore/repo_list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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}}">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<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}}">

Copy link
Contributor Author

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.

Copy link
Member

@CaiCandong CaiCandong Aug 10, 2023

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is right.
e.g. We have no repositories tab in the following page.
yourdomain/notifications/watching
image

Copy link
Contributor Author

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.

Copy link
Contributor Author

@yp05327 yp05327 Aug 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how can we access /notifications/subscriptions from web?
I found this page in the source code, but have no idea about how to access it from web.

Edited:
I got it.
image

<span class="flex-text-inline"><i class="color-icon gt-mr-3" style="background-color: {{.PrimaryLanguage.Color}}"></i>{{.PrimaryLanguage.Language}}</span>
</a>
{{end}}
Expand Down