Page MenuHomePhabricator

Extract thumbframe etc from parser into EmbeddedContentRenderer
Open, Needs TriagePublic

Description

Similar to how we replaced logic in the parser and extracted it into LinkRenderer, we should extract the code that allows us to embed images into something like:

  • EmbeddedContentRenderer
  • FramedContentRenderer.

These should take an image, a map, a graph, an iframe etc. and do consistent positional and visual embedding into the parser output, without the code duplication we have right now.

Requirements

  • be content agnostic
  • draw the frame if requested
  • properly use rightfloat leftfloat and center div wrappers for cases without framing
  • add the caption if required
  • allow the content to add a class name to the wrapper
  • have testcases

This should also simplify any introduction of <figure> etc which we might later want to attempt, aligning with parsoid.