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

Shouldn't 'ListView' be 'TableView' #143

Closed
nathanborror opened this Issue Mar 11, 2015 · 4 comments

Comments

Projects
None yet
5 participants
@nathanborror

nathanborror commented Mar 11, 2015

Why not use more conventional names iOS developers will be familiar with?

@vjeux

This comment has been minimized.

Show comment
Hide comment
@vjeux

vjeux Mar 12, 2015

Contributor

We thought about it (the first version was called TableView) but there's a couple of downsides:

  • It doesn't have the same api, and works best with immutable data structures, so it would confuse iOS engineers.
  • TableView is an horrible name since it's not a table but a list. Web developers would be confused. The equivalent on android is also called ListView
  • The implementation doesn't actually uses TableView but a scrollview behind the scenes.
  • It only implements out of view cell management, but doesn't have TableView features such as swipe to delete, reordering... We may want to have a component that wraps TableView more closely and have those features and call it TableViewIOS.

We're not 100% api with the component api and it'll likely receive more love in the future. Not set in stone yet

Contributor

vjeux commented Mar 12, 2015

We thought about it (the first version was called TableView) but there's a couple of downsides:

  • It doesn't have the same api, and works best with immutable data structures, so it would confuse iOS engineers.
  • TableView is an horrible name since it's not a table but a list. Web developers would be confused. The equivalent on android is also called ListView
  • The implementation doesn't actually uses TableView but a scrollview behind the scenes.
  • It only implements out of view cell management, but doesn't have TableView features such as swipe to delete, reordering... We may want to have a component that wraps TableView more closely and have those features and call it TableViewIOS.

We're not 100% api with the component api and it'll likely receive more love in the future. Not set in stone yet

@jaygarcia

This comment has been minimized.

Show comment
Hide comment
@jaygarcia

jaygarcia Mar 12, 2015

Contributor

Something to consider: swipe to reveal/delete/etc are features that people will want eventually.

I guess the key is to have a "good" release but not try to solve for every UI pattern out of the gate.

JG

301.785.6030 :: @moduscreate

:: sent from my mobile device ::

On Mar 11, 2015, at 20:07, Christopher Chedeau notifications@github.com wrote:

We thought about it (the first version was called TableView) but there's a couple of downsides:

It doesn't have the same api, and works best with immutable data structures, so it would confuse iOS engineers.
TableView is an horrible name since it's not a table but a list. Web developers would be confused. The equivalent on android is also called ListView
The implementation doesn't actually uses TableView but a scrollview behind the scenes.
It only implements out of view cell management, but doesn't have TableView features such as swipe to delete, reordering... We may want to have a component that wraps TableView more closely and have those features and call it TableViewIOS.
We're not 100% api with the component api and it'll likely receive more love in the future. Not set in stone yet


Reply to this email directly or view it on GitHub.

Contributor

jaygarcia commented Mar 12, 2015

Something to consider: swipe to reveal/delete/etc are features that people will want eventually.

I guess the key is to have a "good" release but not try to solve for every UI pattern out of the gate.

JG

301.785.6030 :: @moduscreate

:: sent from my mobile device ::

On Mar 11, 2015, at 20:07, Christopher Chedeau notifications@github.com wrote:

We thought about it (the first version was called TableView) but there's a couple of downsides:

It doesn't have the same api, and works best with immutable data structures, so it would confuse iOS engineers.
TableView is an horrible name since it's not a table but a list. Web developers would be confused. The equivalent on android is also called ListView
The implementation doesn't actually uses TableView but a scrollview behind the scenes.
It only implements out of view cell management, but doesn't have TableView features such as swipe to delete, reordering... We may want to have a component that wraps TableView more closely and have those features and call it TableViewIOS.
We're not 100% api with the component api and it'll likely receive more love in the future. Not set in stone yet


Reply to this email directly or view it on GitHub.

@nathanborror

This comment has been minimized.

Show comment
Hide comment
@nathanborror

nathanborror Mar 12, 2015

Makes sense.

nathanborror commented Mar 12, 2015

Makes sense.

@benjamingr

This comment has been minimized.

Show comment
Hide comment
@benjamingr

benjamingr Mar 26, 2015

but doesn't have TableView features such as swipe to delete, reordering... We may want to have a component that wraps TableView more closely and have those features and call it TableViewIOS.

Are there any plans for such a component?

benjamingr commented Mar 26, 2015

but doesn't have TableView features such as swipe to delete, reordering... We may want to have a component that wraps TableView more closely and have those features and call it TableViewIOS.

Are there any plans for such a component?

rozele added a commit to rozele/react-native that referenced this issue Apr 11, 2016

Towards facebook#143 - Replaces ListView with ScrollViewer for ReactS…
…crollViewManager

There's still work to be done around momentum events, horizontal scroll, etc., but this should provide a solid base.

rozele added a commit to rozele/react-native that referenced this issue Apr 11, 2016

fix(RCTScrollView): Fix vertical scrolling behavior for RCTScrollView
There is an issue with scroll view where the container view was being collapsed by the optimizer. Ensure the 'collapsable' property is picked up.

Fixes facebook#143

rozele added a commit to rozele/react-native that referenced this issue Apr 21, 2016

