Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

reason-react-native: add example for ScrollView scrollTo method#577

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
MoOx merged 5 commits intomasterfromscrolltoexample
Aug 28, 2019

Conversation

@MoOx
Copy link
Member

totally wip but better than nothing?

@MoOx
Copy link
MemberAuthor

I used a switch for the example.

Btw, I noticed that scrollTo have scrollToParams & that scrollToEndWithOptions have scrollToEndOptions. What do you think about normalising naming with Params or Options (& same for similar places?).

@cknitt@sgny We could normalize & deprecate with warnings & remove deprecating warning in next major release?

@cknitt
Copy link
Member

I think I used the different names on purpose. In the case ofscrollTo, we have arequiredparams object (similar to the props object of a React component). In the case ofscrollToEnd, we have anoptionaloptions object that may be supplied as an additional parameter to override some default values.

Not sure if this is consistent across the code though...

@MoOx
Copy link
MemberAuthor

@cknitt I just find confusing the 2 namings. I get the idea.
But maybe we could stick to Option, since we might have xxx & xxxWithOptions ? (and xxxOptions would be the method to generate options).
Not sure if naming things option/param/argument are really different & clear for users. We should imo keep one & stick to it.

@sgny any comment?

@cknitt
Copy link
Member

I am open to changing these method args from "params" to "options".

Callback params likeVirtualizedList.onEndReachedParams would remain as they currently are though, right?

@sgny
Copy link
Collaborator

I think the function name should remainscrollToEndWithOptions as that is consistent across the various modules. However, the optional argument could be renamedscrollToEndParams which would be more consistent withscrollParams and still be a reasonable name for what it is.

@cknitt
Copy link
Member

I findscrollToEndWithOptions withscrollToEndParams even more confusing.

I'd expectxxxWithYyy to take ayyy param...

@MoOx
Copy link
MemberAuthor

I would go for just ditching one & keep only the other for simplicity.
Ditch "Params" & use "Options" everywhere. Or the opposite.
Having this kind of naming is anyway "confusing" somehow, so we should just have one.
Migration won't be a problem: we can deprecate call easily, people will have warnings, & next major release we remove them.

@cknitt
Copy link
Member

If we want to unify this, I am for "Options" everywhere.

@MoOxMoOx merged commit4049d95 intomasterAug 28, 2019
@MoOxMoOx deleted the scrolltoexample branchAugust 28, 2019 08:33
@sgny
Copy link
Collaborator

How about instead ofwithOptions we usewithOptional (orwithOptionals)? Then we could have optional parameters or configs without causing much confusion.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@cknittcknittcknitt requested changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@MoOx@cknitt@sgny

[8]ページ先頭

©2009-2025 Movatter.jp