-
Notifications
You must be signed in to change notification settings - Fork 192
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
Clicking on label from /issues page does not update URL params #1074
Comments
In the file issue-list.html I changed :
to
When I do the above changes, The URL is getting updated with the previously selected label and not the current label.(Check attachment) I tried making multiple changes. i) I edited LabelSearch method and included the following lines:
after the line ii) I tried using history.pushstate straight away to modify the URL when a label is clicked. The above two didn't work. Any ideas here? |
@deepthivenkat so Scenario 2 and 3 are bugs, right? Can we get individual issues filed for those? It's confusing to discuss multiple bugs in a single issue. A good template for filing bugs is like this:
Scenario 2's bug title might be: "Clicking on label from /issues page does not update URL params" Thanks! |
@deepthivenkat Our search/filtering UI and URL state here leave some things to be desired - see #795 and friends. I've started working on fixes in this area, among them is a chunk of code taken in in #859 which is not actually used anywhere but (I hope) should help solve this bug and much of the related stuff. (PRs 835 and 846 are unsuccessful attempts at fixing everything - we should take this in smaller steps. However, if the next small step is you fixing the URL issue here using - if it works for you - code from #859 that would be sweet). |
@miketaylr I have edited this issue to contain changes relevant to
Opening a separate issue for other bugs. Thanks! |
The way clicking on labels in issue-list works is like so: There's an event listener: Which calls the The actual markup for the label is I think the Handling the params update when we trigger Warning, it can get pretty complicated here. But I would start trying to understand what the current state of the model params is ( |
It took me a long time to understand why some code was using |
Thanks @hallvors |
👍 Will add detailed description in the PR! Yes. I will write Intern tests. Opening a separate issue for that! Thanks @miketaylr . |
Steps to reproduce:
Go to issues page. Click on a label for any of the issues. Eg : firefox-mobile
Expected Result:
In url: https://webcompat.com/issues?page=1&per_page=50&state=open&stage=all&sort=created&direction=desc&q=label%3Abrowser-firefox-mobile
In search box : label:browser-firefox-mobile
Actual Result:
In url: https://webcompat.com/issues?page=1&per_page=50&state=open&stage=all&sort=created&direction=desc [The url is not the same as expected]
In search box: label:browser-firefox-mobile
The text was updated successfully, but these errors were encountered: