Skip to content

Removing forked changes that were made to support win32 #216

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

Merged
merged 3 commits into from
Jan 7, 2020
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
12 changes: 0 additions & 12 deletions Libraries/Components/TextInput/TextInputState.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@ function focusTextInput(textFieldID: ?number) {
.focusTextInput,
null,
);
} else if (Platform.OS === 'win32') {
UIManager.dispatchViewManagerCommand(
textFieldID,
UIManager.RCTView.Commands.focus,
null,
);
}
}
}
Expand All @@ -79,12 +73,6 @@ function blurTextInput(textFieldID: ?number) {
.blurTextInput,
null,
);
} else if (Platform.OS === 'win32') {
UIManager.dispatchViewManagerCommand(
textFieldID,
UIManager.RCTView.Commands.blur,
null,
);
}
}
}
Expand Down
6 changes: 1 addition & 5 deletions Libraries/StyleSheet/StyleSheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
const PixelRatio = require('../Utilities/PixelRatio');
const ReactNativeStyleAttributes = require('../Components/View/ReactNativeStyleAttributes');
const StyleSheetValidation = require('./StyleSheetValidation');
const Platform = require('../Utilities/Platform'); // TODO(macOS ISS#2323203)

const flatten = require('./flattenStyle');

Expand Down Expand Up @@ -152,10 +151,7 @@ export type ImageStyle = ____ImageStyle_Internal;
*/
export type DangerouslyImpreciseStyle = ____DangerouslyImpreciseStyle_Internal;

let hairlineWidth =
Platform.OS === 'win32' || Platform.OS === 'windesktop'
? 0.5
: PixelRatio.roundToNearestPixel(0.4); // TODO(windows ISS)
let hairlineWidth = PixelRatio.roundToNearestPixel(0.4);
if (hairlineWidth === 0) {
hairlineWidth = 1 / PixelRatio.get();
}
Expand Down
16 changes: 6 additions & 10 deletions Libraries/YellowBox/UI/YellowBoxList.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const YellowBoxButton = require('./YellowBoxButton');
const YellowBoxInspector = require('./YellowBoxInspector');
const YellowBoxListRow = require('./YellowBoxListRow');
const YellowBoxStyle = require('./YellowBoxStyle');
const Platform = require('../../Utilities/Platform'); // TODO(windows ISS)

import type {Category} from '../Data/YellowBoxCategory';
import type {Registry} from '../Data/YellowBoxRegistry';
Expand All @@ -36,13 +35,10 @@ type State = {|
|};

const VIEWPORT_RATIO = 0.5;
const MAX_ITEMS =
Platform.OS === 'win32' || Platform.OS === 'windesktop'
? 3
: Math.floor(
(Dimensions.get('window').height * VIEWPORT_RATIO) /
(YellowBoxListRow.GUTTER + YellowBoxListRow.HEIGHT),
); // TODO(windows ISS)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prettier/prettier: Delete ······

const MAX_ITEMS = Math.floor(
(Dimensions.get('window').height * VIEWPORT_RATIO) /
(YellowBoxListRow.GUTTER + YellowBoxListRow.HEIGHT),
);

class YellowBoxList extends React.Component<Props, State> {
state = {
Expand Down Expand Up @@ -73,7 +69,7 @@ class YellowBoxList extends React.Component<Props, State> {
}

const listStyle = {
width: Platform.OS === 'win32' ? '85%' : undefined, // TODO(windows ISS)
width: undefined,
height:
// Additional `0.5` so the (N + 1)th row can peek into view.
Math.min(items.length, MAX_ITEMS + 0.5) *
Expand Down Expand Up @@ -130,7 +126,7 @@ const styles = StyleSheet.create({
width: '100%',
},
dismissAll: {
bottom: Platform.OS === 'win32' ? 0 : '100%', // TODO(windows ISS)
bottom: '100%',
flexDirection: 'row',
justifyContent: 'flex-end',
paddingBottom: 4,
Expand Down
2 changes: 1 addition & 1 deletion metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ if (
},
resolver: {
hasteImplModulePath: require.resolve('./jest/hasteImpl'),
platforms: ['win32', 'ios', 'macos', 'android'],
platforms: ['ios', 'macos', 'android'],
},
transformer: {
assetRegistryPath: require.resolve('./Libraries/Image/AssetRegistry'),
Expand Down