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 "space evenly" option to inspector spacing field #19

Open
passiomatic opened this issue Jan 7, 2021 · 0 comments
Open

Add "space evenly" option to inspector spacing field #19

passiomatic opened this issue Jan 7, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@passiomatic
Copy link
Owner

passiomatic commented Jan 7, 2021

Internally we represent Spacing like this:

type Spacing
    = SpaceEvenly
    | Spacing ( Int, Int )

This matches Elm UI nicely. However we currently don't expose this in the UI. We should model the Spacing X/Y fields accordingly. A few gotchas:

  • row accepts an horizontal spacing only
  • column accepts a vertical spacing only
  • textColumn accepts both values and uses horizontal spacing for "floated" elements on left and right
  • paragraph seems to happily ignore SpaceEvenly (see Para1) but works like textColumn (see Para2), see: https://ellie-app.com/c2jCXBTFB5Va1

The reason why this hasn't been implemented yet is because it isn't clear how to design the UI. We can have:

  • ❌A toggle/button/whatever to switch between the evenly status and the actual horizontal spacing value (numeric input)
  • ❌A toggle/button/whatever to switch between the evenly status and the actual vertical spacing value (numeric input)
  • ❌A toggle/button/whatever to switch between the evenly status and combined horizontal and vertical spacing values (two numeric inputs) for a TextColumn node (and we need to fix this Aligned image within a text column should be wrapped by text #59 fist!)
  • ✅ No spacing evenly toggle for paragraphs, instead a vertical spacing input in the inspector text spacing section (think this as a line-height)

So the only implemented scenario right now is the paragraph one, since it is quite an ad-hoc solution.

@passiomatic passiomatic added the enhancement New feature or request label Jan 7, 2021
@passiomatic passiomatic self-assigned this Jan 7, 2021
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

1 participant