Skip to content
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

HorizontalScroll should provide the ability to fade edges #905

Open
1 task done
Fs00 opened this issue Jul 18, 2022 · 3 comments
Open
1 task done

HorizontalScroll should provide the ability to fade edges #905

Fs00 opened this issue Jul 18, 2022 · 3 comments

Comments

@Fs00
Copy link

Fs00 commented Jul 18, 2022

Version

Litho 0.41.2

Issues and Steps to Reproduce

The HorizontalScroll component doesn't have the ability to fade edges when the content overflows, which is a bit surprising considering that the VerticalScroll component already has it.
In my case, fading edges in HorizontalScroll would be useful to improve the appearance of a toolbar that has several buttons which cannot fit in the screen.

Expected Behavior

I would expect the HorizontalScroll component to have the horizontalFadingEdgeEnabled and fadingEdgeLength* props to provide the same fading edge functionality that VerticalScroll has.

@astreet
Copy link
Contributor

astreet commented Jul 28, 2022

Hi @Fs00 - I agree, I think this was probably an oversight. Would you be interested in sending a PR to expose this for HorizontalScroll in the same way it's been exposed for VerticalScroll?

@Fs00
Copy link
Author

Fs00 commented Jul 28, 2022

I've taken a quick look and this doesn't seem something straightforward to do... HorizontalScroll and VerticalScroll seem to have quite different underlying implementations as far as I can tell.

I'd be happier if this could be done by someone more experienced in Litho and Android development than me 😅

@astreet
Copy link
Contributor

astreet commented Jul 28, 2022

The setVerticalFadingEdgeEnabled/setHorizontalFadingEdgeEnabled calls are just on View so even though the impls are different, you should be able to make basically the same call as in VerticalScroll (i.e. setHorizontalFadingEdgeEnabled on the view in onMount)!

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

No branches or pull requests

2 participants