posit-dev / posit-dev/py-shiny
`x.ui.layout_column_wrap` width API
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.8k
- Forks
- 135
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 21
Description
The current documentation for this function says that it takes a fractional width between 0-1, but it actually seems to require the following:
- Between 0.05-1
- Divides 1 into equal portions with no remainder
I think the current API is confusing because we're really asking the user to provide an integer of the number of divisions, but asking for the reciprocal of that number. This fractional expectation makes the user think that any fraction should work, but it doesn't and produces really confusing cases. For example 0.3333333333333333 is a valid width but 0.333333333333333 is not because three times the former rounds to 1, while the latter does not.
A couple of things which might help:
- If width is omitted it should evenly divide the number of children
2a) User should supply number of divisions instead of the fraction
2b) Allow both and take the reciprocal of numbers greater than 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the documentation and implementation of x.ui.layout_column_wrap, then verify the documented width range and division behavior described in the issue. Resolve whether omitted width, a number-of-divisions API, reciprocal handling, or a combination is wanted before defining the changed behavior and updating its documentation and tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100