Skip to content

v2.0.0

Compare
Choose a tag to compare
@goblindegook goblindegook released this 15 Jul 17:09

littlefoot has been rewritten in TypeScript, which enabled a cleaner architecture and slight reduction in bundle size. Browser compatibility is not as extensive as with 1.0.x, and I will no longer support older versions of Internet Explorer.

Testing framework was replaced with Jest and Cypress, and tests were adapted for simplicity.

This version introduces a number of breaking changes to advanced features. If you've been using littlefoot without relying on custom templates or its .activate() and .dismiss() methods, and don't need to provide support for older browsers, it should be safe to upgrade.

Added

  • New .unmount() method to completely remove littlefoot footnotes from the document and return it to its original structure.

Changed

  • Breaking change: .activate() and .dismiss() methods now receive the footnote identifier instead of a selector. The identifier is the sequential ordering of all footnotes in the document, starting from 1.
  • Default contentTemplate and buttonTemplate templates include fewer attributes and improperly-defined custom templates are now less likely to break functionality.
  • Improved pixel size calculations to determine popover height.
  • Improved handling of popover hover state when dismissing.
  • Resolved an issue with the anchorParentSelector element not being hidden (#17).
  • Resolved an issue with inherited font weights and sizes when a footnote was included inside header or <strong> tags (#18).
  • Reduced dependency on DOM element properties for critical functionality.

Removed

  • Breaking change: The .activate() method no longer takes a custom class name to be added to the popover, as the feature is redundant. You can manipulate both the button and the popover upon activation via the activateCallback setting.
  • Breaking change: The footnote-processed class is no longer applied to processed footnotes. Only the footnote-print-only is used now.
  • Breaking change: The is-hover class is no longer applied to hovered footnotes.
  • The purpose of the footnoteParentClass setting ported over from Bigfoot wasn't clear, and it did not appear to change behaviour, so it was removed.