benchexec icon indicating copy to clipboard operation
benchexec copied to clipboard

Status drop-down does not correctly display on initial render

Open PhilippWendler opened this issue 3 years ago • 1 comments

When opening the table tab of our HTML tables with a defined status/category filter, e.g., via this link), the drop-down filter does not correctly display the defined filter, it displays Show all. This is immediately corrected by doing something with the table, like changing sort order or even just opening the filter sidebar. This is also visible when switching back to the table tab from some othr tab. The text fields for numeric filters have correct behavior.

Git bisect points to 6b5be445f7f5f7fb4d421f7f7253d7ecdebdd85f, which unfortunately is a merge commit, so it is not immediately visible what causes this. Before this commit, the status drop-down displayed the wrong value briefly before re-rendering and showing the correct value immediately after loading. So there is likely some problem that status drop-down does not get the correct values on the first render, and the merge removed the additional re-render. Of course it would be best to have the correct value visible immediately without re-rendering.

PhilippWendler avatar May 23 '22 06:05 PhilippWendler

@PhilippWendler I found the source of the issue. It was due to the initial assigning of filteredColumnValues to value {} at line 103 in https://github.com/sosy-lab/benchexec/blob/main/benchexec/tablegenerator/react-table/src/components/ReactTable.js .

To solve it, I defined a function to return the newFilteredColumnValues , assigned it to filteredColumnValues and made changes in useEffect. The solution works as it is immediately visible, attached is the screen recording of it.

Can I create a PR to merge the changes from my fork to resolve the issue ? Also I am interested in contributing to BenchExec in GSOC 2024.
https://github.com/sosy-lab/benchexec/assets/86140365/3c8b446d-b938-4259-bacf-036233aa1cbd

JawHawk avatar Feb 27 '24 22:02 JawHawk

Thanks a lot! Sure, a PR is always welcome.

PhilippWendler avatar Feb 28 '24 06:02 PhilippWendler