Frontity release: A bunch of enhancements and bug fixes

Enhancements

  • Improve the Frontity Embedded Mode plugin to make it more secure and easy to use. Moreover, we have released a full explanation of the Embedded Mode implementation in the Frontity docs.

  • Migrate @frontity/connect to be a thin layer on top of react-easy-state. This means that in the future, taking advantage of the bug fixes and other improvements from react-easy-state will be much easier. #415

  • Add an --analyze option to the dev and build commands. The flag should be explicitly set in order to generate HTML files for bundle analysis. #774

  • Add an HMR flag to the Frontity state (state.frontity.hmr) that indicates if the code is run on an HMR refresh or not. #783

  • Modifies the frontity create command so it generates a tsconfig.json file and adds dev dependencies to package.json. Feature discussion: Full TypeScript support in `frontity create`. Thanks @orballo for the Pull Request :tada: !

  • The GooglePublisherTag component now accepts an optional collapseEmptyDiv prop
    which if true will collapse ad slots that are not filled by Google Publisher Tag. Thanks @VinuRaj for the Pull Request :tada: !

  • Make the @frontity/google-tag-manager-analytics package “AMP-aware”. This means it would render an <amp-analytics> tag for each container ID provided, along with the given configuration. #766

  • Add Frontity tests for older browsers using Selenium in BrowserStack. #638

Bug fixes

  • Due to a recent warning in Chrome for missusing preload instead of modulepreload for module files we need to replace the loadable linkType for assets that have to be preloaded as modules instead. #777
  • Return an empty array when there is no <head> tag in the REST API - Head Tags plugin. Thanks @johnfrancisli for the Pull Request :tada: !
  • Fix the <Script> component to allow more attributes and event handlers. Thanks @Koli14 for the Pull Request :tada: !
  • Fix the <Link> component when state.source.url or state.frontity.url contains a pathname, returning the correct final link. #792
  • Fix some errors causing the AMP package to fail the AMP validation: AMP package - #66. #776
  • Export new types related to AMP: AmpConfig, AmpRequest and AmpTrigger. #766
  • Modify derived props so they receive state and libraries as arguments. Also, fix the Derived type definition. #791
  • Move the call of the afterSSR() actions to before taking the state snapshot. This way any afterSSR() action still has an option to modify the snapshot before sending it to the client. This is important for security as we delete the state.source.auth token in that action in wp-source. #764
  • Prevent a possible race condition in useInfiniteScroll. It could happen when a link changes state.router.link right before the useEffect callback that manages the route runs. #785
  • Fix broken links in mars-theme README.md. #789
  • Fix broken links in twentytwenty-theme Readme. #784
  • Fix a bug that causes the URL being incorrectly populated when doing an HMR refresh. #783
  • Make redirection URLs relative, so they redirect to localhost in a dev environment. #775
  • Remove the form.errors property because it is not currently used and was included unnecessarily in the first version of the package. #755
  • Bail out of redirection if frontity is running into embedded mode. #771
  • Fix a bug which caused an infinite loop if the 3xx redirection was “internal” (meaning redirecting to the WP or Frontity domain) and the location of the redirection matched the link as discussed in 301 redirects stored in WordPress database - #28 by luisherranz. #767
  • Fix the pattern of the internal redirection when state.source.homepage is defined, making links with a search param (?s=some+term) to keep using the post archive handler. #793
  • Add different schemas for categories and tags to avoid ID collisions inside libraries.source.populate(). #795

Plugins Changelog

[email protected]

Patch Changes

  • 8a28bb2 #51 - Return an empty array when there is no <head> tag.

Packages Changelog


@frontity/[email protected]

Patch Changes


@frontity/[email protected]

Patch Changes


@frontity/[email protected]

Patch Changes

  • 944d5888 #770 Thanks @Koli14! - Fix the <Script> component to allow more attributes and event handlers.

@frontity/[email protected]

Minor Changes

  • 7111b3ce #415 Thanks @luisherranz! - Migrate @frontity/connect to be a thin layer on top of react-easy-state. This means that in the future, taking advantage of the bug fixes and other improvements from react-easy-state will be much easier.

Patch Changes


@frontity/[email protected]

Minor Changes

  • 62e60216 #774 Thanks @DAreRodz! - Add an --analyze option to the dev and build commands. The flag should be explicitly set in order to generate HTML files for bundle analysis.
  • 86b2eff9 #783 Thanks @luisherranz! - Add an HMR flag to the Frontity state (state.frontity.hmr) that indicates if the code is run on an HMR refresh or not.

Patch Changes

  • aaa85073 #764 Thanks @michalczaplinski! - Move the call of the afterSSR() actions to before taking the state snapshot. This way any afterSSR() action still has an option to modify the snapshot before sending it to the client. This is important for security as we delete the state.source.auth token in that action in wp-source.

[email protected]

Minor Changes

  • 62e60216 #774 Thanks @DAreRodz! - Add an --analyze option to the dev and build commands. The flag should be explicitly set in order to generate HTML files for bundle analysis.

Patch Changes


@frontity/[email protected]

Major Changes

Patch Changes


@frontity/[email protected]

Minor Changes

  • 4aea44d8 #766 Thanks @DAreRodz! - Make the @frontity/google-tag-manager-analytics package “AMP-aware”. This means
    it would render an <amp-analytics> tag for each container ID provided, along
    with the given configuration.

Patch Changes


@frontity/[email protected]

Patch Changes


@frontity/[email protected]

Patch Changes


@frontity/[email protected]

Patch Changes

  • 86b2eff9 #783 Thanks @luisherranz! - Fix a bug that causes the URL being incorrectly populated when doing an HMR refresh.

@frontity/[email protected]

Patch Changes


@frontity/[email protected]

Minor Changes

  • 86b2eff9 #783 Thanks @luisherranz! - Add an HMR flag to the Frontity state (state.frontity.hmr) that indicates if the code is run on an HMR refresh or not.

Patch Changes

  • 641a1cf0 #791 Thanks @DAreRodz! - Modify derived props so they receive state and libraries as arguments. Also, fix the Derived type definition.

@frontity/[email protected]

Major Changes

Patch Changes


@frontity/[email protected]

Patch Changes

  • 4f12c5ee #793 Thanks @DAreRodz! - Fix the pattern of the internal redirection when state.source.homepage is defined, making links with a search param (?s=some+term) to keep using the post archive handler.
3 Likes