Skip to content
This repository has been archived by the owner on Nov 27, 2022. It is now read-only.

Commit

Permalink
chore: master -> main
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Oct 7, 2020
1 parent b75c52e commit 89280e1
Show file tree
Hide file tree
Showing 9 changed files with 76 additions and 25 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ For Syntax Highlighting check this [link](https://help.github.com/en/articles/cr
| software | version
| ---------------------------- | -------
| ios or android |
| expo |
| react-native |
| react-native-tab-view |
| react-native-gesture-handler |
Expand Down
33 changes: 26 additions & 7 deletions .github/workflows/expo-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ jobs:
publish:
name: Install and publish
runs-on: ubuntu-latest
if: github.event.pull_request.head.repo.owner.login == 'react-native-community'
if: github.event.pull_request.head.repo.owner.login == 'satya164'
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v1
Expand All @@ -25,7 +25,7 @@ jobs:

- name: Restore yarn cache
id: yarn-cache
uses: actions/cache@master
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
Expand All @@ -39,14 +39,33 @@ jobs:
- name: Publish Expo app
working-directory: ./example
run: expo publish --release-channel=pr-${{ github.event.number }}
env:
EXPO_USE_DEV_SERVER: true

- name: Get expo link
id: expo
run: echo "::set-output name=path::@satya164/react-native-tab-view-demos?release-channel=pr-${{ github.event.number }}

- name: Comment on PR
uses: unsplash/comment-on-pr@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: actions/github-script@v2
with:
msg: The Expo app for the example from this branch is ready!<br><br>[expo.io/${{ steps.expo.outputs.path }}](https://expo.io/${{ steps.expo.outputs.path }})<br><br><a href="https://exp.host/${{ steps.expo.outputs.path }}"><img src="https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=exp://exp.host/${{ steps.expo.outputs.path }}" height="200px" width="200px"></a>.
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const body = 'The Expo app for the example from this branch is ready!\n\n[expo.io/${{ steps.expo.outputs.path }}](https://expo.io/${{ steps.expo.outputs.path }})\n\n<a href="https://exp.host/${{ steps.expo.outputs.path }}"><img src="https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=exp://exp.host/${{ steps.expo.outputs.path }}" height="200px" width="200px"></a>';
const comments = await github.issues.listComments({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
});
if (comments.data.some(comment => comment.body === body)) {
return;
}
github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body
})
4 changes: 2 additions & 2 deletions .github/workflows/expo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Expo Publish
on:
push:
branches:
- master
- main

jobs:
publish:
Expand All @@ -27,7 +27,7 @@ jobs:

- name: Restore yarn cache
id: yarn-cache
uses: actions/cache@master
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
Expand Down
34 changes: 31 additions & 3 deletions .github/workflows/triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ jobs:
runs-on: ubuntu-latest
if: github.event.label.name == 'needs more info'
steps:
- uses: actions/checkout@v2
- uses: actions/github-script@v2
with:
github-token: ${{secrets.GITHUB_TOKEN}}
Expand All @@ -24,7 +23,6 @@ jobs:
runs-on: ubuntu-latest
if: github.event.label.name == 'needs repro'
steps:
- uses: actions/checkout@v2
- uses: actions/github-script@v2
with:
github-token: ${{secrets.GITHUB_TOKEN}}
Expand All @@ -33,5 +31,35 @@ jobs:
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: "Hey! Thanks for opening the issue. Can you provide a [minimal repro](https://stackoverflow.com/help/minimal-reproducible-example) which demonstrates the issue? Posting a snippet of your code in the issue is useful, but it's not usually straightforward to run. A repro will help us debug the issue faster. Please try to keep the repro as small as possible.\n\nThe easiest way to provide a repro is on [snack.expo.io](https://snack.expo.io). If it's not possible to repro it on [snack.expo.io](https://snack.expo.io), then you can also provide the repro in a GitHub repository."
body: "Hey! Thanks for opening the issue. Can you provide a [minimal repro](https://stackoverflow.com/help/minimal-reproducible-example) which demonstrates the issue? Posting a snippet of your code in the issue is useful, but it's not usually straightforward to run. A repro will help us debug the issue faster. Please try to keep the repro as small as possible.\n\nThe easiest way to provide a repro is on [snack.expo.io](https://snack.expo.io). If it's not possible to repro it on [snack.expo.io](https://snack.expo.io), then please provide the repro in a GitHub repository."
})
react-native-reanimated:
runs-on: ubuntu-latest
if: github.event.label.name == 'library:react-native-reanimated'
steps:
- uses: actions/github-script@v2
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: "Hey! Thanks for opening the issue. The issue tracker is intended for only tracking bug reports in React Navigation. Seems you have an issue related to `react-native-reanimated` library. Please post your issue in [this repo](https://github.com/software-mansion/react-native-reanimated) so that it's notified to the maintainers of that library."
})
react-native-gesture-handler:
runs-on: ubuntu-latest
if: github.event.label.name == 'library:react-native-gesture-handler'
steps:
- uses: actions/github-script@v2
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: "Hey! Thanks for opening the issue. The issue tracker is intended for only tracking bug reports in React Navigation. Seems you have an issue related to `react-native-gesture-handler` library. Please post your issue in [this repo](https://github.com/software-mansion/react-native-gesture-handler) so that it's notified to the maintainers of that library."
})
3 changes: 3 additions & 0 deletions .github/workflows/versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
required-packages: |
react-native
react-native-tab-view
react-native-gesture-handler
react-native-reanimated
optional-packages: |
expo
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
A cross-platform Tab View component for React Native.

