Something seems to be off with parameter passing to the dismiss form - dismissing clears filter..
Yeah, the dismiss_variant_button does not take *data or form, and the variant_update endpoint isn't really built to take the main form, only the local submit form. I'm guessing it more like always forgot filter rather than broke with a later change? 馃槄
We'll have to add a way to store away the filter contents and reload them on the variants page once variant_update is done and refers back there again - if it is not on the variant page.
We'll have to add a way to store away the filter contents and reload them on the variants page once variant_update is done and refers back there again - if it is not on the variant page.
Damn this dismiss variants!
Yeah, the page is reloaded once the variant is dismissed, is there a way to call an endpoint without the reload happening in flask? It feels a bit cumbersome to persist the filter content after the reload. Meanwhile, do you think I should just remove the dismiss variant until we find a solution?
馃槃 Don't worry about it - that happens to all of us. We'll think of something better tomorrow; probably simpler than that. I would not remove it unless it seems completely impossible - which I don't think it is. It does work, and totally so for an unfiltered (default filtered) list. I suppose the refresh happens on referring back, but from the top of my head it is hard to forgo. But one could perhaps pass the relevant data to repopulate the filters_form through, in case it is called from variants rather than variant?
Sessions, I think the easiest way would be to save the filters in sessions. On POST request the filter gets updated, on GET requests it gets loaded
In this case might be that the fix is very easy, let's check tomorrow. Don't worry, it's not a big problem!
I've been thinking about a solutions for this one since yesterday. It's not a trivial one. If you don't want to refactor how variants filters are saved and used (which I think we should do, one day or another, but it's quite a lot of work, and might introduce other bugs..) then we could have something like this:

Basically you include the variants table in the POST form and add a checkbox to the variants, to dismiss them. All the checked variants will be dismissed with the same reasons. This is not ideal, I know, but it has 2 advantages:
Doesn't reload the page every time you dismiss a variant. Every time that the page reloads you find yourself at the beginning of the variants table, even if you dismissed the last variant.
It saves a lot of space in the variants table, and we need the space.
What do you think, shall we opt for this solution?
Otherwise we might just remove the dismiss option
I think it is a good solution, it makes dismissing variants faster which is what we wanted!
That would work for me - I like the space saving, and it retains most functionality.
We could run it by ideally a cancer side user. @heronikdin? From the RD side, you would most of the time dismiss only from the variant page, since you kind of want the added info, and what is obvious directly from the variants table is already a reasonable factor in the rank score.
Of course I could try, why not? Do you think it is a problem if my variants are pinned if I then try to dismiss variants? Since I pin all of the variants I want to look up..
Or maybe I have misunderstood what you discussed and would like to test?