Skip to content

Conversation

@christopher-johnson
Copy link
Contributor

react-iframe-comm bundles react and react-dom. A PR towards resolving issue this upstream have had no response in several months, and it appears that this library is unmaintained. this solves the problem (and consequently reduces Mirador bundle size by ~7k). It removes the deprecated lifecycle componentWillReceiveProps from the component. Also, this resolves a console warning about the inline attribute on Typography. in WindowAuthenticationControl

@codecov-io
Copy link

codecov-io commented Jul 9, 2019

Codecov Report

Merging #2861 into master will increase coverage by 0.05%.
The diff coverage is 97.22%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2861      +/-   ##
==========================================
+ Coverage   93.38%   93.43%   +0.05%     
==========================================
  Files         151      152       +1     
  Lines        2281     2317      +36     
==========================================
+ Hits         2130     2165      +35     
- Misses        151      152       +1
Impacted Files Coverage Δ
src/components/AccessTokenSender.js 100% <ø> (ø) ⬆️
src/components/WindowAuthenticationControl.js 100% <ø> (ø) ⬆️
src/lib/IFrameComm.js 97.22% <97.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 9d7c314...c2c0ec5. Read the comment docs.

@@ -0,0 +1,201 @@
import React, { Component } from 'react';
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is code copied from react-iframe-comm? We probably need to preserve the upstream license information in this file (and any others we're copying over.).

/**
*
*/
export class IframeComm extends Component {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is the reason for this living in src/lib because it is code copied from upstream? I would expect it to be in src/components

Copy link
Contributor Author

Choose a reason for hiding this comment

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

lib is usually where compiled code goes so storing source in this directory is odd anyway, but in this case, since it is a "third party library component" (note also that it is a derivation, not a copy), it could/should reside in a directory that is distinct from your homegrown code (e.g. vendors) or even better, make a monorepo and build it as a separate package.

@@ -0,0 +1 @@
export * from './IFrameComm';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this a new pattern that is needed?

await page.waitFor(1000);
await expect(numWindows).toBe(2);
});
}, 10000);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Was this needed for the replacement of the iframe component? Were the tests failing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no, nothing to do with the component. these puppeteer tests consistently fail for me locally and also sometimes on CI. increasing the timeout solves it.

Copy link
Collaborator

@mejackreed mejackreed left a comment

Choose a reason for hiding this comment

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

Just a few additional questions about this

@christopher-johnson
Copy link
Contributor Author

FYI: I do not care whether this PR gets merged, but to resolve the issue, I suggest that you make whatever tangential changes you feel are appropriate. I do not spend anymore time on this.

@mejackreed
Copy link
Collaborator

Ok thanks @christopher-johnson . We will close this for now and revisit if we need to.

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