Skip to content

Conversation

@bryceosterhaus
Copy link
Member

@bryceosterhaus bryceosterhaus commented Aug 15, 2019

Added two new APIs to our portals. One is a target for nested portals, and the other is to render the portal to a specific element. By default portals now nest in one another as well.

this fixes #2246

@coveralls
Copy link

coveralls commented Aug 15, 2019

Pull Request Test Coverage Report for Build 3151

  • 9 of 9 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-8.6%) to 77.53%

Totals Coverage Status
Change from base Build 3132: -8.6%
Covered Lines: 1747
Relevant Lines: 2084

💛 - Coveralls

Copy link
Contributor

@matuzalemsteles matuzalemsteles left a comment

Choose a reason for hiding this comment

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

Sounds good! Great job with that! Just leaving a few comments before you go. Weird our coverage dropped by over 8%.

}
> = ({children, containerRef, subPortalRef}) => {
const parentPortalRef = useContext(ClayPortalContext);
const portalRef = useRef(document.createElement('div'));
Copy link
Contributor

Choose a reason for hiding this comment

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

You can check if there is document here, I was having problems with it because it was being rendered on next.clayui.com and was breaking the site build (log https://app.netlify.com/sites/next-clayui/deploys/5d5595f8912d82502b05f511), because at build time there is no document.

typeof document !== 'undefined' && document.createElement('div')

tsconfig.json Outdated
"baseUrl": ".",
"paths": {
"@clayui/*": ["node_modules/@clayui/*/src"],
"@clayui/*": ["packages/clay-*/src"],
Copy link
Contributor

Choose a reason for hiding this comment

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

Have you ever tested if this works well? by running yarn build on packages and checking if the lib folder is being generated correctly with types.

Copy link
Member Author

Choose a reason for hiding this comment

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

oh my bad, I didn't mean to include this. This was the previous code before you updated it because I was running into issues.

@bryceosterhaus
Copy link
Member Author

@matuzalemsteles yeah I was confused how coverage dropped. Maybe because this is the first test inside of shared and it might have not been looking as those files previously.

@matuzalemsteles
Copy link
Contributor

@matuzalemsteles yeah I was confused how coverage dropped. Maybe because this is the first test inside of shared and it might have not been looking as those files previously.

Oh yeah, you're right about that. We can work later on adding tests to the other files from shared.

@bryceosterhaus
Copy link
Member Author

@matuzalemsteles also, I just updated the PR. Let me know if there is anything else you notice.

Copy link
Contributor

@matuzalemsteles matuzalemsteles left a comment

Choose a reason for hiding this comment

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

LGTM!

@bryceosterhaus bryceosterhaus force-pushed the 2246 branch 2 times, most recently from 4342844 to 3ac4eaa Compare August 15, 2019 19:07
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.

Dropdown created in a modal shows up behind the modal

3 participants