Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: prevents collapsing of execution errors when scrolled out of view #80

Merged
merged 3 commits into from
Jul 6, 2020

Conversation

schottra
Copy link
Contributor

@schottra schottra commented Jul 6, 2020

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:
CollapsingError

After:
NonCollapsingError

@schottra schottra requested review from BobNisco and podehnal July 6, 2020 19:38
@codecov-commenter
Copy link

codecov-commenter commented Jul 6, 2020

Codecov Report

Merging #80 into master will increase coverage by 0.10%.
The diff coverage is 18.18%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #80      +/-   ##
==========================================
+ Coverage   63.06%   63.16%   +0.10%     
==========================================
  Files         363      363              
  Lines        5686     5699      +13     
  Branches      842      845       +3     
==========================================
+ Hits         3586     3600      +14     
+ Misses       2100     2099       -1     
Impacted Files Coverage Δ
...ents/Executions/Tables/WorkflowExecutionsTable.tsx 29.48% <11.11%> (-2.34%) ⬇️
src/components/common/ExpandableMonospaceText.tsx 86.36% <33.33%> (+33.98%) ⬆️
...nts/Executions/Tables/ExpandableExecutionError.tsx 100.00% <100.00%> (+42.85%) ⬆️
.../components/Executions/Tables/NodeExecutionRow.tsx 91.11% <0.00%> (+2.22%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2404a5a...a1111f9. Read the comment docs.

podehnal
podehnal previously approved these changes Jul 6, 2020
BobNisco
BobNisco previously approved these changes Jul 6, 2020
Copy link
Contributor

@BobNisco BobNisco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 suggestion inline 👍

@schottra schottra dismissed stale reviews from BobNisco and podehnal via 4032c0f July 6, 2020 21:13
BobNisco
BobNisco previously approved these changes Jul 6, 2020
@service-github-lyft-semantic-release
Copy link
Contributor

🎉 This PR is included in version 0.7.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants