Skip to content

Infra/generify faded scroll view #1842

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
Feb 16, 2022
Merged

Conversation

M-i-k-e-l
Copy link
Collaborator

@M-i-k-e-l M-i-k-e-l commented Feb 13, 2022

Description

FadedScrollView - make more generic (I will use this in Incubator.Dialog, splitting up in to a few PRs).
Look at each commit separately for convenience.

Changelog

None

Copy link
Contributor

@lidord-wix lidord-wix left a comment

Choose a reason for hiding this comment

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

Looks good, I wrote two small comments :)

const FADER_SIZE = 76;
interface Statics {
scrollTo(
y?: number | {x?: number | undefined; y?: number | undefined; animated?: boolean | undefined},
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like the types are not in the right place here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not sure what you mean, can you elaborate \ rephrase?

Copy link
Contributor

Choose a reason for hiding this comment

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

Can the y key get both number and object?

Comment on lines 76 to 77
const showStart = (showStartFader && scrollEnabled && !isScrollAtStart) ?? false;
const showEnd = (showEndFader && scrollEnabled && !isScrollAtEnd) ?? false;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you need the ?? false in these two lines?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The default for the Fader is to be visible, I want it to not be visible unless it's needed.

@M-i-k-e-l M-i-k-e-l requested a review from lidord-wix February 15, 2022 16:53
@lidord-wix lidord-wix merged commit e617ce4 into master Feb 16, 2022
@M-i-k-e-l M-i-k-e-l deleted the infra/generify-faded-scroll-view branch February 16, 2022 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants