Skip to content

Commit

Permalink
[Web] Disable virtualization for now
Browse files Browse the repository at this point in the history
  • Loading branch information
brunolemos committed May 4, 2019
1 parent 26ffec2 commit 52645c9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion packages/components/src/components/cards/EventCards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import useKeyPressCallback from '../../hooks/use-key-press-callback'
import { useKeyboardScrolling } from '../../hooks/use-keyboard-scrolling'
import { useReduxAction } from '../../hooks/use-redux-action'
import { bugsnag, ErrorBoundary } from '../../libs/bugsnag'
import { Platform } from '../../libs/platform'
import * as actions from '../../redux/actions'
import { Button } from '../common/Button'
import { fabSize } from '../common/FAB'
Expand Down Expand Up @@ -332,6 +333,7 @@ export const EventCards = React.memo((props: EventCardsProps) => {
bounces
contentContainerStyle={contentContainerStyle}
data={items}
disableVirtualization={Platform.OS === 'web'}
extraData={rerender}
initialNumToRender={15}
keyExtractor={keyExtractor}
Expand All @@ -340,7 +342,7 @@ export const EventCards = React.memo((props: EventCardsProps) => {
onViewableItemsChanged={handleViewableItemsChanged}
pointerEvents={pointerEvents}
refreshControl={refreshControl}
removeClippedSubviews
removeClippedSubviews={Platform.OS !== 'web'}
renderItem={renderItem}
viewabilityConfig={viewabilityConfig}
windowSize={2}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import useKeyPressCallback from '../../hooks/use-key-press-callback'
import { useKeyboardScrolling } from '../../hooks/use-keyboard-scrolling'
import { useReduxAction } from '../../hooks/use-redux-action'
import { bugsnag, ErrorBoundary } from '../../libs/bugsnag'
import { Platform } from '../../libs/platform'
import * as actions from '../../redux/actions'
import { Button } from '../common/Button'
import { fabSize } from '../common/FAB'
Expand Down Expand Up @@ -348,6 +349,7 @@ export const IssueOrPullRequestCards = React.memo(
bounces
contentContainerStyle={contentContainerStyle}
data={items}
disableVirtualization={Platform.OS === 'web'}
extraData={rerender}
initialNumToRender={15}
keyExtractor={keyExtractor}
Expand All @@ -356,7 +358,7 @@ export const IssueOrPullRequestCards = React.memo(
onViewableItemsChanged={handleViewableItemsChanged}
pointerEvents={pointerEvents}
refreshControl={refreshControl}
removeClippedSubviews
removeClippedSubviews={Platform.OS !== 'web'}
renderItem={renderItem}
viewabilityConfig={viewabilityConfig}
windowSize={2}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import useKeyPressCallback from '../../hooks/use-key-press-callback'
import { useKeyboardScrolling } from '../../hooks/use-keyboard-scrolling'
import { useReduxAction } from '../../hooks/use-redux-action'
import { bugsnag, ErrorBoundary } from '../../libs/bugsnag'
import { Platform } from '../../libs/platform'
import * as actions from '../../redux/actions'
import { Button } from '../common/Button'
import { fabSize } from '../common/FAB'
Expand Down Expand Up @@ -334,6 +335,7 @@ export const NotificationCards = React.memo((props: NotificationCardsProps) => {
bounces
contentContainerStyle={contentContainerStyle}
data={items}
disableVirtualization={Platform.OS === 'web'}
extraData={rerender}
initialNumToRender={15}
keyExtractor={keyExtractor}
Expand All @@ -342,7 +344,7 @@ export const NotificationCards = React.memo((props: NotificationCardsProps) => {
onViewableItemsChanged={handleViewableItemsChanged}
pointerEvents={pointerEvents}
refreshControl={refreshControl}
removeClippedSubviews
removeClippedSubviews={Platform.OS !== 'web'}
renderItem={renderItem}
viewabilityConfig={viewabilityConfig}
windowSize={2}
Expand Down
4 changes: 3 additions & 1 deletion packages/components/src/components/columns/Columns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { ColumnContainer } from '../../containers/ColumnContainer'
import { useEmitter } from '../../hooks/use-emitter'
import { useReduxState } from '../../hooks/use-redux-state'
import { bugsnag } from '../../libs/bugsnag'
import { Platform } from '../../libs/platform'
import * as selectors from '../../redux/selectors'
import { separatorThickSize } from '../common/Separator'
import { useFocusedColumn } from '../context/ColumnFocusContext'
Expand Down Expand Up @@ -187,6 +188,7 @@ export const Columns = React.memo((props: ColumnsProps) => {
className="pagingEnabledFix"
bounces={!swipeable}
data={columnIds}
disableVirtualization={Platform.OS === 'web'}
getItemLayout={getItemLayout}
horizontal
initialNumToRender={4}
Expand All @@ -196,7 +198,7 @@ export const Columns = React.memo((props: ColumnsProps) => {
// onViewableItemsChanged={onViewableItemsChanged}
pagingEnabled={pagingEnabled}
pointerEvents={pointerEvents}
removeClippedSubviews
removeClippedSubviews={Platform.OS !== 'web'}
scrollEnabled={!swipeable}
windowSize={2}
{...otherProps}
Expand Down

0 comments on commit 52645c9

Please sign in to comment.