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

Diff between wp-fork branch and main repo's default branch #7

Draft
wants to merge 43 commits into
base: trunk
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
e20f268
Configure JitPack
lukewalczak Nov 27, 2019
1ac7533
Maven repo is in node_modules when building as an npm dep
hypest Dec 20, 2019
f5d8685
Merge pull request #1 from wordpress-mobile/fix/local-maven-repo-when…
hypest Dec 20, 2019
5ad284d
Move podspec to root level
lukewalczak Jan 28, 2020
fd780e0
Merge branch 'master' of https://github.com/react-native-community/re…
lukewalczak Jul 22, 2020
f7738fb
Add touchToSeek property for iOS
lukewalczak Jul 22, 2020
287d288
Merge branch 'master' of https://github.com/react-native-community/re…
lukewalczak Jul 22, 2020
fff842d
Merge pull request #2 from wordpress-mobile/feat/update-to-the-latest…
lukewalczak Jul 22, 2020
29c0e31
Merge branch 'feat/jitpack' into feat/touch-to-seek
lukewalczak Jul 22, 2020
d263ff1
Merge pull request #3 from wordpress-mobile/feat/touch-to-seek
lukewalczak Jul 22, 2020
b8e9c50
Bintray is no more, use our S3 mirror
hypest Jun 9, 2021
3ef5fc6
Bump RN binary to 0.64.0
hypest Jun 9, 2021
cd28985
Merge pull request #6 from wordpress-mobile/feat/jitpack-rn-0.64.0
ceyhun Jun 21, 2021
c1accf5
Point podspec source to fork repo
ceyhun Jun 21, 2021
af01fce
Add -wp to version number
ceyhun Jun 21, 2021
91b4b1e
Upgrade Gradle to 7.1.1
oguzkocer Aug 10, 2021
60a3162
Upgrade default AGP to 4.2.2
oguzkocer Aug 10, 2021
692a73c
Adds maven-publish plugin
oguzkocer Aug 10, 2021
0554e9d
Remove version property requirement from maven-publish block
oguzkocer Aug 10, 2021
b194e67
Move AGP declaration to settings.gradle.kts
oguzkocer Aug 10, 2021
ef8d620
Re-order android repositories
oguzkocer Aug 10, 2021
159fe48
Merge pull request #8 from wordpress-mobile/upgrade-to-gradle-7.1.1
oguzkocer Aug 16, 2021
f58f3d7
Use correct version number in package.json
ceyhun Sep 16, 2021
0cdfd04
Add tarball file
ceyhun Sep 16, 2021
75602bf
Use top-level package.json when packing to achieve desired folder str…
ceyhun Sep 17, 2021
851dbc7
Merge pull request #9 from wordpress-mobile/try/tarball
fluiddot Sep 24, 2021
f39787e
Update to RN 0.66.2
dcalhoun Nov 22, 2021
bf25627
Bump version
dcalhoun Nov 23, 2021
23518df
Generate new tarball
dcalhoun Nov 23, 2021
acbe626
Merge pull request #10 from wordpress-mobile/chore/upgrade-to-react-n…
dcalhoun Nov 30, 2021
853bcd3
Upgrade compile and target sdk version to API 31
fluiddot Oct 4, 2022
cb5ac44
Bump detox version due to xcode incompatibility
fluiddot Oct 4, 2022
3d2d6a1
Bump version to wp-3
fluiddot Oct 4, 2022
9a0a1b4
Merge pull request #12 from wordpress-mobile/update/android-12
fluiddot Oct 13, 2022
f38202c
Upgrade compile and target sdk version to API 33
fluiddot May 18, 2023
8fd68ac
Upgrade minimum sdk version to API 24
fluiddot May 18, 2023
c592bed
Bump version to wp-4
fluiddot May 18, 2023
ab70825
Merge pull request #13 from wordpress-mobile/update/android-13
fluiddot May 22, 2023
6049002
Update package version in `src`
fluiddot May 29, 2023
ebb8213
Merge pull request #14 from wordpress-mobile/update-src-package-versi…
fluiddot May 30, 2023
4d960f5
Upgrade compile and target sdk version to API 34
fluiddot Jan 17, 2024
c43e89b
Bump version to wp-5
fluiddot Jan 17, 2024
b88579e
Merge pull request #15 from wordpress-mobile/update/android-14
May 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions jitpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
install:
- cd src/android && ./gradlew publishToMavenLocal
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"main": "src/js/Slider.js",
"name": "@react-native-community/slider",
"version": "3.0.2-wp-5",
"private": true,
"workspaces": ["src", "example"],
"scripts": {
Expand Down
Binary file added react-native-community-slider-3.0.2-wp-5.tgz
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'json'

package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
package = JSON.parse(File.read(File.join(__dir__, 'src/package.json')))

Pod::Spec.new do |s|
s.name = "react-native-slider"
Expand All @@ -12,8 +12,8 @@ Pod::Spec.new do |s|
s.homepage = package['homepage']
s.platform = :ios, "9.0"

s.source = { :git => "https://github.com/react-native-community/react-native-slider.git", :tag => "v#{s.version}" }
s.source_files = "ios/**/*.{h,m}"
s.source = { :git => "https://github.com/wordpress-mobile/react-native-slider.git", :tag => "v#{s.version}" }
s.source_files = "src/ios/**/*.{h,m}"

s.dependency 'React'
end
70 changes: 39 additions & 31 deletions src/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,41 +1,49 @@
buildscript {
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}
}

