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

Add priority to allow adjusting how extra space in a run/row in a Flow layout should be used #498

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kyleve
Copy link
Collaborator

@kyleve kyleve commented Jun 11, 2024

Quick addition to flow layout – allow tagging each item with a priority similar to stacks. This allows controlling how extra space in a run/row should be used.

@kyleve kyleve requested a review from a team as a code owner June 11, 2024 03:31
@@ -116,6 +116,25 @@ extension Flow {
case bottom
}

/// When there is extra space in a run, how the extra space should be used.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Since we may add a vertical version in the future, I'm calling it a "run" instead of a "row".

}

/// Compute frames for the items in the row layout.
func itemFrames() -> [CGRect] {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

  • Comments on some of these vars?

@@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- `Flow` children now support a layout `priority`, to specify if they should grow to use the extra space in a row.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

  • s/row/run?

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.

None yet

1 participant