fix: prevents collapsing of execution errors when scrolled out of view #80
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
flyteorg/flyte#64
Since we use virtualization, the components used to render the rows in this table are unmounted every time they leave the viewport. This is great for performance, but it resets state when the component comes back into view. To account for this, we're now storing the expansion state for errors at the table level, and piping them through as an initial state when mounting the components. This will maintain the expansion state when the component leaves and reenters the viewport.
Note: This change should have a corresponding unit test. However, since jsdom does not support layout, we can't test scrolling the component out of the viewport and back in. So it's not possible at the moment to write a unit test for it :-(
Before:
After: