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

FormattedList should be more like HTML's lists #9

Open
zach-klippenstein opened this issue Oct 10, 2020 · 0 comments
Open

FormattedList should be more like HTML's lists #9

zach-klippenstein opened this issue Oct 10, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@zach-klippenstein
Copy link
Collaborator

First, it shouldn't take an explicit list, just a single children slot.

Second, a composable called something like ListItem should be introduced. This composable will be scoped to the list slot and display the list marker inside itself by asking the scope for the marker composable. The list will compose it's children slot and determine how many list markers it needs to show, and use that number to calculate the width required to show markers. All children will be "indented" at the start. List item composables will compose the list markers outside of their actual bounds, so they are correctly placed in the margin. Children without a list item wrapper will simply be indented to match list items, with no marker.

This allows more control over how list markers are rendered. E.g. AnimatedVisibility can be used to affect the row and the marker.

zach-klippenstein added a commit that referenced this issue Oct 14, 2020
Closes #6 and closes #9.
zach-klippenstein added a commit that referenced this issue Oct 14, 2020
Closes #6 and closes #9.
@halilozercan halilozercan added the enhancement New feature or request label Aug 7, 2021
halilozercan added a commit that referenced this issue Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants