Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more Android configuration options #345

Merged
merged 6 commits into from
Feb 4, 2020

Conversation

irgendeinich
Copy link
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
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 Add toolbarTitle Javascript API to override the iOS toolbar title #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