react / react/yoga

Describe in documentation how to implement scrollable areas properly

Open
#1,804 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
18.9k
Forks
1.6k
Avg merge
1m
Merged PRs (30d)
1

Description

Hi,

I presume all the documentation for this project is here: https://www.yogalayout.dev/docs/about-yoga

It does not tell how to make a scrollable area. Could you take a little bit of time to explain how it's done?

I'm using poga bindings to apply yoga in my project. It's providing C bindings directly, eg. YGNodeStyleSetOverflow would allow me to set the scroll on.

So once I've set the overflow: scroll, how do I actually make it scroll? Eg. Set the scroll offsets and get the scroll limits so I won't let the user scroll over the content.

Thank you for writing yoga. It's been a nice library to use overall.

(I'm also interested about making very large scrollable areas that need to dynamically remove/add content based on where user is scrolling. But the basic recipe would be nice and I could then apply it on the infinite scrolling -problem)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the documentation at yogalayout.dev/docs/about-yoga and review the C API example involving YGNodeStyleSetOverflow. Document how an application should make an overflow area scroll, including setting scroll offsets and determining scroll limits; the documentation is done when the basic recipe is clear enough to support a simple scrolling implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, cpp
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.