scrollytelling / pageflow-oembed

Plain boring links in your story become 🌟 rich, embedded content 🌟
MIT License
2 stars 0 forks source link

Pageflow 12 compatability #3

Open tilsammans opened 6 years ago

tilsammans commented 6 years ago

12.0.0.pre is not compatible with Pageflow 12.

I need to figure out how to mesh with ReactDOM over there.

tilsammans commented 6 years ago

@tf I have an idea how to get this working again!

How about page contents get stored in Redux, instead of the component itself? It would fix everything I am pretty sure.

tf commented 6 years ago

Can you elaborate? As part of the seed data, page content is already held in the redux store.

tilsammans commented 6 years ago

What if I

tf commented 6 years ago

That might work. Still the actual work of parsing HTML, rendering embeds and replacing links would be pretty much the same - just in the context of a a Redux reducer instead of the PageContent component, right?

tilsammans commented 6 years ago

Yes!

And if there is no published API in the reducer to work with the configuration attributes, I am sure we can formalise them to some extent. It seems useful to have the individual elements separately.

(my long-standing wish to change the h2 span titles to regular headings, for example. 😉)

tf commented 6 years ago

I'd be totally open to discuss such an API. Still, from my point of view, the hard part is performing the parsing/rendering - ideally in a SSR compatible way. Once that's figured out, deciding whether to introduce an API that is used by the PageContent component directly or integrating it via Redux looks a bit like a second step.

The h2 span battle still would have to won on the component level, though. :wink: