-
Notifications
You must be signed in to change notification settings - Fork 203
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
Fixes #1515 - fixed encoding param #1518
Conversation
Whoa, awesome! Will have time to review this afternoon. |
@magsout can you push a prettier error fix commit so tests can run? |
@miketaylr hum, hum where is this commit 5998f12 because it fixed the bug like I did.. But I cannot find it.. |
ok, I get it. I find how to handle my last case, let me push something edit: or not :( |
Hmmm...... 👻 |
@miketaylr I add this https://github.com/webcompat/webcompat.com/pull/1518/files#diff-4ba6be3180115f78e14125480dcf4d7dR499 I don't know if it's clean or not to do like that. Why I have written this function? When we remove We never delete the param |
Maybe it's better to make another PR, I fixed lot of things, what do you think @miketaylr ? |
There's not that much code changing in these 4 commits, I think it should be fine here. |
@magsout this looks good, but I'd like to write some tests as well. Can you help me think of the scenarios we should test?
How can we test this one? |
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.
r+, but let's write some tests before merging. I'm happy to write the tests, unless you want to @magsout!
@@ -336,14 +336,18 @@ issueList.IssueView = Backbone.View.extend( | |||
// There are some params in the URL | |||
if (urlParams.length !== 0) { | |||
queryMatch = urlParams.match(this._searchRegex); | |||
if (queryMatch) { |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
@miketaylr is it enought if:
|
@miketaylr unless it can be wait one or two weeks, be my guest ;) |
:))))) I'll work on these over the next few days. |
(the same test also lives in search-non-auth.js)
Another way would just be to load a page with |
@magsout just pushed some tests, will likely merge tomorrow morning (don't want to break the universe at the end of the day, in case something goes wrong). ❤️ |
r? @miketaylr
I have fixed the issue #1515 and more.
encodeURIComponent
to avoid%25
q
param_currentSearch
is init directly inthis.issueList = new issueList.IssueView();
to avoid double search at first page init.q
is removed of XHR rquest when search input is emptyThere is still a bug. When you delete the search field. It is necessary to send a request (ok) and delete the paramq
(NOK, the test is here https://github.com/webcompat/webcompat.com/blob/master/webcompat/static/js/lib/issue-list.js#L464)Edit
Seems to fixe this issue #1023
Last bug: Delete the request parameter https://github.com/webcompat/webcompat.com/blob/master/webcompat/static/js/lib/issue-list.js#L464