Skip to content

Releases: vonovak/react-navigation-header-buttons

v6.0.0

18 Oct 12:37
Compare
Choose a tag to compare

New features

  • ensure that on android, all touchables have the same ripple size (no matter if you have a small icon or large text label in it) which is closer to native behavior

Breaking

  • touchables update (removed an old touchables impl)
  • requires RN 63 / expo 39

v5.0.2

14 Aug 22:41
Compare
Choose a tag to compare

fix: make dropdown menu work both in RN and expo (#89) - improves appearance of overflowMenuPressHandlerDropdownMenu
fix: Menu - catch up with RN paper (#79)
chore: specify peer dependencies (#92)

v5.0.0

30 Jul 14:32
Compare
Choose a tag to compare

features

feat: added support for destructive actions in overflowMenuPressHandlerActionSheet #84

breaking

this release requires you use RN >= 0.62

v4.0.3

30 Jul 08:34
Compare
Choose a tag to compare

fix: do not render OverflowMenu if there are no valid children (#85)

v4.0.2

10 May 16:23
Compare
Choose a tag to compare

fixed bug

  • do not assume OverflowMenu is always direct child of HeaderButtons #72

v4.0.1

08 May 07:19
Compare
Choose a tag to compare

improvement

  • add missing docs, improve error message: #71

v4.0.0

07 May 18:36
Compare
Choose a tag to compare

Welcome to v4!

This is, from a fair part, a rewrite. The basic usage remains the same, so migration should not be too hard. If you're using Flow or Typescript, that will make it even easier - both typings should be solid!

Improvements

✅Greater component reuse across screens:

Previously, if you used eg. <HiddenItem title="search" iconName="ios-search" onPress={() => alert('search')} /> in one screen, you couldn't really use it in another one. Now you can - just create a component that wraps it, eg. like this:

const ReusableHiddenItem = ({ onPress }) => <HiddenItem title="hidden2" onPress={onPress} />;

✅New overflow menu handler: Material dropdown menu

This is material dropdown menu adapted from react-native-paper, credit for amazing job goes to them. This Menu is bundled in this library (no dependency on react-native-paper).

To use it, pass overflowMenuPressHandlerDropdownMenu as onPress to OverflowMenu (this is the default for Android and Web)

✅Cleaner api:

  • new OverflowMenu component
  • some props have been moved to OverflowMenu

✅Experimental web support

  • for overflow menu, you need to use the Material Menu (pass overflowMenuPressHandlerDropdownMenu as onPress to OverflowMenu)

✅CI improvements

  • Flow, Jest tests and ESLint run in CI. I'd like to check TS validity too (by checking the example project) - please open a PR if you're using TS.

Breaking Changes

Because so much has changed, this may not be complete list. Let me know if I forgot something.

❌ changed

  • show prop is removed -> use Item or HiddenItem component
  • overflowButtonWrapperStyle -> pass style to OverflowMenu
  • onOverflowMenuPress -> pass onPress to OverflowMenu
  • overflowButtonTestID -> pass testID to OverflowMenu
  • buttonWrapperStyle -> renamed to style
  • if you want an Item or HiddenItem to be disabled, pass disabled={true} prop

Known Issues

see https://github.com/vonovak/react-navigation-header-buttons#known-issues

v3.0.5

08 Feb 22:38
Compare
Choose a tag to compare

fixes #61 (ripple not being shown), but may have the side effect of ripple being extended to beyond the border of the bounding view. Please double-check if this is what you want.

A better way to do this was proposed in react-native core: facebook/react-native#28009

v3.0.4

01 Nov 08:28
Compare
Choose a tag to compare

improvements

  • Add export for defaultOnOverflowMenuPress to TS typings

v3.0.3

14 Oct 12:18
Compare
Choose a tag to compare
  • added HiddenItem class to TS typings (#55)