Commit 033ca27
authored
replaced setSearchParams with updateRawSearchParams for framework change (#983)
This PR is a fix for [Bug
1999795](https://bugzilla.mozilla.org/show_bug.cgi?id=1999795).
The reporter noticed that after clearing a search term, changing the
framework creates an url with the old search term intact. This is not
the expected behavior.
This PR replaces `setSearchParams` with `updateRawSearchParams` for
onFrameworkChange and onTestVersionChange, using the custom hook for
updating the search params.
To test with production version bug:
[Production
Link](https://perf.compare/compare-results?baseRev=e5e0964a228d62e9f77b29e93e8b0d8e6ef15a5a&baseRepo=try&newRev=89ebb0972d42440367c8420ed0fbd10721177c2b&newRepo=try&framework=13&search=speedo)
1. Clear the search term speedo
2. It should be clear in the url.
3. Change the framework from browsertime to talos
4. The url still has the search=speedo
### To test with deployed version:
[DeployLink](https://deploy-preview-983--mozilla-perfcompare.netlify.app/compare-results?baseRev=e5e0964a228d62e9f77b29e93e8b0d8e6ef15a5a&baseRepo=try&newRev=89ebb0972d42440367c8420ed0fbd10721177c2b&newRepo=try&framework=13&test_version=mann-whitney-u&search=speedo)
1. Clear the search term speedo
2. It should be clear in the url.
3. Change the framework from browsertime to talos
4. The url should not have the search term speedoFile tree
2 files changed
+25
-6
lines changed- src
- __tests__/CompareResults
- components/CompareResults
2 files changed
+25
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1171 | 1171 | | |
1172 | 1172 | | |
1173 | 1173 | | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
1174 | 1194 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
| |||
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
55 | | - | |
56 | | - | |
| 54 | + | |
| 55 | + | |
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
| |||
68 | 67 | | |
69 | 68 | | |
70 | 69 | | |
71 | | - | |
72 | | - | |
| 70 | + | |
| 71 | + | |
73 | 72 | | |
74 | 73 | | |
75 | 74 | | |
| |||
0 commit comments