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

[UX] Disambiguate "Layouts" vs "Layout templates" in the admin interface. #3607

Closed
jenlampton opened this issue Mar 21, 2019 · 22 comments · Fixed by backdrop/backdrop#4303 · May be fixed by backdrop/backdrop#4304
Closed

[UX] Disambiguate "Layouts" vs "Layout templates" in the admin interface. #3607

jenlampton opened this issue Mar 21, 2019 · 22 comments · Fixed by backdrop/backdrop#4303 · May be fixed by backdrop/backdrop#4304

Comments

@jenlampton
Copy link
Member

jenlampton commented Mar 21, 2019

I noticed that the tab on the Layouts page is labeled Install new Layouts when it should really be Install new Layout TEMPLATES as per our new disambiguation between Layouts and Layout templates.
Screen Shot 2019-03-21 at 5 43 32 PM


PR by @seancav03 backdrop/backdrop#2599
Updated PR backdrop/backdrop#3278 (includes commit above)

@jenlampton jenlampton changed the title [UX] [UX] Layout installer tab should read 'Install new layout templates' Mar 21, 2019
@klonos
Copy link
Member

klonos commented Mar 24, 2019

To be absolutely exact...

In theory we should start calling the contrib projects "Layout templates" as well (and rename things in the b.org menu structure, and documentation/references too).

@klonos klonos changed the title [UX] Layout installer tab should read 'Install new layout templates' [UX] Call layout templates what they are (instead of calling them 'layouts') Mar 24, 2019
@jenlampton
Copy link
Member Author

jenlampton commented Mar 24, 2019 via email

@ghost
Copy link

ghost commented Sep 28, 2019

In writing https://api.backdropcms.org/documentation/overriding-layout-templates, I struggled knowing what to call these things (for lack of a better word). 'Layouts' seems to be obvious, because that's the directory name where they're stored, and 'templates' might refer to the *.tpl.php files in those layouts, but then I saw this and was like "Uh...what!?"

layouts

I thought 'Moscone Flipped' was the layout, 'cause it's stored in /core/layouts/moscone_flipped; but 'Default layout' is the layout and 'Moscone Flipped' is the template...? Argh!

@jenlampton
Copy link
Member Author

jenlampton commented Sep 28, 2019

Yeah, it's confusing.

A "Layout" is a specific path (or path pattern like node/%) that contains both block placements and configuration options, including which Layout template is in use. Example: This is my Home Page layout. (It could be 2 columns, stripes, custom, etc)

A "Layout project" is the thing you download from https://backdropcms.org/layouts. It can contain one or more Layout Templates.

A "Layout template" is one of the things that you find inside a "Layout project", and usually contains a .tpl.php file, but might not (though this is rare -- the core Boxton one-column layout is an example of a layout template that does not contain a `.tpl.php file).

@klonos
Copy link
Member

klonos commented Jan 10, 2023

I was just surprised that had we agreed on the names...

I don't think have never agreed. See: #3607 (comment) and #3607 (comment) 😅

Any of these PRs is still better than what we have now! :)

100%

@klonos
Copy link
Member

klonos commented Jan 10, 2023

@yorkshire-pudding thanks for taking the time to review and provide feedback 🙏🏼

Yeah, renaming the /layouts and /core/layouts folders and reorganizing the structure within them is a whole other can of worms 😓 (and we're a bit late to make that change, even if we wanted to - it'll break lots of things, so maybe a 2.x thing ...may just leave it alone). Same goes for the type = layout lines in .info files. I think that developers can live with the fact that layout template projects are simply called "layouts" (or to be more precise, they have layout for the machine name of their type) 🤷🏼‍♂️

The goal here is to make it less confusing in more obvious places and user-facing text, which includes this PR here, changing what we call these in our documentation and inline comments, and perhaps renaming certain things in b.org.

@jenlampton
Copy link
Member Author

jenlampton commented Jan 10, 2023

I had a look in the core folders for layout and the only one with more than one template in is legacy. I half expected moscone and moscone_flipped to be two templates in one folder but no, they each have a separate folder with a separate .info file.

All layout templates need to have an .info file, so it would be impossible to have any two layouts share one. Looking at core isn't a great example. We don't have very many core modules with submodules either, I can think only of the field modules that do that (number, text, etc).

In most cases the project you download from backdropcms.org is going to contain a set of layout templates that all use the same layout framework (something like bootstrap, zen, etc) but have different configurations of rows and columns.

Yeah, renaming the /layouts and /core/layouts folders and reorganizing the structure within them is a whole other can of worms 😓 (and we're a bit late to make that change, even if we wanted to

Oi, you mean renaming them to layout-templates? I hadn't thought of that :/

if you still insist on calling these "layout projects", can you please rebase your PR, so that people can play around with the UI and compare the two alternatives? Thanks.

I did end up rebasing my PR: backdrop/backdrop#4304 but I expect we'll probably use yours. I did a quick code review (of your PR) and found a few unnecessary comment changes, but otherwise it looks good!

@klonos
Copy link
Member

klonos commented Jan 11, 2023

Oi, you mean renaming them to layout-templates? I hadn't thought of that :/

Yes, either layout-templates or layout_templates ...either way, it's not ideal DX to have a thing called "layouts" which doesn't make sense, since layouts are config .json files that is kept under the config folders - the /layouts and /core/layouts folders hold layout templates, but as you can understand and as I said, whole different can of worms there 😓

I did a quick code review (of your PR) and found a few unnecessary comment changes, but otherwise it looks good!

Thanks. Reverted those 👍🏼

@stpaultim
Copy link
Member

I don't feel too strongly about any of the issues that were discussed here. Just happy to see progress with either PR. I just looked at both Sandboxes and think they look good.

@klonos
Copy link
Member

klonos commented Jan 15, 2023

@jenlampton @stpaultim @yorkshire-pudding you've all chimed in here recently, indicating that you like where this is heading, however have you actually had the chance to test or review the code? I would really like this in for 1.24.0 (and 1.23.2), so pwetty pwease 🙏🏼 🙂

@yorkshire-pudding
Copy link
Member

@klonos - which one should I look to test/review?

@klonos
Copy link
Member

klonos commented Jan 16, 2023

@yorkshire-pudding mine is this: backdrop/backdrop#4303 ...but in general, hovering over a PR link in the sidebar should reveal a pop-up which indicates the name of the repo it's coming from:
image

@yorkshire-pudding
Copy link
Member

Thanks @klonos - I've tested this in the sandbox and all looks good and I think makes more sense than what is there currently. I've also reviewed the code and think it looks fine.

@ghost
Copy link

ghost commented Feb 6, 2023

I reviewed @klonos' PR and tested in the sandbox. Looks good to me. I'm not sure about @jenlampton's 'Layout project' terminology... Perhaps something to discuss in a new issue. FTR, if necessary, I'd prefer something like 'Layout bundle'.

I've merged backdrop/backdrop#4303 into 1.x and 1.24.x. THanks to @klonos, @jenlampton, @stpaultim & @yorkshire-pudding for their feedback here.

@ghost ghost closed this as completed Feb 6, 2023
@jenlampton jenlampton changed the title [UX] Call layout templates what they are (instead of calling them 'layouts') [UX] Disambiguate "Layouts" vs "Layout templates" in the admin interface. Mar 15, 2023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment