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

refactor(lib): Remove experimental Next implementation #918

Merged
merged 3 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,6 @@ class PagerViewViewManager : ViewGroupManager<NestedScrollableHost>(), RNCViewPa
return
}

@ReactProp(name = "useLegacy")
override fun setUseLegacy(view: NestedScrollableHost?, value: Boolean) {
return
}

fun goTo(root: NestedScrollableHost?, selectedPage: Int, scrollWithAnimation: Boolean) {
if (root == null) {
return
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ class PagerViewPackage : ReactPackage {
}

override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> {
return listOf(PagerViewViewManager(), LEGACY_PagerViewViewManager())
return listOf(PagerViewViewManager())
}
}

This file was deleted.

11 changes: 1 addition & 10 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ import {
Button,
Alert,
I18nManager,
DevSettings,
Platform,
DevSettings
} from 'react-native';
import { NavigationContainer, useNavigation } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
Expand All @@ -34,7 +33,6 @@ import CoverflowExample from './tabView/CoverflowExample';
import ReanimatedOnPageScrollExample from './ReanimatedOnPageScrollExample';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import { NextBasicPagerViewExample } from './NextBasicPagerViewExample';
import { PagerHookExample } from './PagerHookExample';

const examples = [
Expand Down Expand Up @@ -69,13 +67,6 @@ const examples = [
{ component: CoverflowExample, name: 'CoverflowExample' },
];

if (Platform.OS === 'ios') {
examples.unshift({
component: NextBasicPagerViewExample,
name: '🔜 Next Basic Example',
});
}

function App() {
const navigation = useNavigation();
return (
Expand Down
70 changes: 0 additions & 70 deletions example/src/NextBasicPagerViewExample.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions example/src/ScrollablePagerViewExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ export function ScrollablePagerViewExample() {
{...navigationPanel}
testID={'pager-view'}
ref={ref}
// todo fix it
useLegacy
style={{ height: HEIGHT }}
>
{navigationPanel.pages.map((page) => (
Expand Down
11 changes: 10 additions & 1 deletion ios/Fabric/RNCPagerViewComponentView.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,19 @@
#import <Foundation/Foundation.h>
#import <React/RCTViewComponentView.h>
#import "UIViewController+CreateExtension.h"
#import "UIView+isHorizontalRtlLayout.h"

NS_ASSUME_NONNULL_BEGIN

@interface RNCPagerViewComponentView : RCTViewComponentView <UIScrollViewDelegate>
@interface RNCPagerViewComponentView : RCTViewComponentView <UIPageViewControllerDataSource, UIPageViewControllerDelegate, UIScrollViewDelegate, RtlLayoutProtocol>

@property(strong, nonatomic, readonly) UIPageViewController *nativePageViewController;
@property(nonatomic, strong) NSMutableArray<UIViewController *> *nativeChildrenViewControllers;
@property(nonatomic) NSInteger initialPage;
@property(nonatomic) NSInteger currentIndex;
@property(nonatomic) NSInteger destinationIndex;
@property(nonatomic) NSString* layoutDirection;
@property(nonatomic) BOOL overdrag;
MrRefactor marked this conversation as resolved.
Show resolved Hide resolved

- (void)setPage:(NSInteger)number;
- (void)setPageWithoutAnimation:(NSInteger)number;
Expand Down
Loading
Loading