-
-
Notifications
You must be signed in to change notification settings - Fork 73
docs: update docs #158
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
docs: update docs #158
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| <!-- | ||
| We, the rest of the NativeScript community, thank you for your | ||
| contribution! | ||
| To help the rest of the community review your change, please follow the instructions in the template. | ||
| --> | ||
|
|
||
| <!-- PULL REQUEST TEMPLATE --> | ||
| <!-- (Update "[ ]" to "[x]" to check a box) --> | ||
|
|
||
| ## PR Checklist | ||
|
|
||
| - [ ] The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/master/CONTRIBUTING.md#commit-messages. | ||
| - [ ] There is an issue for the bug/feature this PR is for. To avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it. | ||
| - [ ] All existing tests are passing | ||
| - [ ] Tests for the changes are included | ||
|
|
||
| ## What is the current behavior? | ||
| <!-- Please describe the current behavior that you are modifying, or link to a relevant issue. --> | ||
|
|
||
| ## What is the new behavior? | ||
| <!-- Describe the changes. --> | ||
|
|
||
| Fixes/Implements/Closes #[Issue Number]. | ||
|
|
||
| <!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. --> | ||
|
|
||
| <!-- | ||
| BREAKING CHANGES: | ||
| [Describe the impact of the changes here.] | ||
| Migration steps: | ||
| [Provide a migration path for existing applications.] | ||
| --> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| # Contributing to NativeScript Imagepicker | ||
|
|
||
| :+1: First of all, thank you for taking the time to contribute! :+1: | ||
|
|
||
| Here are some guides on how to do that: | ||
|
|
||
| <!-- TOC depthFrom:2 --> | ||
|
|
||
| - [Code of Conduct](#code-of-conduct) | ||
| - [Reporting Bugs](#reporting-bugs) | ||
| - [Requesting Features](#requesting-features) | ||
| - [Submitting a PR](#submitting-a-pr) | ||
| - [Where to Start](#where-to-start) | ||
|
|
||
| <!-- /TOC --> | ||
|
|
||
| ## Code of Conduct | ||
| Help us keep a healthy and open community. We expect all participants in this project to adhere to the [NativeScript Code Of Conduct](https://github.com/NativeScript/codeofconduct). | ||
|
|
||
|
|
||
| ## Reporting Bugs | ||
|
|
||
| 1. Always update to the most recent master release; the bug may already be resolved. | ||
| 2. Search for similar issues in the issues list for this repo; it may already be an identified problem. | ||
| 3. If this is a bug or problem that is clear, simple, and is unlikely to require any discussion -- it is OK to open an issue on GitHub with a reproduction of the bug including workflows and screenshots. If possible, submit a Pull Request with a failing test, entire application or module. If you'd rather take matters into your own hands, fix the bug yourself (jump down to the [Submitting a PR](#submitting-a-pr) section). | ||
|
|
||
| ## Requesting Features | ||
|
|
||
| 1. Use Github Issues to submit feature requests. | ||
| 2. First, search for a similar request and extend it if applicable. This way it would be easier for the community to track the features. | ||
| 3. When requesting a new feature, please provide as much detail as possible about why you need the feature in your apps. We prefer that you explain a need rather than explain a technical solution for it. That might trigger a nice conversation on finding the best and broadest technical solution to a specific need. | ||
|
|
||
| ## Submitting a PR | ||
|
|
||
| Before you begin make sure there is an issue for the bug or feature you will be working on. | ||
|
|
||
| Following these steps is the best way to get your code included in the project: | ||
|
|
||
| 1. Fork and clone the nativescript-imagepicker repo: | ||
| ```bash | ||
| git clone https://github.com/<your-git-username>/nativescript-imagepicker.git | ||
| # Navigate to the newly cloned directory | ||
| cd nativescript-imagepicker | ||
| # Add an "upstream" remote pointing to the original repo. | ||
| git remote add upstream https://github.com/NativeScript/nativescript-imagepicker.git | ||
| ``` | ||
|
|
||
| 2. Read our [development workflow guide](DevelopmentWorkflow.md) for local setup | ||
|
|
||
| 3. Create a branch for your PR | ||
| ```bash | ||
| git checkout -b <my-fix-branch> master | ||
| ``` | ||
|
|
||
| 4. The fun part! Make your code changes. Make sure you: | ||
| - Follow the [code conventions guide](https://github.com/NativeScript/NativeScript/blob/master/CodingConvention.md). | ||
| - Follow the [commit message guidelines](https://github.com/NativeScript/NativeScript/blob/pr-template/CONTRIBUTING.md#commit-messages) | ||
| - Update the README if you make changes to the plugin API | ||
|
|
||
| 5. Before you submit your PR: | ||
| - Rebase your changes to the latest master: `git pull --rebase upstream master`. | ||
| - Ensure your changes pass tslint validation. (run `npm run tslint` in the `src` folder). | ||
|
|
||
| 6. Push your fork. If you have rebased you might have to use force-push your branch: | ||
| ``` | ||
| git push origin <my-fix-branch> --force | ||
| ``` | ||
|
|
||
| 7. [Submit your pull request](https://github.com/NativeScript/nativescript-imagepicker/compare) and compare to `NativeScript/nativescript-imagepicker`. Please, fill in the Pull Request template - it will help us better understand the PR and increase the chances of it getting merged quickly. | ||
|
|
||
| It's our turn from there on! We will review the PR and discuss changes you might have to make before merging it! Thanks! | ||
|
|
||
| ## Where to Start | ||
|
|
||
| If you want to contribute, but you are not sure where to start - look for issues labeled [`help wanted`](https://github.com/NativeScript/nativescript-imagepicker/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22). |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| # Development Workflow | ||
|
|
||
| <!-- TOC depthFrom:2 --> | ||
|
|
||
| - [Prerequisites](#prerequisites) | ||
| - [Develop locally](#develop-locally) | ||
| - [Run UI Tests](#run-ui-tests) | ||
|
|
||
| <!-- /TOC --> | ||
|
|
||
|
|
||
| ## Prerequisites | ||
|
|
||
| * Install your native toolchain and NativeScript as [described in the docs](https://docs.nativescript.org/start/quick-setup) | ||
|
|
||
| * Review [NativeScript plugins documentation](https://docs.nativescript.org/plugins/plugins) for more details on plugins development | ||
|
|
||
|
|
||
| ## Develop locally | ||
|
|
||
| For local development we recommend using the npm commands provided in the plugin's package.json | ||
|
|
||
| Basically executing a bunch of commands will be enough for you to start making changes to the plugin and see them live synced in the demo. It's up to you to decide which demo to use for development - TypeScript or TypeScript + Angular. | ||
|
|
||
|
|
||
| To run and develop using TypeScript demo: | ||
| ```bash | ||
| $ cd nativescript-imagepicker/src | ||
| $ npm run demo.ios | ||
| $ npm run demo.android | ||
| ``` | ||
|
|
||
| To run and develop using TypeScript + Angular demo: | ||
| ```bash | ||
| $ cd nativescript-imagepicker/src | ||
| $ npm run demo.ng.ios | ||
| $ npm run demo.ng.android | ||
| ``` | ||
|
|
||
| After all the changes are done make sure to | ||
| - test them in all the demo apps | ||
| - run the UI tests. | ||
|
|
||
| For details on plugins development workflow, read [NativeScript plugins documentation](https://docs.nativescript.org/plugins/building-plugins#step-2-set-up-a-development-workflow) covering that topic. | ||
|
|
||
|
|
||
| ## Run UI Tests | ||
|
|
||
| 1. Navigate to `demo/e2e` | ||
| ``` bash | ||
| cd demo/e2e | ||
| ``` | ||
|
|
||
| 2. Make sure to have an emulator set up or connect a physical Android/iOS device. | ||
|
|
||
| 3. Build the app for Android or iOS | ||
| ```bash | ||
| tns build android | ||
| tns build ios | ||
| ``` | ||
| 4. Install [appium](http://appium.io/) globally. | ||
| ``` bash | ||
| npm install -g appium | ||
| ``` | ||
|
|
||
| 5. Follow the instructions in the [nativescript-dev-appium](https://github.com/nativescript/nativescript-dev-appium#custom-appium-capabilities) plugin to add an appium capability for your device inside `appium.capabilities.json`. | ||
|
|
||
| 7. Run the automated tests. The value of the `runType` argument should match the name of the capability that you just added. | ||
| ``` bash | ||
| npm run e2e -- --runType capabilityName | ||
| ``` | ||
|
|
||
| [Read more about UI testing](https://docs.nativescript.org/plugins/ui-tests). |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,25 @@ Imagepicker plugin supporting both single and multiple selection. | |
| <br />Plugin supports **iOS8+** and uses [Photos Framework](https://developer.apple.com/library/prerelease/ios//documentation/Photos/Reference/Photos_Framework/index.html). | ||
| <br />For **Android** it uses Intents to open the stock images or file pickers. For Android 6 (API 23) and above the permissions to read file storage should be explicitly required. See demo for implementation details. | ||
|
|
||
| <!-- TOC depthFrom:2 --> | ||
|
|
||
| - [Installation](#installation) | ||
| - [Configuration](#configuration) | ||
| - [Migrating from 3.x.x to 4.x.x](#migrating-from-3xx-to-4xx) | ||
| - [Usage](#usage) | ||
| - [Import the plugin](#import-the-plugin) | ||
| - [Create imagepicker](#create-imagepicker) | ||
| - [Request permissions, show the images list and process the selection](#request-permissions-show-the-images-list-and-process-the-selection) | ||
| - [API](#api) | ||
| - [Methods](#methods) | ||
| - [Properties](#properties) | ||
| - [Image properties](#image-properties) | ||
| - [Contribute](#contribute) | ||
| - [Get Help](#get-help) | ||
|
|
||
| <!-- /TOC --> | ||
|
|
||
|
|
||
| ## Installation | ||
|
|
||
| In Command prompt / Terminal navigate to your application root folder and run: | ||
|
|
@@ -120,6 +139,11 @@ Once image is picked some options can be applied to it before it is used: | |
| | maxHeight | null | Image max height | | ||
| | aspectRatio | fit | iOS only. Possible values are `fit` and `fill`. [Read more](https://developer.apple.com/documentation/photos/phimagecontentmode) | | ||
|
|
||
| ## License | ||
| ## Contribute | ||
| We love PRs! Check out the [contributing guidelines](CONTRIBUTING.md). If you want to contribute, but you are not sure where to start - look for [issues labeled `help wanted`](https://github.com/NativeScript/nativescript-imagepicker/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22). | ||
|
|
||
| 2015, Telerik AD | ||
|
|
||
| ## Get Help | ||
| Please, use [github issues](https://github.com/NativeScript/nativescript-imagepicker/issues) strictly for [reporting bugs](CONTRIBUTING.md#reporting-bugs) or [requesting features](CONTRIBUTING.md#requesting-new-features). For general questions and support, check out the [NativeScript community forum](https://discourse.nativescript.org/) or ask our experts in [NativeScript community Slack channel](http://developer.telerik.com/wp-login.php?action=slack-invitation). | ||
|
|
||
|  | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what's this?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is some tracking that exists across all main repos. I added it here for completeness, but if nobody is reviewing the stats, probably we can remove it. |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the PR title or the commit messages?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, it's the title and the body of the message. The rules for the commit message are valid for the PR as well. We can think about how to say it better.