-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
[Feature request]: add documentation / wiki #177
Comments
Hey, thank you this is a nice idea |
I have/had some issues with the current JSON, for example what the "groups" key is for exactly. Also the X and Y, those are logical, only question is do they start bottom left or top left of the screen? |
The JSON file contains a list of
For example, the following JSON represents the layout in the image below:
Top-left tile is in a group with the bottom-left tile (group number 1), top-left and bottom-left tiles are in a group with the tile in the center (group number 2), top-right and bottom-right tiles are in a group with the tile in the center (group number 3), top-right tile is in a group with the bottom-right tile (group number 4). The sliders in the image below visualize the groups: |
Ah,so my suspicions were wrong! Thanks for pointing out that X and Y are relative, not absolute. I thought they were absolute. I was playing around with a monocle layout, and that worked so I thought I'd flip it around (the major pane on the right, not the left), but couldn't get that to work from pure code. Let's see if with your info I can get it down, if that's the case I can (if you want) help out with writing documentation |
You're welcome! Yes, your help with writing documentation about this would be awesome, thank you! Feel free to reply here for any doubt! Hope you'll create the layout you want, but if you need any help just ping me and I'll be more than happy to give you a hand! |
So I created two layouts, a 50/50 split and a 33/33/33 split, with the following code: [
{
"id": "split-half",
"tiles": [
{
"x": 0,
"y": 0,
"width": 0.5,
"height": 1,
"groups": [
2
]
},
{
"x": 0.5,
"y": 0,
"width": 0.5,
"height": 1,
"groups": [
1
]
}
]
},
{
"id": "split-thirds",
"tiles": [
{
"x": 0,
"y": 0,
"width": 0.333,
"height": 1,
"groups": [
2,
3
]
},
{
"x": 0.333,
"y": 0,
"width": 0.333,
"height": 1,
"groups": [
3,
1
]
},
{
"x": 0.666,
"y": 0,
"width": 0.333,
"height": 1,
"groups": [
2,
1
]
}
]
}
] Which results in the following (apparently) working choices in the UI My question is, are the groups correct? That's the thing I am struggling with most. And also; does the ID have to be a specific pattern, or is it free form (for now)? |
The idea of a group is to be a unique integer identifier grouping nearby tiles. So, for example in your split-half layout, there are two tiles nearby and they are part of the same group, let's say group id 1. So both tiles should have only The other layout should have two groups, let's say 1 and 2: the left tile is grouped with the center tile (let's say group 1), while the right tile is grouped with the center tile as well (let's say group 2). For transitivity, the center tile is part of two groups, 1 and 2. The reason behind groups is that the layout editor needs such information to place the sliders and allow editing nearby tiles. The other components of Tiling Shell doesn't need the groups to work! In other words, if tiles are part of the same group, increasing or decreasing the width or height of one tile must decrease or increase the width or height of all the other tiles. One thing that I forgot to mention before: to ensure that the rightmost tile ends with the screen length, its X coordinate plus its width value must be equal to 1. The same applies for the height of course. In your example you may decide that the center tile is 0.334 width and that the rightmost tile starts at X equal to 0.334 with a width of 0.666 (Sorry I'm replying from my smartphone, hope my answer is clear ahahah) |
I'm still having a hard time wrapping my head around this. For me it's not clear how a group gets assigned to a tile. I'm going through the code (thanks to Would it make sense if I said that a group "links" two tiles together in the editor, so that what you do to one gets reflected (when required) in the other as well?
That is a good thing to point out, I'd overlooked that! Adding that to my (quickly growing) markdown file, thanks! |
Hey sorry for the late response.
This totally makes sense! This is exactly the one and only reason why the groups exist 😄 |
No worries
Glad that clicked for me! Now the next question is, how does the code determine with tile belongs to which group? That's a bit of a mystery for me. Does that get detemined based on order the tiles are created (and/or read in from the JSON file), or am I missing something? If I can get my head around that that would solve the last large issue I am having, and I can finish a very rough draft of my (growing) doc file.. |
Let's look at the tiles of the following layout:
For example the BOTTOM-RIGHT tile belongs to two groups, group 3 and 4! Reason behind that tile has number 3 and 4 in its list of groups. Tiling Shell reads all the tiles and then understands for each group which tiles belong to. |
Heh, I know I asked that already, and you already explained it. For some reason I'm having a very hard time wrapping my head around it though. This for me has not "clicked", yet. If you don't mind I'm going to quote your explanation above in my document so that it's clear for other people. If/when it clicks for me I'll see if it benefits from a rewrite/rephrase |
Hey, don't worry! Quoting is a very good idea and I believe the documentation you are writing will be very useful to many. Thank you! ❤️ |
Describe the feature you'd like
Adding documentation of the internal JSON structure (you can get/edit with the "export layouts" button) so you can edit your wanted layouts. This is so you can import/export your own custom layout(s) easily.
Additional context
None that I can think of.
The text was updated successfully, but these errors were encountered: