iloveeyjafjalla opened a new pull request, #6892:
URL: https://github.com/apache/rocketmq-dashboard/pull/6892
Fixes #6891
## The defect
The topic-query window (message page), the DLQ export window and the DLQ
resend window are all controlled pickers whose `onChange` drops a cleared value
(the state is a non-null tuple), while every request carries the range
unconditionally — the topic query sends `startTime/endTime`, the export sends
`exportRange`, the resend sends `retryRange`. The clear control therefore did
nothing: the value snapped back and the old window was silently reused.
## The fix
`allowClear={false}` on the three pickers, with a comment saying why there
is no empty state to offer. Changing the window through the picker stays
available; the dead affordance goes.
## Tests
Red before the change, in both page suites:
```
AssertionError: expected <span …(2)>…(1)</span> to be null
```
The message-page case pins the query-window picker; the DLQ case pins the
export header picker and then opens the resend dialog and pins its picker too
(the same selector is re-checked with the dialog open). Green after:
```
Test Files 2 passed (2) Tests 65 passed (65) (MessagePage.test.tsx
+ DLQPage.test.tsx)
tsc -b exit 0
eslint exit 0 (one pre-existing react-refresh warning in
message.tsx)
prettier --check All matched files use Prettier code style!
```
## Scope
Not #6791/#6792 (notification deliveries, one-sided ranges): these filters
always send a complete range, so there is nothing to clear.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]