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

Feedback #1

Closed
gsimone opened this issue Mar 26, 2021 · 3 comments · Fixed by #4
Closed

Feedback #1

gsimone opened this issue Mar 26, 2021 · 3 comments · Fixed by #4
Labels
enhancement New feature or request

Comments

@gsimone
Copy link

gsimone commented Mar 26, 2021

Hey! 👋 Great little lib, I'm playing around with it and react-three-fiber, since laying stuff out is usually painful: https://codesandbox.io/s/blissful-lake-84hxp (<= this might explode while I work on it :D )

Here's a couple of quick things:

  1. gap and margin properties. In the example I wanted to add some gap between items, it would be great being able to do it without having to add a container
  2. direction could default to row like flex-direction does in css
  3. height and width defaults (auto probably), just to reduce boilerplate

Anyway, main message is: Kudos, this is great!

@gsimone gsimone added the enhancement New feature or request label Mar 26, 2021
@caesarsol
Copy link
Contributor

caesarsol commented Mar 29, 2021

Hi Gianmarco, thanks for this very early feedback! Cool little example :)

You make good points:

  1. gap and margin is exactly the direction we had the intention to go
  2. and 3. I did make a choice to avoid defaults in this early stage, but your comment makes me realize it's a pretty strange choice :D row and auto is definitely the way to go.

We are also adding a little feature to set the dimension of a Block based on its children's dimensions, do you think that could be useful?

@gsimone
Copy link
Author

gsimone commented Mar 29, 2021

Something like this, right?

makeLayout({
  id: "root",
  children: [{
       id: "1",
       width: 200
    },
    {
      id: "2",
      width: 300
    }]
})

// layout.root.width = 500

@caesarsol
Copy link
Contributor

Yes, we'd make the choice explicit by setting something like width: 'children', and then we'll need to error out if a children has a percentage or auto.

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

Successfully merging a pull request may close this issue.

2 participants