Towards facebook#143 - Replaces ListView with ScrollViewer for ReactS…
…crollViewManager

There's still work to be done around momentum events, horizontal scroll, etc., but this should provide a solid base.

rozele added a commit to rozele/react-native that referenced this issue Apr 21, 2016

fix(RCTScrollView): Fix vertical scrolling behavior for RCTScrollView
There is an issue with scroll view where the container view was being collapsed by the optimizer. Ensure the 'collapsable' property is picked up.

Fixes facebook#143

rozele added a commit to rozele/react-native that referenced this issue May 17, 2016

Towards facebook#143 - Replaces ListView with ScrollViewer for ReactS…
…crollViewManager

There's still work to be done around momentum events, horizontal scroll, etc., but this should provide a solid base.

rozele added a commit to rozele/react-native that referenced this issue May 17, 2016

fix(RCTScrollView): Fix vertical scrolling behavior for RCTScrollView
There is an issue with scroll view where the container view was being collapsed by the optimizer. Ensure the 'collapsable' property is picked up.

Fixes facebook#143

rozele added a commit to rozele/react-native that referenced this issue May 25, 2016

Towards facebook#143 - Replaces ListView with ScrollViewer for ReactS…
…crollViewManager

There's still work to be done around momentum events, horizontal scroll, etc., but this should provide a solid base.

rozele added a commit to rozele/react-native that referenced this issue May 25, 2016

fix(RCTScrollView): Fix vertical scrolling behavior for RCTScrollView
There is an issue with scroll view where the container view was being collapsed by the optimizer. Ensure the 'collapsable' property is picked up.

Fixes facebook#143

rozele added a commit to rozele/react-native that referenced this issue May 25, 2016

Towards facebook#143 - Replaces ListView with ScrollViewer for ReactS…
…crollViewManager

There's still work to be done around momentum events, horizontal scroll, etc., but this should provide a solid base.

rozele added a commit to rozele/react-native that referenced this issue May 25, 2016

fix(RCTScrollView): Fix vertical scrolling behavior for RCTScrollView
There is an issue with scroll view where the container view was being collapsed by the optimizer. Ensure the 'collapsable' property is picked up.

Fixes facebook#143

rozele added a commit to rozele/react-native that referenced this issue May 25, 2016

Towards facebook#143 - Replaces ListView with ScrollViewer for ReactS…
…crollViewManager

There's still work to be done around momentum events, horizontal scroll, etc., but this should provide a solid base.

rozele added a commit to rozele/react-native that referenced this issue May 25, 2016

fix(RCTScrollView): Fix vertical scrolling behavior for RCTScrollView
There is an issue with scroll view where the container view was being collapsed by the optimizer. Ensure the 'collapsable' property is picked up.

Fixes facebook#143

rozele added a commit to rozele/react-native that referenced this issue May 25, 2016

Towards facebook#143 - Replaces ListView with ScrollViewer for ReactS…
…crollViewManager

There's still work to be done around momentum events, horizontal scroll, etc., but this should provide a solid base.

rozele added a commit to rozele/react-native that referenced this issue May 25, 2016

fix(RCTScrollView): Fix vertical scrolling behavior for RCTScrollView
There is an issue with scroll view where the container view was being collapsed by the optimizer. Ensure the 'collapsable' property is picked up.

Fixes facebook#143

jasongrishkoff referenced this issue Feb 24, 2017

Better ListView - FlatList
Summary:
We really need a better list view - so here it is!

Main changes from existing `ListView`:

* Items are "virtualized" to limit memory - that is, items outside of the render window are unmounted and their memory is reclaimed. This means that instance state is not preserved when items scroll out of the render window.
* No `DataSource` - just a simple `data` prop of shape `Array<any>`. By default, they are expected to be of the shape `{key: string}` but a custom `rowExtractor` function can be provided for different shapes, e.g. graphql data where you want to map `id` to `key`. Note the underlying `VirtualizedList` is much more flexible.
* Fancy `scrollTo` functionality: `scrollToEnd`, `scrollToIndex`, and `scrollToItem` in addition to the normal `scrollToOffset`.
* Built-in pull to refresh support - set set the `onRefresh` and `refreshing` props.
* Rendering additional rows is usually done with low priority, after any interactions/animations complete, unless we're about to run out of rendered content. This should help apps feel more responsive.
* Component props replace render functions, e.g. `ItemComponent: ReactClass<{item: Item, index: number}>` replaces `renderRow: (...) => React.Element<*>`
* Supports dynamic items automatically by using `onLayout`, or `getItemLayout` can be provided for a perf boost and smoother `scrollToIndex` and scroll bar behavior.
* Visibility callback replaced with more powerful viewability callback and works in vertical and horizontal mode on at least Android and iOS, but probably other platforms as well. Extra power comes from the `viewablePercentThreshold` that lets the client decide when an item should be considered viewable.

Demo:

https://www.facebook.com/groups/576288835853049/permalink/753923058089625/

Reviewed By: yungsters

Differential Revision: D4412469

fbshipit-source-id: e2d891490bf76fe14df49294ecddf78a58adcf23

@facebook facebook locked as resolved and limited conversation to collaborators May 29, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.