Feat/2052/ab comparison custom filters - #2069
Conversation
dec4bd4 to
b985a83
Compare
alanpeixinho
left a comment
There was a problem hiding this comment.
Some small comments. Seems great.
| const isDuplicate = value.some(pair => pair.from === from && pair.to === to); | ||
| const canAdd = from !== undefined && to !== undefined && !isDuplicate; | ||
|
|
||
| const addPair = (): void => { |
There was a problem hiding this comment.
nit: might be interesting to clear the from to dropdowns when adding.
| <div className="flex flex-col gap-3"> | ||
| <div className="text-dim-gray flex items-center gap-1 text-sm"> | ||
| <FormattedMessage id="filter.tableFilter" /> | ||
| <TooltipIcon |
There was a problem hiding this comment.
do we still need a tooltip, now that the custom filters show the explicit rules?
There was a problem hiding this comment.
good point, I don't think so.
| } | ||
|
|
||
| /** Drop invalid/duplicate pairs; keep first-seen order. */ | ||
| export function normalizeStatusPairs( |
There was a problem hiding this comment.
nit: cant we just expose parse and serialize, and just call those internally?
Ignore if it makes no sense.
| @@ -0,0 +1,134 @@ | |||
| import type { JSX } from 'react'; | |||
There was a problem hiding this comment.
are those .stories. files running in prod?
There was a problem hiding this comment.
no, they are for storybook.
you can run storybook with pnpm storybook install and open http://localhost:6006/
you will see a like a demo for the components. But they run on dev env only.
d27448a to
79ce986
Compare
…tories Introduce the From/To status pair form so Tree Compare can replace change-type chips with exact (from → to) filters, and expose it in Storybook for isolated UI review. Part of kernelci#2052 Signed-off-by: Felipe Bergamin <felipebergamin@profusion.mobi>
Replace URL change-type filters with exact From/To pairs, keep the old chips as shortcuts that add or remove those pairs, and persist the active list in the URL. Part of kernelci#2052 Signed-off-by: Felipe Bergamin <felipebergamin@profusion.mobi>
Use URL statusPair when present so shared links stay exact, and fall back to the last edited list in localStorage when the param is omitted. Closes kernelci#2052 Signed-off-by: Felipe Bergamin <felipebergamin@profusion.mobi>
Part of kernelci#2052 Signed-off-by: Felipe Bergamin <felipebergamin@profusion.mobi>
79ce986 to
4ad2901
Compare
PASS→PASS was classified as newPass, so the New passes chip added it. Treat same-status pairs as unchanged except FAIL→FAIL.
Implement the free-form filters for AB Comparison page.
Visual reference
Gravacao_de_tela_20260825_174432.webm