-
Notifications
You must be signed in to change notification settings - Fork 40
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
[UX] Add some info about paths to section on "How Layouts Work" #6699
Comments
Note this comes with caveats. Paths only have visibility conditions (and menu settings) if it's a path created by the Layout Configuration. If a Layout Configuration is on an existing path (such as |
Thanks @quicksketch. I'll take another stab at this later, since there is no rush on this issue today. |
@quicksketch or @bugfolder - What do you think of this revised copy? |
LGTM |
We discussed this and some related issues in the Design/UX meeting today. @jenlampton raised some concerns about using the term "Visibility Conditions" when "Access Conditions" might be more accurate and appropropriate. In another issue, it was suggested that we add links to documentation pages. I think that makes sense here. I'm inclined to incorporate at least two links, one to the Layouts Section of the documentation and one directly to this page: Any thoughts? I'll try to update PR to reflect this ASAP. |
About to push this PR. 3 changes:
In regards to the last item, I'm not sure if there was a specific reason for aligning that to the right. BUT, I noticed in my own work on this issue, I was not noticing that link. I was about to add a new link to the same page, when I realized it was already there. I think I was just missing it, because it was so far down and to the right. I think sliding it back to the left makes it more easily noticed. Any thoughts or objections? (Atten @bugfolder) @jenlampton Does this address your concern? |
Left-aligning the last line does look like the thing to do. |
Hm :/ To me, this seems quite a bit more confusing than it was before. The first bullet In fact, neither item has anything to do with how layouts are selected, they are both general information about the menu router / access system - which is, in itself, also very confusing. I think maybe we need an entirely separate section for menu router stuff, or maybe we link to a documentation page on the menu system? It really seems like this change is overly confusing layouts for the 80% of people who just want to know which layout is being used for which page (and won't ever need to know about menu router access conditions). |
@stpaultim I'm not sure exactly what question you were hoping to answer by making these changes, but I'm hoping we might be able to answer them in another way. Here are some pointers: Visibility condition
Access condition
The only reason we have exposed menu router settings in the Layout UI is because creating a Page Layout also creates it's menu router item, and there is no other place for this UI to exist. All the information in the Your recent experience with 403/404 pages might be confusing things, because 403/404 pages are special. In the case where the Home page (menu router) access condition fails, the 403/404 page will render instead of the Home page. It's not that the access condition causes a different Layout to be selected for the home page (like a visibility condition), instead a completely different page will be delivered by the menu router. Let me know if your brain just exploded (mine did!) and we can talk about this real-time :) |
@jenlampton My brain did NOT explode, but only because of how much I've been thinking about this in the last 2 weeks. I think that I'm far enough along, that I'm at about 70-80% understanding this stuff (as of recently). I was not trying to answer a specific question with the changes as much as I was trying to make changes that I found helpful, without any clear idea of exactly that was or what the best way to do it would be. NOTE: I suppose that the question I was trying to answer is "What are menu access conditions (in comparison with layout visiblity conditions) and how do they effect layouts and how do they impact which layout renders at a specific path." (I probably could not have asked this question before today). So far, the changes that have been suggested have been very helpful to me, I very much appreciate the feedback - so that we can make changes that are helpful to everyone (or at least most people) and also be accurate. Pretty much everything you have suggested has been helpful and I'm willing to keep revising the PR until we get it right (or as close as possible without going too far down any rabbit holes). At the start of this PR, I was not thinking about links to documentation. I like the idea of using links to documentation, to take the pressure off this "How do Layouts Work" section. I will make another pass at this PR taking all of the information you have shared AND the idea that we can rely on the documentation page as well and see if I can come up with something better. In the end, I think I will have to also take a pass at revising the documentation a bit. There are some things there that need updating and some things that could be more clearly stated, based upon this conversation. |
If you want to keep working on this PR, my recommendation would be to remove everything having to do with access conditions (and menu router settings) other than to say that's they are available here. They do not affect how layouts are selected, or how layots work. |
They are not related, but the options you will see inside are the same (because those are the common conditions people tend to use for everything)
they do not.
they do not. |
That does not sound correct to me, maybe my brain is exploding. My current understanding is that a menu access condition could very much effect which layout is chosen (default vs custom), in the sense that a layout will not be availble to anyone that does not have access to the path assigned to that layout. Maybe that's just so obvious that it doesn't seem relevent. But, it was helpful for me to think about and acknowledge that. |
For me, I think the problem that I'm trying to solve is that menu access conditions are now more visible. I think that's a good thing. But, I don't understand them and having something visible that I don't understand makes things that I thought I understood, more confusing. I want folks like myself to understand menu access conditions enough, that their newfound visibility is helpful and NOT confusing, even if they are unlikely to actually need them. NOTE: I think I do understand these things now, but I did not when I first looked at the changes we recently make in core. |
I think the problem is with this concept of "which layout is chosen". The Layout system is what does the "choosing" of Layouts (as defined in That said, the menu routing system also gets to make a choice - which page's content is delivered at this path. The Routing system is what does the choosing of pages delivered. If you add both these choices together, then yes! Adding a menu access condition may result in a different layout being used. But the reason you are seeing a different Layout is because you are actually seeing a completely different page (that happens to use a different layout) at the same path. (The same thing is true for menu items from views, custom menus, anything. The results of any menu access condition anywhere could also result in a different layout being used.) The access condition is not one of the conditions the Layout system is using when it "chooses" a layout. (So menu routing doesn't really belong in the It could be helpful to add a note or a warning somewhere indicating that adding access conditions could have this result, but I also think that makes sense in practice -- when you see the alternative page appear, it feels right that the layout for the page you can see is being used instead of the layout for the page you can't see.
I don't think "how layouts work" is the right place for menu routing documentation. But I am starting to worry that exposing menu access conditions on the layouts overview page could do more harm than good. Both systems are so complicated. Trying to explain how they interact is very hard. |
I'm going to take a fresh look at this problem and see what I come up with, may take a few days. |
Description of the bug
In working on the following issue:
#1929
I found that the relationship between path menu settings and layouts is not obvious and can be a bit confusing.
Issue #1929 helps expose the relationship a bit and makes visibility conditions at the path level a bit more obvious. But, I think that we might be able to make some minor changes to the help text for "How Layouts Work" that would also help folks understand this.
Here is my proposed text (First draft)
There are three kinds of Layouts:
As a page is rendered, a Layout is selected as follows.
@bugfolder - I'd specifically like your feedback. You put a lot of time and energy into the original draft of this text. I'm not confident my changes are good, but they seem helpful to me.
NOTE: I'm sensitive to translation issues that come up with these kinds of changes in core and welcome feedback on how much to take that into account when making this kind of change.
The text was updated successfully, but these errors were encountered: