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

[Early development] Introduce VGridBlock #70

Merged
merged 3 commits into from
Dec 15, 2021
Merged

[Early development] Introduce VGridBlock #70

merged 3 commits into from
Dec 15, 2021

Conversation

muukii
Copy link
Collaborator

@muukii muukii commented Dec 14, 2021

CleanShot 2021-12-15 at 02 57 45@2x

Next, optimizations

Comment on lines +17 to +25
let view = ExampleView(width: 100, height: nil) { view in
view.mondrian.buildSubviews {
VGridBlock(
columns: [
.init(.flexible(), spacing: 16),
.init(.flexible(), spacing: 16),
],
spacing: 4
) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

usage

@muukii muukii changed the title Introduce VGridBlock [Early development] Introduce VGridBlock Dec 14, 2021
@JohnEstropia
Copy link
Collaborator

@muukii This looks good! By the name VGridBlock, I assume we will get a horizontal HGridBlock in the future?

@JohnEstropia
Copy link
Collaborator

It's a bit confusing that both columns and rows use the word spacing:. What if we specify them using hSpacing: and vSpacing? (Though I understand it's different from SwiftUI's thinking)

@muukii
Copy link
Collaborator Author

muukii commented Dec 15, 2021

@JohnEstropia yes, I thought too, it's a bit confusing. I just aligned with SwiftUI's LazyVGrid.init.

@muukii
Copy link
Collaborator Author

muukii commented Dec 15, 2021

@muukii This looks good! By the name VGridBlock, I assume we will get a horizontal HGridBlock in the future?

Yes, I got knowledge of laying out grids. I could create HGridLayout when we need it.

@muukii
Copy link
Collaborator Author

muukii commented Dec 15, 2021

@muukii muukii merged commit 4eed50e into main Dec 15, 2021
@muukii muukii deleted the muukii/grid-layout branch December 15, 2021 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants