Skip to content

Conversation

Andarist
Copy link
Member

This fixes an issue with rehydrated tags always being appended - regardless of prepend option.

It also makes sheet own "its" rehydrated styles - which seems like a good change, because without that flush didn't affect those.

@changeset-bot
Copy link

changeset-bot bot commented Dec 18, 2019

🦋 Changeset is good to go

Latest commit: 6140fae

We got this.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Andarist Andarist requested a review from emmatown December 18, 2019 21:40
@codesandbox-ci
Copy link

codesandbox-ci bot commented Dec 18, 2019

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 6140fae:

Sandbox Source
Emotion Configuration

Copy link
Member

@emmatown emmatown left a comment

Choose a reason for hiding this comment

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

One little thing, other than that, LGTM

@@ -84,20 +84,27 @@ export class StyleSheet {
this.before = null
}

_insertTag = (tag = createStyleElement(this)) => {
Copy link
Member

Choose a reason for hiding this comment

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

This will probably be slightly smaller if we don't do a default arg and instead call it with that where we need to

Copy link
Member Author

Choose a reason for hiding this comment

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

Agreed - proposed change is much better.

@Andarist Andarist force-pushed the fix/prepend-rehydration branch from bae9ffb to 7ef4d11 Compare December 19, 2019 08:17
@codecov
Copy link

codecov bot commented Dec 19, 2019

Codecov Report

Merging #1696 into next will increase coverage by <.01%.
The diff coverage is 100%.

Impacted Files Coverage Δ
packages/sheet/src/index.js 100% <100%> (ø) ⬆️
packages/cache/src/index.js 98.92% <100%> (+0.02%) ⬆️

@Andarist Andarist force-pushed the fix/prepend-rehydration branch from 7ef4d11 to c0384ba Compare December 19, 2019 08:30
@Andarist Andarist force-pushed the fix/prepend-rehydration branch from c0384ba to 6140fae Compare December 19, 2019 08:33
@Andarist
Copy link
Member Author

@mitchellhamilton fixed a nit-pick about _insertTag and added some tests, hard to test actual SSRed styles when used in combination with @emotion/cache so I've just skipped this. Should be ready to review & merge.

@emmatown emmatown merged commit dfe79ac into next Dec 20, 2019
@emmatown emmatown deleted the fix/prepend-rehydration branch December 20, 2019 02:07
louisgv pushed a commit to louisgv/emotion that referenced this pull request Sep 6, 2020
@github-actions github-actions bot mentioned this pull request Nov 10, 2020
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