aphrodite icon indicating copy to clipboard operation
aphrodite copied to clipboard

Enable buffer methods before needing to call StyleSheetServer.renderStatic

Open DaBs opened this issue 6 years ago • 9 comments

Currently, Aphrodite assumes that it is the first server-side module to render the tree, but since StyleSheetServer.renderStatic expects a string as return value, it eliminates any possibility of walking the reference with another module.

This PR borrows some of the TestUtils functions to allow a, albeit a bit clunky, method of avoiding having to append classes to the DOM while walking an existing reference to a tree.

DaBs avatar Aug 31 '18 15:08 DaBs

Hey @DaBs,

Thanks for the PR! Mind signing our Contributor License Agreement?

When you've done so, go ahead and comment [clabot:check] and I'll check again.

Yours truly, khanbot

khanbot avatar Aug 31 '18 15:08 khanbot

[clabot:check]

DaBs avatar Aug 31 '18 15:08 DaBs

CLA signature looks good :+1:

khanbot avatar Aug 31 '18 15:08 khanbot

@lencioni I believe you guys have been in need of a fix to this as per https://github.com/Khan/aphrodite/issues/326. Is this something you would consider reviewing?

DaBs avatar Sep 01 '18 14:09 DaBs

@jlfwong Is this something you know if people within the project has time to look at? I believe it's quite a nice way of giving some manual tools for people to be able to temporarily suspend aphrodite style rendering when it comes to SSR.

DaBs avatar Sep 19 '18 00:09 DaBs

I'm running into this issue as well! Any chance this will be merged & released any time soon? :)

monokrome avatar Jan 25 '19 06:01 monokrome

@jlfwong and @lencioni is there any way somebody can look into merging this fix?

mishkinf avatar Feb 05 '19 22:02 mishkinf

Y'all, this has been an issue for quite a long time now...

monokrome avatar Jan 26 '21 01:01 monokrome

Man, I has a problems that this PR will resolve. Has plans to merge it? The problem is the below:

Error: Cannot automatically buffer without a document

@jlfwong can you help us?

drianoaz avatar Feb 11 '21 23:02 drianoaz