def getExtOrDefault(name) {
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['ReactNativeSlider_' + name]
}

def getExtOrIntegerDefault(name) {
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties['ReactNativeSlider_' + name]).toInteger()
plugins {
id "com.android.library"
id "maven-publish"
}

apply plugin: 'com.android.library'

android {
compileSdkVersion getExtOrIntegerDefault('compileSdkVersion')
buildToolsVersion getExtOrDefault('buildToolsVersion')
compileSdkVersion 34

defaultConfig {
minSdkVersion getExtOrIntegerDefault('minSdkVersion')
targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
}
defaultConfig {
minSdkVersion 24
targetSdkVersion 34
}
}

repositories {
google()
jcenter()
mavenCentral()
if (project == rootProject) {
maven { url "https://a8c-libs.s3.amazonaws.com/android/react-native-mirror" }
} else {
// When building as a dep, the RN's maven repo is locally in the node_modules folder
def nodeModulesPath = "${project.buildDir}/../../node_modules/"
maven { url "${nodeModulesPath}/react-native/android" }
}

google()
jcenter()
mavenCentral()
}

dependencies {
//noinspection GradleDynamicVersion
api 'com.facebook.react:react-native:+'
}
if (project == rootProject) {
// If this is the root project (e.g. Jitpack), specify a version
implementation 'com.facebook.react:react-native:0.66.2'
} else {
//noinspection GradleDynamicVersion
api "com.facebook.react:react-native:+"
}
}

afterEvaluate {
publishing {
publications {
release(MavenPublication) {
from components.release
groupId = 'com.github.wordpress-mobile'
artifactId = 'react-native-slider'
}
}
}
}
11 changes: 7 additions & 4 deletions src/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
ReactNativeSlider_compileSdkVersion=28
ReactNativeSlider_buildToolsVersion=28.0.3
ReactNativeSlider_targetSdkVersion=27
ReactNativeSlider_minSdkVersion=16
org.gradle.jvmargs=-Xmx1536m -XX:+HeapDumpOnOutOfMemoryError
org.gradle.parallel=true
org.gradle.configureondemand=true
org.gradle.caching=true

android.useAndroidX=true
android.enableJetifier=true
Binary file modified src/android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions src/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Sat Feb 09 14:36:05 CET 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
Empty file modified src/android/gradlew
100644 → 100755
Empty file.
9 changes: 9 additions & 0 deletions src/android/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
pluginManagement {
plugins {
id("com.android.library") version "4.2.2"
}
repositories {
gradlePluginPortal()
google()
}
}
2 changes: 2 additions & 0 deletions src/ios/RNCSlider.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,6 @@
@property (nonatomic, strong) NSString *accessibilityUnits;
@property (nonatomic, strong) NSArray *accessibilityIncrements;

