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

Pass empty names option to Sheet when using StyleSheetManager with custom target #3159

Merged
merged 4 commits into from Jul 29, 2020
Merged

Pass empty names option to Sheet when using StyleSheetManager with custom target #3159

merged 4 commits into from Jul 29, 2020

Conversation

eramdam
Copy link
Contributor

@eramdam eramdam commented May 30, 2020

Fixes #2973

When looking at the thread for the above issue, I noticed that after undoing the changes from #2937, the issue was fixed.

It seems obvious that the names map change was made for a reason and I didn't want to break SSR so I settled with that solution which looks "fine" 😅

But maybe there's a better approach, if so I'd be happy to oblige 🙇‍♂️

I also updated the test for StyleSheetManager in order to mount Title both in the parent document and in the iframes, as to trigger the bug in a test environment.

@quantizor
Copy link
Contributor

@eramdam changes look ok, can you add a regression test?

@quantizor quantizor self-assigned this Jul 27, 2020
@eramdam
Copy link
Contributor Author

eramdam commented Jul 27, 2020

@eramdam changes look ok, can you add a regression test?

That's what I did by adding <Title> in the test in packages/styled-components/src/models/test/StyleSheetManager.test.js test file. Should I create a new test entirely?

@quantizor
Copy link
Contributor

Yes, adding that one line isn't obvious for what it's testing.

@eramdam
Copy link
Contributor Author

eramdam commented Jul 27, 2020

Yes, adding that one line isn't obvious for what it's testing.

Fair enough! 😄 Will do!

@eramdam
Copy link
Contributor Author

eramdam commented Jul 27, 2020

And done! 8ceffa4

quantizor
quantizor previously approved these changes Jul 29, 2020
Copy link
Contributor

@quantizor quantizor left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

Could you also add a changelog entry?

@eramdam
Copy link
Contributor Author

eramdam commented Jul 29, 2020

Looks good, thanks!

Could you also add a changelog entry?

Done! Wasn't completely sure if there was a specific format to follow so I used something similar to the already existing entries.

Copy link
Contributor

@quantizor quantizor left a comment

Choose a reason for hiding this comment

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

That looks great, thank you!

@quantizor quantizor merged commit b19d17f into styled-components:master Jul 29, 2020
@macrozone
Copy link

any chance that this can be released?

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.

StylesheetManager does not render all styles in iframes
3 participants