-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Feature: Add milestones search by name on dashboard milestones page. #14806
Conversation
<form class="ui form ignore-dirty"> | ||
<div class="ui search fluid action input"> | ||
<input type="hidden" name="type" value="{{$.ViewType}}"/> | ||
<input type="hidden" name="repos" value="[{{range $.RepoIDs}}{{.}}%2C{{end}}]"/> |
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.
Somehow this value gets URL-encoded, which is not understood by gitea.
Maybe the backend should URI-decode properly, instead of fixing this on the frontend
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.
Hi, noerw, I didn't make sense of your suggestion. The %2C translates to a comma (,). What you mean is we should not use the encoding '%2c' in the URL query params on the frontend ?
I just reference it on the issue.tmpl (FYI:
<input type="hidden" name="repos" value="[{{range $.RepoIDs}}{{.}}%2C{{end}}]"/> |
^\[\d+(,\d+)*,?\]$
) to fetch them from URL query params.
Maybe we should use a unified way to solve it in the whole project?
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 issue is the double-escaped comma, the form handler that extracts the value from the hidden input already url-escapes.
To fix this:
<input type="hidden" name="repos" value="[{{range $.RepoIDs}}{{.}}%2C{{end}}]"/> | |
<input type="hidden" name="repos" value="[{{range $.RepoIDs}}{{.}},{{end}}]"/> |
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.
replaced.
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.
Looks good, but it would be nice to add this to the <repo>/milestones
page as well.
Feature for issue 13845:
Add milestones search by name on dashboard milestones page.