react-native-chooser icon indicating copy to clipboard operation
react-native-chooser copied to clipboard

V2 RoadMap

Open gs-akhan opened this issue 7 years ago • 41 comments

Hi, These are the features being targeted for V2

  • [x] Multiple Selection - Allowing users to multiselect options. Just like
  • [x] <View /> as option - Allowing to pass Views to options, this will allow users to have icons inside options
  • [x] Slide the selection menu from Top or Bottom of screen ..
  • [ ] Searching options. @stoffern @technology-studio-apiary

Thanks

gs-akhan avatar May 13 '17 18:05 gs-akhan

How about a dropdown instead of a modal overlay?

st0ffern avatar May 13 '17 19:05 st0ffern

Yeah Good question. But positioning is one hell of thing. I have contributed at lot to https://github.com/alinz/react-native-dropdown.

But the problem is when we embed the component inside navigator or otherviews the top and left positions are relative to parent component. So what I thought is to have a complete view for selection. It is easy UX wise too and also coding wise.

We can have that options too, if we collectively decide.

gs-akhan avatar May 13 '17 19:05 gs-akhan

@gs-akhan Have you had chance to validate my sample for setSelectedText #20 alternative through props ? Would you like me to create pull request for given approach?

rostislav-simonik avatar May 15 '17 13:05 rostislav-simonik

@gs-akhan i will fix v2 by this week, just need to land a few things @ work

st0ffern avatar May 15 '17 13:05 st0ffern

Cool. Create a branch we both can share the features and implement them

On Mon, May 15, 2017 at 7:07 PM, Kristoffer [email protected] wrote:

@gs-akhan https://github.com/gs-akhan i will fix v2 by this week, just need to land a few things @ work

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gs-akhan/react-native-chooser/issues/22#issuecomment-301477056, or mute the thread https://github.com/notifications/unsubscribe-auth/AFYnVuCQVuPYo_tzCjZAlnYT6z2Nwy3zks5r6FUogaJpZM4NaKPK .

gs-akhan avatar May 15 '17 13:05 gs-akhan

@rostislav-simonik I havent. will do it tonight.

gs-akhan avatar May 15 '17 13:05 gs-akhan

@gs-akhan Ok, thanks, let me know then and I'll do a more clean proposal.

rostislav-simonik avatar May 15 '17 14:05 rostislav-simonik

@gs-akhan can you add me as collaborator on NPM? Also activate Travis on the repo 😉

I am starting with v2 now

st0ffern avatar May 21 '17 07:05 st0ffern

Sure sir !! On Sun, 21 May 2017 at 1:03 PM, Kristoffer [email protected] wrote:

@gs-akhan https://github.com/gs-akhan can you add me as collaborator on NPM? Also activate Travis on the repo 😉

I am starting with v2 now

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gs-akhan/react-native-chooser/issues/22#issuecomment-302920506, or mute the thread https://github.com/notifications/unsubscribe-auth/AFYnVtSNx--LkqKotljrQbOSeSS2B4wwks5r7-i6gaJpZM4NaKPK .

gs-akhan avatar May 21 '17 08:05 gs-akhan

@stoffern What's your NPM profile name ?

gs-akhan avatar May 21 '17 10:05 gs-akhan

https://www.npmjs.com/~stoffern

st0ffern avatar May 21 '17 10:05 st0ffern

added direction (fromLeft, fromRight, fromTop, fromBottom) and renderButton={ currentValue => <Text>{'Current Value: ' + currentValue}</Text> }

more to come later on v2

st0ffern avatar May 21 '17 10:05 st0ffern

Did You get access ?

On Sun, May 21, 2017 at 3:51 PM, Kristoffer [email protected] wrote:

added direction (fromLeft, fromRight, fromTop, fromBottom) and renderButton={ currentValue => <Text>{'Current Value: ' + currentValue}</Text> }

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gs-akhan/react-native-chooser/issues/22#issuecomment-302927785, or mute the thread https://github.com/notifications/unsubscribe-auth/AFYnVpHzBQmksMUrqMMR8iZn3OpMiAPnks5r8BAtgaJpZM4NaKPK .

gs-akhan avatar May 21 '17 10:05 gs-akhan

Activated Travis

On Sun, May 21, 2017 at 3:53 PM, Azhar uddin [email protected] wrote:

Did You get access ?

On Sun, May 21, 2017 at 3:51 PM, Kristoffer [email protected] wrote:

added direction (fromLeft, fromRight, fromTop, fromBottom) and renderButton={ currentValue => <Text>{'Current Value: ' + currentValue}</Text> }

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gs-akhan/react-native-chooser/issues/22#issuecomment-302927785, or mute the thread https://github.com/notifications/unsubscribe-auth/AFYnVpHzBQmksMUrqMMR8iZn3OpMiAPnks5r8BAtgaJpZM4NaKPK .

gs-akhan avatar May 21 '17 10:05 gs-akhan

i feed we should remove sending styles into the Select and rather let the user send custom components into it with styles..

This is for SelectButton and Options

st0ffern avatar May 21 '17 11:05 st0ffern

passing it like this:

renderButton={ currentValue => <Text>{'Current Value: ' + currentValue}</Text> }
renderOptionItem = { ({value, text, index}) => <View key={index} style={{}}>{text}</View>}
renderOptionSeperator={ data => <View style={{height: 1, backgroundColor: 'black'}}></View>}

st0ffern avatar May 21 '17 11:05 st0ffern

How would end API look like.. ? Are we getting rid of <Option> </Option> Component then, and then replacing it with renderOptionItem ?

On Sun, May 21, 2017 at 5:18 PM, Kristoffer [email protected] wrote:

