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

[VID] Late switching of layout direction #4733

Open
hiiamboris opened this issue Nov 19, 2020 · 5 comments · May be fixed by #4734
Open

[VID] Late switching of layout direction #4733

hiiamboris opened this issue Nov 19, 2020 · 5 comments · May be fixed by #4734
Assignees
Labels
GUI type.design Things that require (re)design effort, not just implementation.

Comments

@hiiamboris
Copy link
Collaborator

Describe the bug

I was drawing a stair (;
view [base base below base across base below base across base]

Produces Expected

Platform version

Red 0.6.4 for Windows built 11-Nov-2020/5:05:03+03:00 commit #738c45d
@hiiamboris
Copy link
Collaborator Author

I guess this can be considered a (non human friendly) feature. Close it if it is (;

@greggirwin
Copy link
Contributor

Well, R2 just creates a vertical stack with your code, which would be even harder to climb. :^) At a glance it made sense to me, because the cursor (next position) is set when a face is placed, so when you get to a direction keyword it doesn't go back and recalc from the previous face. Design wise, this could be justified either way. But when I looked at the code for below/across, I saw that you could trick it. e.g. view [base base below base across base below across below across base across base] by alternating direction keywords is keeps applying spacing even though no new face is added. That's a bug for sure, as they should be idempotent.

image

I don't have time to think through effects on grid layout mode, but I don't think changing this will break much code. It's possible someone leverages it, especially in combination with R2 code using the here: at idiom. The other word I used in R2 quite a bit was guide, when making layouts with complex rows or columns.

The stair layout is a great example for this, if a bit pathological. ;^)

@hiiamboris
Copy link
Collaborator Author

hiiamboris commented Nov 19, 2020

Yeah well. I see why it is like this too. But it's not that hard to keep both the offset & size of the last laid out face, and then walk forth from it along the across/below chosen axis (in size+spacing increments). Almost the same complexity but more predictable.

@greggirwin
Copy link
Contributor

If you create a branch to do that, I'll press Nenad to evaluate it.

@greggirwin
Copy link
Contributor

I'll rescind my pathological comment as well, because this could apply directly to tree view layouts.

@dockimbel dockimbel added GUI type.design Things that require (re)design effort, not just implementation. labels Sep 3, 2022
@dockimbel dockimbel self-assigned this Sep 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI type.design Things that require (re)design effort, not just implementation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants