Commit eba19f5
authored
Phase 3.2 (task 3): Remove historyUpdateMiddleware from Redux & move navigate(url) into SearchForm (#3582)
## Which problem is this PR solving?
- Resolves part of #3313
## Description of the changes
- In `middlewares/index.ts`: The `historyUpdateMiddleware` export and
its two dependencies (`replace` and the `searchTraces/getSearchUrl`
imports) were removed. The middleware is now a dead code path because
navigation is happening in the component layer.
- `SearchForm` now call `useNavigate()` and using the returned URL
inside `handleSubmit`. So basically, it's replacing what
`historyUpdateMiddleware` used to do via `Redux`.
## How was this change tested?
- Unit tests
- Search form working properly
- URL changing correctly after clicking "Find Traces"
## Checklist
- [x] I have read
https://github.com/jaegertracing/jaeger/blob/main/CONTRIBUTING_GUIDELINES.md
- [x] I have signed all commits
- [x] I have added unit tests for the new functionality
- [x] I have run lint and test steps successfully: `make lint test`
## AI Usage in this PR (choose one)
See [AI Usage
Policy](https://github.com/jaegertracing/jaeger/blob/main/CONTRIBUTING_GUIDELINES.md#ai-usage-policy).
- [ ] **None**: No AI tools were used in creating this PR
- [x] **Light**: AI provided minor assistance (formatting, simple
suggestions)
- [ ] **Moderate**: AI helped with code generation or debugging specific
parts
- [ ] **Heavy**: AI generated most or all of the code changes
Signed-off-by: Parship Chowdhury <parshipchowdhury@gmail.com>1 parent 72014ef commit eba19f5
File tree
4 files changed
+34
-94
lines changed- packages/jaeger-ui/src
- components/SearchTracePage
- middlewares
4 files changed
+34
-94
lines changedLines changed: 21 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
90 | | - | |
| 91 | + | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
| |||
444 | 445 | | |
445 | 446 | | |
446 | 447 | | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
447 | 452 | | |
448 | 453 | | |
449 | 454 | | |
| |||
453 | 458 | | |
454 | 459 | | |
455 | 460 | | |
456 | | - | |
| 461 | + | |
457 | 462 | | |
458 | 463 | | |
459 | 464 | | |
460 | 465 | | |
461 | | - | |
| 466 | + | |
462 | 467 | | |
463 | 468 | | |
464 | 469 | | |
465 | 470 | | |
466 | 471 | | |
467 | | - | |
| 472 | + | |
468 | 473 | | |
469 | 474 | | |
470 | 475 | | |
| |||
481 | 486 | | |
482 | 487 | | |
483 | 488 | | |
484 | | - | |
| 489 | + | |
485 | 490 | | |
486 | 491 | | |
487 | 492 | | |
| |||
491 | 496 | | |
492 | 497 | | |
493 | 498 | | |
494 | | - | |
| 499 | + | |
495 | 500 | | |
496 | 501 | | |
497 | 502 | | |
| |||
500 | 505 | | |
501 | 506 | | |
502 | 507 | | |
503 | | - | |
| 508 | + | |
504 | 509 | | |
505 | 510 | | |
506 | 511 | | |
| |||
514 | 519 | | |
515 | 520 | | |
516 | 521 | | |
517 | | - | |
| 522 | + | |
518 | 523 | | |
519 | 524 | | |
520 | 525 | | |
| |||
538 | 543 | | |
539 | 544 | | |
540 | 545 | | |
541 | | - | |
| 546 | + | |
542 | 547 | | |
543 | 548 | | |
544 | 549 | | |
| |||
547 | 552 | | |
548 | 553 | | |
549 | 554 | | |
550 | | - | |
| 555 | + | |
551 | 556 | | |
552 | 557 | | |
553 | 558 | | |
| |||
556 | 561 | | |
557 | 562 | | |
558 | 563 | | |
559 | | - | |
| 564 | + | |
560 | 565 | | |
561 | 566 | | |
562 | 567 | | |
| |||
590 | 595 | | |
591 | 596 | | |
592 | 597 | | |
593 | | - | |
| 598 | + | |
594 | 599 | | |
595 | 600 | | |
596 | 601 | | |
| |||
612 | 617 | | |
613 | 618 | | |
614 | 619 | | |
615 | | - | |
| 620 | + | |
616 | 621 | | |
617 | 622 | | |
618 | 623 | | |
| |||
630 | 635 | | |
631 | 636 | | |
632 | 637 | | |
633 | | - | |
| 638 | + | |
634 | 639 | | |
635 | 640 | | |
636 | 641 | | |
| |||
654 | 659 | | |
655 | 660 | | |
656 | 661 | | |
657 | | - | |
| 662 | + | |
658 | 663 | | |
659 | 664 | | |
660 | 665 | | |
| |||
690 | 695 | | |
691 | 696 | | |
692 | 697 | | |
693 | | - | |
| 698 | + | |
694 | 699 | | |
695 | 700 | | |
696 | 701 | | |
| |||
Lines changed: 13 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
271 | 272 | | |
272 | 273 | | |
273 | 274 | | |
274 | | - | |
| 275 | + | |
275 | 276 | | |
276 | 277 | | |
277 | 278 | | |
| |||
312 | 313 | | |
313 | 314 | | |
314 | 315 | | |
315 | | - | |
| 316 | + | |
316 | 317 | | |
317 | 318 | | |
318 | 319 | | |
| |||
322 | 323 | | |
323 | 324 | | |
324 | 325 | | |
325 | | - | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
326 | 329 | | |
327 | 330 | | |
328 | 331 | | |
| |||
336 | 339 | | |
337 | 340 | | |
338 | 341 | | |
339 | | - | |
| 342 | + | |
340 | 343 | | |
341 | 344 | | |
342 | 345 | | |
| |||
347 | 350 | | |
348 | 351 | | |
349 | 352 | | |
| 353 | + | |
350 | 354 | | |
351 | 355 | | |
352 | 356 | | |
| |||
404 | 408 | | |
405 | 409 | | |
406 | 410 | | |
407 | | - | |
| 411 | + | |
| 412 | + | |
408 | 413 | | |
409 | | - | |
| 414 | + | |
410 | 415 | | |
411 | 416 | | |
412 | 417 | | |
| |||
857 | 862 | | |
858 | 863 | | |
859 | 864 | | |
860 | | - | |
| 865 | + | |
861 | 866 | | |
862 | 867 | | |
863 | 868 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | 14 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | 15 | | |
27 | 16 | | |
28 | 17 | | |
29 | 18 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | 5 | | |
12 | 6 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | 7 | | |
0 commit comments