Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #434 +/- ##
==========================================
- Coverage 64.69% 64.00% -0.69%
==========================================
Files 7 66 +59
Lines 473 614 +141
Branches 141 131 -10
==========================================
+ Hits 306 393 +87
- Misses 69 124 +55
+ Partials 98 97 -1
Continue to review full report at Codecov.
|
This was
linked to
issues
Nov 26, 2020
852b62c to
5695fea
Compare
This was referenced Jan 16, 2021
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
BREAKING CHANGE: list padding will not adapt to markers width anymore. You need to explicitly enable this behavior via the new `enableDynamicMarkerBoxWidth` lists renderers prop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Foundry Status

Check the announcement thread
Remaining work before stable release
Feature Parity (v4)
ignoredTags(renamedignoredDomTags)ignoreNodesFunction(renamedignoreDomNode)alterNode(moved todomVisitors.onElement, tamper directly the node reference and use domutils to insert, delete children)alterChildren(moved todomVisitors.onElement, tamper with children via domutils)alterData(moved todomVisitors.onText; tamper directly the node referencetextfield)renderersPropsignoredStyles(BREAKING: names should be camelCased.)allowedStyles(BREAKING: names should be camelCased.)emSizenodeIndexandparentviatnodelistsPrefixesRenderers→customListStyleSpecsFeature Parity (v5)
computeImagesMaxWidthwithcomputeEmbeddedMaxWidthhtmlanduriwithsource(supportsmethod,bodyandheaders)WebViewanddefaultWebViewPropspropsdomNodeToHTMLStringutilFixes
New Features
useInternalRenderer.defaultViewPropsDocumentMetadatafrom any component (an object containing meta information of the document, such as lang, baseUrl, ...etc) withuseDocumentMetadatahook, and from the controlling component withonDocumentMetadataLoadedprop.baseUrlforRenderHTMLSourceInlinesourcesDocumentMetadata. This helps normalize relativesrcandhrefs (useNormalizedUrlhook).TRenderEngineProvidercomponent to share one engine instance across multipleRenderHTMLinstances.markers.anchor === truefrom themarkersprop. You can also set custom markers withsetMarkersForTNodeprop.Postponed
Doc
Tests
Modules
compat module to ease the transitioncancelled in favor of migration guideFixes
Features Highlight
New props
idsStylesproperty (similar to classesStyles);systemFontsandfallbackFontsprops), see demo.enableUserAgentStyles(true by default, the "browser" styles);enableCSSInlineParsing(true by default)enableExperimentalMarginCollapsingto comply with the margin collapsing CSS standard (experimental, only work on adjacent blocks, and doesn't work with percent units), see demo;extendDefaultRendererutility to tamper with the element model of a tag (see "Model Tampering" in the demo, which allows inline images!).customListStyleSpecsto create arbitrary list counter styles.renderersPropsnow supports renderer-specific fields. For example,renderersProps.a.onPressreplacesonLinkPressprop.renderersProps.(ol|ul).enableExperimentalRtlto reverse the display order of list markers and content when either dir attribute or direction CSS property are set to"rtl".Elements
<dl>)<ins>,<del>CSS
whiteSpacestyle property, or inlinewhite-space: xx;see demo;list-style-typeCSS property! Also available in passed styles (tagsStyles...). Currently works with disc, circle, square, decimal, lower-alpha; upper-alpha. It currently only works withliandultags, see demo.Renderer API
useInternalRendererhook, to which you can pass ViewProps or TextProps, depending on the tnode, along with specific props for this renderer. This default renderer also supportsonPressprop, so any renderer can be super easily configured as interactive!contentModel), what are the "user agent" styles for this tag (mixedUAStyles) and how to derive conditional user agent styles from attributes (getUADerivedStyleFromAttributes). There are some advanced options, such asisOpaque, which allows access to the children DOM tree from the TNode, especially useful for SVG and other special markups.Most of the time, you don't have to care about it, and just use the default model for this tag exported in
defaultHTMLElementModels. It is yet a powerful feature which lets you put the hands on the engine!Example of Custom Interactive
Example of "Children Tampering"
Below is an example where our custom article render will inject advertisement below the second and fourth children:
will render this html snippet:
like this

Removed props
customWrapperandcontainerStyleonParsedstaticContentMaxWidthignoreNodesFunctionptSize