- [Run the example app to see it in action](https://expo.io/@satya164/react-native-tab-view-demos).
- Checkout the [example/](https://github.com/react-native-community/react-native-tab-view/tree/master/example) folder for source code.
- Checkout the [example/](https://github.com/satya164/react-native-tab-view/tree/main/example) folder for source code.

## Features

Expand All @@ -20,7 +20,7 @@ A cross-platform Tab View component for React Native.

## Demo

<a href="https://raw.githubusercontent.com/satya164/react-native-tab-view/master/demo/demo.mp4"><img src="https://raw.githubusercontent.com/satya164/react-native-tab-view/master/demo/demo.gif" width="360"></a>
<a href="https://raw.githubusercontent.com/satya164/react-native-tab-view/main/demo/demo.mp4"><img src="https://raw.githubusercontent.com/satya164/react-native-tab-view/main/demo/demo.gif" width="360"></a>

## Installation

Expand Down Expand Up @@ -50,7 +50,7 @@ Next, we need to link these libraries. The steps depends on your React Native ve

- **React Native 0.60 and higher**

On newer versions of React Native, [linking is automatic](https://github.com/react-native-community/cli/blob/master/docs/autolinking.md).
On newer versions of React Native, [linking is automatic](https://github.com/react-native-community/cli/blob/main/docs/autolinking.md).

To complete the linking on iOS, make sure you have [Cocoapods](https://cocoapods.org/) installed. Then run:

Expand Down Expand Up @@ -297,7 +297,7 @@ import { TabView, ScrollPager } from 'react-native-tab-view';
```

Also, you can use `ViewPager`-based pager with [`React Native Tab View ViewPager Adapter
`](https://github.com/software-mansion/react-native-tab-view-viewpager-adapter).
`](https://github.com/software-mansion/react-native-tab-view-viewpager-adapter).

```js
import { TabView } from 'react-native-tab-view';
Expand Down Expand Up @@ -621,7 +621,7 @@ Custom pager which can we used inside `renderPager` prop. It is based on ScrollV
It accepts the same set of props as default pager extended with one addition:

##### ovescroll
When `true`, the scroll view bounces when it reaches the end of the content. The default value is `false`.
When `true`, the scroll view bounces when it reaches the end of the content. The default value is `false`.


## Using with other libraries
Expand All @@ -630,7 +630,7 @@ When `true`, the scroll view bounces when it reaches the end of the content. The

If you want to integrate the tab view with React Navigation's navigation system, e.g. want to be able to navigate to a tab using `navigation.navigate` etc, you can use the following official integrations:

- [@react-navigation/material-top-tabs](https://github.com/react-navigation/navigation-ex/tree/master/packages/material-top-tabs) for React Navigation 5
- [@react-navigation/material-top-tabs](https://github.com/react-navigation/react-navigation/tree/main/packages/material-top-tabs) for React Navigation 5
- [react-navigation-tabs](https://github.com/react-navigation/react-navigation-tabs) for React Navigation 4

Note that some functionalities are not available with the React Navigation 4 integration because of the limitations in React Navigation. For example, it's possible to dynamically change the rendered tabs.
Expand Down Expand Up @@ -816,8 +816,8 @@ Remember to add tests for your change if possible.

<!-- badges -->

[build-badge]: https://img.shields.io/circleci/project/github/react-native-community/react-native-tab-view/master.svg?style=flat-square
[build]: https://circleci.com/gh/react-native-community/react-native-tab-view
[build-badge]: https://img.shields.io/circleci/project/github/satya164/react-native-tab-view/main.svg?style=flat-square
[build]: https://circleci.com/gh/satya164/react-native-tab-view
[version-badge]: https://img.shields.io/npm/v/react-native-tab-view.svg?style=flat-square
[package]: https://www.npmjs.com/package/react-native-tab-view
[license-badge]: https://img.shields.io/npm/l/react-native-tab-view.svg?style=flat-square
Expand Down
2 changes: 1 addition & 1 deletion example/app.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"expo": {
"name": "React Native Tab View Demos",
"description": "Demonstrates the various capabilities of react-native-tab-view: https://github.com/react-native-community/react-native-tab-view",
"description": "Demonstrates the various capabilities of react-native-tab-view: https://github.com/satya164/react-native-tab-view",
"slug": "react-native-tab-view-demos",
"privacy": "public",
"version": "1.0.0",
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@
],
"repository": {
"type": "git",
"url": "git+https://github.com/react-native-community/react-native-tab-view.git"
"url": "git+https://github.com/satya164/react-native-tab-view.git"
},
"author": "Satyajit Sahoo <[email protected]> (https://github.com/satya164/)",
"license": "MIT",
"bugs": {
"url": "https://github.com/react-native-community/react-native-tab-view/issues"
"url": "https://github.com/satya164/react-native-tab-view/issues"
},
"homepage": "https://github.com/react-native-community/react-native-tab-view#readme",
"homepage": "https://github.com/satya164/react-native-tab-view#readme",
"devDependencies": {
"@commitlint/config-conventional": "^9.1.1",
"@expo/vector-icons": "^10.2.0",
Expand Down
2 changes: 1 addition & 1 deletion src/TabBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ export default class TabBar<T extends Route> extends React.Component<

// If we don't delay this state update, the UI gets stuck in weird state
// Maybe an issue in Reanimated?
// https://github.com/react-native-community/react-native-tab-view/issues/877
// https://github.com/satya164/react-native-tab-view/issues/877
// Cancel any pending callbacks, since we're scheduling a new one
this.cancelNextFrameCb?.();
this.cancelNextFrameCb = scheduleInNextFrame(() =>
Expand Down

0 comments on commit 89280e1

Please sign in to comment.