Closed klonos closed 5 years ago
I will admit that I haven't really used the flexible layouts/templates, so I'd like to clarify something...
How is the responsiveness of flexible layout templates controlled?
To my understanding, the system allows people to create a layout by adding rows and columns (e.g. full-width header row, then a row with two 50% width columns, then a 20/60/20 row (for content and sidebars), etc.) via a UI. But what if you want your 60% content region to change to 100% at a certain screen size, and the two 20% sidebars to be moved underneath at 50% each? Is this done via the UI? If not, can it be done at all by modifying template files?
If someone can shed some light on this for me, that'll help work out whether standard layout templates are needed or not. Because if you can't determine responsiveness via the UI, and if there's no template files to edit to do this in, then that's where I see a need still for standard layout templates.
...and I will admit that I have not done much theming, so I do not know the answer to most of these questions; but I was under the impression that responsiveness is controlled by adding bootstrap classes to regions. This is done in a "manual", coding way in "standard" templates, whereas in the flexi templates can be done (assumption here) by adding the same classes to the regions, via the UI. Right?
whereas in the flexi templates can be done (assumption here) by adding the same classes to the regions
That's assuming you use a grid system/bootstrap/whatever-they're-called where everything's controlled by classes. Personally I use media queries in my layout's (S)CSS, so I guess that's not possible with the UI. But I guess that also puts me in the minority... :slightly_smiling_face:
But I guess that also puts me in the minority... π
To get this straight, this is not a call to the "Backdrop values the needs of the editor and architect over the needs of the developer." principle, nor is it misinterpreting it to "Backdrop values the needs of the editor and architect, and completely disregards the needs of the developer.". If deprecating the standard layout templates introduces a DX burden, then my proposal should be out of the question of course.
It's just that this idea has been at the back of my head ever since I started testing the early versions of @docwilmot's implementation of #3755, but became more prominent after the release of 1.14, where I always keep being reminded of this, each time I visit the layout template listing page. Moreover, @quicksketch's comment here was an additional trigger:
Is it possible to have the same code for both flexible and standard layouts to use the human-readable labels?
We should absolutely keep standard templates. The flexible stuff has limitations:
The man has spoken π ...that's all I needed. I will leave this issue open for a few more days, in order to allow others to chime in if they like. We should then close it as "works as designed".
It'd be good to get more feedback on this, but if using a standard layout template is the only way to have a responsive layout that doesn't use a grid system/classes, then I'd vote for them to stay.
EDIT: Answered above :-)
I appreciate your raising this question. I've wondered if flexible layout templates might lead to the deprecation of standard layout templates eventually, but haven't really thought it through enough to have an opinion. Comments by @docwilmot and @BWPanda make sense to me.
I do think that https://github.com/backdrop/backdrop-issues/issues/4114 and https://github.com/backdrop/backdrop-issues/issues/4115 are very good ideas. I also assume that removing standard layout templates would be significant amount of work and may only be possible during a major upgrade, but am not sure if it's really worth it.
I know that this ticket is closed, but I would suggest making sidebars collapsible on standard layouts if these regions do not have content.
@irinaz Perhaps open a separate issue for that.
@BWPanda , thanks, will do.
In #3755 we've introduced a Layout Template Builder, which basically allows non-coders to create layout templates with arbitrary rows/regions, to be used in their layouts.
In #4114 and #4115 I am proposing to further improve this feature, by allowing "standard" layout templates (provided by layout projects) to become flexible/editable, by allowing to clone them - then disable them (or hide them?).
I was thinking that once these 2 follow-ups are implemented, there would be no point (from an end-user, non-coder PoV at least) to have the "standard" type of layout templates any more. To that end, I am starting this discussion here, with the goal to better understand certain things, and to see if we can simplify things. So: