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 preview rendering inside packages, refactor logic related to view modes #2328

Merged
merged 15 commits into from
Sep 3, 2021

Conversation

nl0
Copy link
Member

@nl0 nl0 commented Sep 2, 2021

Description

  • fix condition causing infinite re-renders
  • move setState out of the render phase into useEffect call
  • refactor for more reuse and encapsulation

TODO

@nl0 nl0 requested a review from fiskus September 2, 2021 08:09
@codecov
Copy link

codecov bot commented Sep 3, 2021

Codecov Report

Merging #2328 (125ab3d) into master (a3bd50b) will decrease coverage by 0.01%.
The diff coverage is 35.63%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2328      +/-   ##
==========================================
- Coverage   44.04%   44.03%   -0.02%     
==========================================
  Files         490      490              
  Lines       23905    23879      -26     
  Branches     3060     3055       -5     
==========================================
- Hits        10530    10515      -15     
+ Misses      12534    12528       -6     
+ Partials      841      836       -5     
Flag Coverage Δ
api-python 89.82% <ø> (ø)
catalog 14.30% <35.63%> (-0.08%) ⬇️
lambda 94.15% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
catalog/app/components/Preview/Display.js 0.00% <0.00%> (ø)
...g/app/components/SelectDropdown/SelectDropdown.tsx 0.00% <0.00%> (ø)
catalog/app/components/SelectDropdown/index.ts 0.00% <0.00%> (ø)
catalog/app/containers/Bucket/File.js 0.00% <0.00%> (ø)
catalog/app/containers/Bucket/FileView.js 0.00% <0.00%> (ø)
catalog/app/containers/Bucket/PackageTree.js 0.00% <0.00%> (ø)
catalog/app/containers/Bucket/renderPreview.js 0.00% <0.00%> (ø)
catalog/app/embed/File.js 0.00% <ø> (ø)
catalog/app/utils/voila.ts 0.00% <0.00%> (ø)
catalog/app/utils/ResourceCache.js 19.14% <33.33%> (-0.14%) ⬇️
... and 3 more

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 a3bd50b...125ab3d. Read the comment docs.

@@ -1,136 +1,164 @@
/**
* @jest-environment jsdom
Copy link
Member

Choose a reason for hiding this comment

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

I think this is obsolete since you don't use window.fetch anymore

Copy link
Member Author

Choose a reason for hiding this comment

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

hm maybe

@nl0 nl0 merged commit 093ced4 into master Sep 3, 2021
@nl0 nl0 deleted the fix-preview-rendering branch September 3, 2021 08:35
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.

2 participants