@property (nonatomic, assign) BOOL *touchToSeek;

@end
16 changes: 11 additions & 5 deletions src/ios/RNCSlider.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@ - (instancetype)initWithFrame:(CGRect)frame
return self;
}

- (void)tapHandler:(UITapGestureRecognizer *)gesture {
CGPoint touchPoint = [gesture locationInView:self];
float rangeWidth = self.maximumValue - self.minimumValue;
float sliderPercent = touchPoint.x / self.bounds.size.width;
[self setValue:self.minimumValue + (rangeWidth * sliderPercent) animated: YES];
- (void)tapHandler:(UITapGestureRecognizer *)gesture
{
if (self.touchToSeek) {
CGPoint touchPoint = [gesture locationInView:self];
float rangeWidth = self.maximumValue - self.minimumValue;
float sliderPercent = touchPoint.x / self.bounds.size.width;
[self setValue:self.minimumValue + (rangeWidth * sliderPercent) animated: YES];
}
}

- (void)setValue:(float)value
Expand Down Expand Up @@ -138,7 +141,10 @@ - (void)setInverted:(BOOL)inverted

- (BOOL)beginTrackingWithTouch:(UITouch *)touch withEvent:(UIEvent *)event
{
if (self.touchToSeek) {
return YES;
}
return [super beginTrackingWithTouch:touch withEvent:event];
}

@end
1 change: 1 addition & 0 deletions src/js/RNCSliderNativeComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ type NativeProps = $ReadOnly<{|
thumbTintColor?: ?ColorValue,
trackImage?: ?ImageSource,
value?: ?number,
touchToSeek?: ?boolean,
|}>;

type RNCSliderType = Class<NativeComponent<NativeProps>>;
Expand Down
7 changes: 7 additions & 0 deletions src/js/Slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,12 @@ type Props = $ReadOnly<{|
* The number of elements must be the same as `maximumValue`.
*/
accessibilityIncrements?: Array<string>,

/**
* Specifies whether touch/tap to seek functionality should be enabled.
* Default value for iOS is false, for Android and web is true.
*/
touchToSeek?: ?boolean,
|}>;

/**
Expand Down Expand Up @@ -299,6 +305,7 @@ SliderWithRef.defaultProps = {
maximumValue: 1,
step: 0,
inverted: false,
touchToSeek: Platform.OS === 'android',
};

let styles;
Expand Down
6 changes: 3 additions & 3 deletions src/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "@react-native-community/slider",
"version": "3.0.2",
"version": "3.0.2-wp-4",
"license": "MIT",
"author": "react-native-community",
"homepage": "https://github.com/react-native-community/react-native-slider",
"description": "React Native component used to select a single value from a range of values.",
"publishConfig": {
"access": "public"
},
"main": "dist/Slider.js",
"main": "js/Slider.js",
"types": "typings/index.d.ts",
"keywords": [
"react-native",
Expand All @@ -30,7 +30,7 @@
"@react-native-community/eslint-config": "0.0.5",
"babel-jest": "^24.9.0",
"babel-plugin-module-resolver": "3.1.3",
"detox": "12.4.1",
"detox": "16.0.0",
"eslint": "^6.5.1",
"flow-bin": "0.105.2",
"jest": "^24.9.0",
Expand Down
7 changes: 7 additions & 0 deletions src/typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,13 @@ export interface SliderProps extends SliderPropsIOS, SliderPropsAndroid {
* Reference object.
*/
ref?: React.MutableRefObject<SliderRef>;

/**
* Specifies whether touch/tap to seek functionality should be enabled.
* Default value for iOS is false, for Android and web is true.
*/
touchToSeek?: boolean;

}

/**
Expand Down
Loading