sosy-lab / benchexec

BenchExec: A Framework for Reliable Benchmarking and Resource Measurement
Apache License 2.0
229 stars 197 forks source link

Status drop-down does not correctly display on initial render #830

Closed PhilippWendler closed 8 months ago

PhilippWendler commented 2 years ago

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.

JawHawk commented 8 months ago

@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

PhilippWendler commented 8 months ago

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