passing it like this:

renderButton={ currentValue => <Text>{'Current Value: ' + currentValue}</Text> } renderOptionItem = { ({value, text, index}) => <View key={index} style={{}}>{text}</View>} renderOptionSeperator={ data => <View style={{height: 1, backgroundColor: 'black'}}></View>}

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gs-akhan/react-native-chooser/issues/22#issuecomment-302931808, or mute the thread https://github.com/notifications/unsubscribe-auth/AFYnVucNuZGd-SLr_xaapY0SQkr9J5PXks5r8CSKgaJpZM4NaKPK .

gs-akhan avatar May 21 '17 11:05 gs-akhan

Ohh Got it. Lets accept styles. that should not be a worry.

On Sun, May 21, 2017 at 5:20 PM, Azhar uddin [email protected] wrote:

How would end API look like.. ? Are we getting rid of <Option> </Option> Component then, and then replacing it with renderOptionItem ?

On Sun, May 21, 2017 at 5:18 PM, Kristoffer [email protected] wrote:

passing it like this:

renderButton={ currentValue => <Text>{'Current Value: ' + currentValue}</Text> } renderOptionItem = { ({value, text, index}) => <View key={index} style={{}}>{text}</View>} renderOptionSeperator={ data => <View style={{height: 1, backgroundColor: 'black'}}></View>}

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gs-akhan/react-native-chooser/issues/22#issuecomment-302931808, or mute the thread https://github.com/notifications/unsubscribe-auth/AFYnVucNuZGd-SLr_xaapY0SQkr9J5PXks5r8CSKgaJpZM4NaKPK .

gs-akhan avatar May 21 '17 11:05 gs-akhan

Passing Component would be little too much to do for users. I think so

On Sun, May 21, 2017 at 5:27 PM, Azhar uddin [email protected] wrote:

Ohh Got it. Lets accept styles. that should not be a worry.

On Sun, May 21, 2017 at 5:20 PM, Azhar uddin [email protected] wrote:

How would end API look like.. ? Are we getting rid of <Option> </Option> Component then, and then replacing it with renderOptionItem ?

On Sun, May 21, 2017 at 5:18 PM, Kristoffer [email protected] wrote:

passing it like this:

renderButton={ currentValue => <Text>{'Current Value: ' + currentValue}</Text> } renderOptionItem = { ({value, text, index}) => <View key={index} style={{}}>{text}</View>} renderOptionSeperator={ data => <View style={{height: 1, backgroundColor: 'black'}}></View>}

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gs-akhan/react-native-chooser/issues/22#issuecomment-302931808, or mute the thread https://github.com/notifications/unsubscribe-auth/AFYnVucNuZGd-SLr_xaapY0SQkr9J5PXks5r8CSKgaJpZM4NaKPK .

gs-akhan avatar May 21 '17 11:05 gs-akhan

It's a normal practise to do in React. Look at ListView and FlatList I think if you dont pass in a custom component it will just render default layout..

So it is optional

st0ffern avatar May 21 '17 12:05 st0ffern

Let's go with it .. once it is all done we will see if we can make it even simpler On Sun, 21 May 2017 at 5:49 PM, Kristoffer [email protected] wrote:

It's a normal practise to do in React

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gs-akhan/react-native-chooser/issues/22#issuecomment-302933328, or mute the thread https://github.com/notifications/unsubscribe-auth/AFYnVgtBswr6MO2vNKE3KufMdYNu3RORks5r8CvsgaJpZM4NaKPK .

gs-akhan avatar May 21 '17 12:05 gs-akhan

@gs-akhan @stoffern Hi guys, what about the change I have been proposing. The one which substitutes setSelectedText with props logic?

rostislav-simonik avatar May 22 '17 06:05 rostislav-simonik

@rostislav-simonik i am rewriting the Select totally, into v2. There will be no setSelectText 😉

st0ffern avatar May 22 '17 06:05 st0ffern

@gs-akhan how do you want to solve the multiple select? What should the user do after he has selected multiple items in order to confirm selections?

st0ffern avatar May 22 '17 06:05 st0ffern

@rostislav-simonik Yeaah your concerns are taken care by @stoffern 's fix.

@stoffern
So the API for multiselect should be based of prop multiple = true just like we have in HTML Select tag.

And selected values should be as array of options selected.

gs-akhan avatar May 22 '17 11:05 gs-akhan

Yes, but when is the user done selecting?

st0ffern avatar May 22 '17 11:05 st0ffern

yes. That should be ok. You have any suggestions ?

On Mon, May 22, 2017 at 5:05 PM, Kristoffer [email protected] wrote:

Yes, but when is the user done selecting?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gs-akhan/react-native-chooser/issues/22#issuecomment-303075064, or mute the thread https://github.com/notifications/unsubscribe-auth/AFYnVkutfCiyS-VxnDxqTw4D6VzISfg_ks5r8XLxgaJpZM4NaKPK .

gs-akhan avatar May 22 '17 11:05 gs-akhan

Then er need a "done" button?

st0ffern avatar May 22 '17 11:05 st0ffern

No, we can close the menu my tapping anywhere outside. the will trigger "close" dropdown

On Mon, May 22, 2017 at 5:11 PM, Kristoffer [email protected] wrote:

Then er need a "done" button?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gs-akhan/react-native-chooser/issues/22#issuecomment-303076337, or mute the thread https://github.com/notifications/unsubscribe-auth/AFYnVmwgpYdhCrHQ8O71OLLNVMBQXLsiks5r8XRygaJpZM4NaKPK .

gs-akhan avatar May 22 '17 11:05 gs-akhan

done

st0ffern avatar May 22 '17 13:05 st0ffern