Skip to content

Releases: faceless-ui/modal

v3.0.0-beta.2

08 Jul 22:16
Compare
Choose a tag to compare
v3.0.0-beta.2 Pre-release
Pre-release

What's Changed

  • chore: removes publishConfig from package.json by @AlessioGr in #61

Full Changelog: v3.0.0-beta.1...v3.0.0-beta.2

v3.0.0-beta.1

08 Jul 21:26
Compare
Choose a tag to compare
v3.0.0-beta.1 Pre-release
Pre-release

What's Changed

Full Changelog: v3.0.0-beta.0...v3.0.0-beta.1

v3.0.0-beta.0

08 Jun 02:08
ab66df9
Compare
Choose a tag to compare
v3.0.0-beta.0 Pre-release
Pre-release

What's Changed

Full Changelog: v2.1.0-rc.0...v3.0.0-beta.0

v2.1.0-rc.0

05 Jun 22:05
Compare
Choose a tag to compare
v2.1.0-rc.0 Pre-release
Pre-release

What's Changed

Full Changelog: v2.0.2...v2.1.0-rc.0

v2.0.2

29 Feb 19:34
64d66fb
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.0.1...v2.0.2

v2.0.1

12 Oct 05:13
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.0.0...v2.0.1

v2.0.0

01 Oct 03:37
Compare
Choose a tag to compare

v1.0.0 to v2.0.0 Migration Guide

The two major changes in v2 are:

  1. multiple open modals
  2. overall DX improvements

Migration between these two versions is simple. For legacy source code and support, check out the v1 branch.

Breaking changes:

  1. The following methods have been renamed. They function the same, so find/replace should work for most cases:

    • open -> openModal
    • close -> closeModal
    • toggle -> toggleModal
    • closeAll -> closeAllModals
    • oneIsOpen -> oneModalIsOpen
  2. currentModal has been deprecated, to find if one particular modal is open, use the helper function instead:

    const { isModalOpen } = useModal();
    const isOpen = isModalOpen(modalSlug)

    or do this with plain js by reading modalState directly:

    const isOpen = modalState[slug] && modalState[slug].isOpen;

Non breaking changes:

  1. The toggle method will no longer close all modals, it will only close the toggled modal. So you will need to explicitly call closeAll if your UI calls for it.
  2. If using native routing, the ?modal=my-modal query param will now potentially be an array, i.e. ?modal[0]=my-modal&modal[1]=other-modal. Plain strings can continue to be used, so this change is backwards compatible.

v2.0.0-alpha.4

09 Sep 04:21
Compare
Choose a tag to compare
v2.0.0-alpha.4 Pre-release
Pre-release

v2.0.0-alpha.2

08 Sep 23:05
Compare
Choose a tag to compare
v2.0.0-alpha.2 Pre-release
Pre-release

What's Changed

Migration guide from 1.0.0 to 2.0.0:

The following methods have been renamed for a better DX:

  • open -> openModal
  • close -> closeModal
  • toggle -> toggleModal
  • closeAll -> closeAllModals
  • oneIsOpen -> modalIsOpen

Full Changelog: v2.0.0-alpha.1...v2.0.0-alpha.2

v2.0.0-alpha.1

08 Sep 13:07
Compare
Choose a tag to compare
v2.0.0-alpha.1 Pre-release
Pre-release

POC for multiple open modals.

Migration guide from 1.0.0 to 2.0.0:

  • currentModal has been deprecated, you should now read modalState instead. To find if one particular modal is open, just use normal js like this:
       const isOpen = modalState[slug] && modalState[slug].isOpen;
  • toggle will no longer close all modals, it will only close the toggled modal. You should now close all modals before toggling one, if your UI calls for it.
  • If opting-in to native routing, the ?modal=my-modal query param will now potentially be an array, i.e. ?modal[0]=my-modal&modal[1]=other-modal. This is a non-breaking change that maintains backwards compatibility, so plain strings can continue to be used.

Full Changelog: v1.3.2...v2.0.0-alpha.1