Skip to content

Add more Android configuration options#345

Merged
irgendeinich merged 6 commits intomasterfrom
reinhard/344-additional-configuration
Feb 4, 2020
Merged

Add more Android configuration options#345
irgendeinich merged 6 commits intomasterfrom
reinhard/344-additional-configuration

Conversation

@irgendeinich
Copy link
Copy Markdown
Contributor

@irgendeinich irgendeinich commented Jan 30, 2020

Resolves #344

Details

Adds two new keys to the configuration prop:

  • showSettingsMenu for hiding and showing the view settings button in the toolbar.
  • customTitle for overriding the document title with a custom title that will be displayed.

Adds two new props to the PSPDFKitView:

  • showNavigationButtonInToolbar for enabling and disabling showing a navigation button in the main toolbar.
  • onNavigationButtonClicked for handling when this up button was clicked.

Acceptance Criteria

  • When approved, right before merging, rebase with master and increment the package version in package.json, package-lock.json, samples/Catalog/package.json, and samples/NativeCatalog/package.json (see example commit: 1bf805f).
  • Create a new release (and tag) with the new package version (see https://github.com/PSPDFKit/react-native/releases).

Add new showBackButtonInToolbar and onNavigationButtonClicked props to PSPDFKitView
Copy link
Copy Markdown
Contributor

@radazzouz radazzouz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The newly added props are Android only. I tested the iOS Catalog and it runs great. This change does not impact iOS. The JS code also LGTM 👍

Here are a few suggestions:

  1. On iOS we added the ability to add a custom title in #255 and we named the configuration option toolbarTitle instead of customTitle. I would use the same naming in here for consistency.

  2. I would also document the use of the custom title in a Catalog example.

@irgendeinich irgendeinich merged commit 6841c48 into master Feb 4, 2020
@irgendeinich irgendeinich deleted the reinhard/344-additional-configuration branch February 4, 2020 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Android] Expose configuration option for custom title and hiding settings menu

4 participants