Problem/Motivation

If we want to still iterate on markup, CSS, and JavaScript in core we can't do much past RC1. Assuming we want to iterate, people who want stripped down markup are forced to use Classy because it's stable (@api). But there is no such stability for core's markup.

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue category Task because it's an agreed upon course of action.
Issue priority Major because it affects the future of Drupal's frontend.
Unfrozen changes It will only change CSS/JS/markup/templates in the future but this issue itself doesn't fit into the unfrozen categories.
Prioritized changes Not prioritized based on the beta guidelines.
Disruption At this time minimally disruptive to sites using a baseless theme (no base theme set in the .info.yml file). There is an upgrade path for those sites.

Proposed resolution

Add a new base theme to core (Stable) to act as a BC layer and provide 8.0.0 markup, CSS, JavaScript, etc.
When creating a theme, if you don't specify base theme in your .info.yml you'll get Stable.
If you specify base theme: false in your theme's .info.yml then you get core's markup which may change on you and break your site and you'll need to adjust accordingly.

Remaining tasks

  • Proof of concept that we can handle BC things in Stable We got pretty far on this issue (stops at #99), work to continue in #2575737: Copy templates, CSS, and related assets to Stable and override core libraries' CSS
  • Figure out upgrade path (need to install Stable for people not currently using a base theme) Failing/passing upgrade path tests (test without update hook then with) is in #109
  • Create initial patch to add Stable (which will be empty or nearly empty) including the upgrade path (installing for people not using a base theme)
  • Communicate all this to the community (probably needs g.d.o/core post as well as the change record that has been written)

User interface changes

None

API changes

People who want to stick with the core markup and are okay with keeping up with changes and breaks will need to add base theme: false to their theme's .info.yml file.

Data model changes

The Stable theme is the base for themes that don't declare a base theme or base theme: false in their .info.yml, so we add an ugprade path to install Stable if needed. It has tests.

CommentFileSizeAuthor
#137 interdiff.txt1.29 KBstar-szr
#137 add_a_stable_base_theme-2575421-137.patch10.57 KBstar-szr
#137 add_a_stable_base_theme-2575421-137-false-only.patch11.22 KBstar-szr
#134 interdiff.txt777 bytesstar-szr
#134 add_a_stable_base_theme-2575421-134.patch11.21 KBstar-szr
#128 interdiff.txt3.95 KBstar-szr
#128 add_a_stable_base_theme-2575421-128.patch10.99 KBstar-szr
#127 interdiff.txt423 bytesstar-szr
#127 add_a_stable_base_theme-2575421-127.patch11.03 KBstar-szr
#126 interdiff-2575421-117-126.txt1.12 KBRainbowArray
#126 2575421-126-add-stable-base-theme.patch11.44 KBRainbowArray
#117 interdiff.txt4.14 KBstar-szr
#117 add_a_stable_base_theme-2575421-117.patch10.32 KBstar-szr
#116 interdiff-2575421-110-115.txt2.27 KBRainbowArray
#116 2575421-115-add-stable-base-theme.patch9.96 KBRainbowArray
#110 interdiff.txt750 bytesstar-szr
#110 add_a_stable_base_theme-2575421-110.patch9.89 KBstar-szr
#109 interdiff.txt2.63 KBstar-szr
#109 add_a_stable_base_theme-2575421-109.patch9.82 KBstar-szr
#109 add_a_stable_base_theme-2575421-109-testupgradepath.patch9.16 KBstar-szr
#107 interdiff.txt673 bytesstar-szr
#107 add_a_stable_base_theme-2575421-104.patch7.19 KBstar-szr
#102 add_a_stable_base_theme-2575421-102.patch6.53 KBstar-szr
#99 interdiff-2575421-97-99.txt389 bytesRainbowArray
#99 2575421-99-add-stable-theme.patch391.88 KBRainbowArray
#97 interdiff-2575421-96-97.txt5.17 KBRainbowArray
#97 2575421-97-add-stable-theme.patch1.25 MBRainbowArray
#96 2575421-96-reroll-add-stable-base-theme.patch1.25 MBRainbowArray
#92 interdiff.txt6.33 KBstar-szr
#92 add_a_stable_base_theme-2575421-92.patch162.91 KBstar-szr
#89 interdiff.txt29.27 KBstar-szr
#89 add_a_stable_base_theme-2575421-89.patch156.72 KBstar-szr
#84 add_a_stable_base_theme-2575421-83.patch145.31 KBstar-szr
#82 add_a_stable_base_theme-2575421-82.patch182.84 KBstar-szr
#80 liboverride-test.png524.07 KBdavidhernandez
#74 interdiff.txt53.13 KBstar-szr
#74 add_a_stable_base_theme-2575421-74.patch181.81 KBstar-szr
#71 interdiff-2575421-67-71.txt8.57 KBRainbowArray
#71 2575421-71-add-stable-theme.patch127.47 KBRainbowArray
#68 interdiff-2575421-66-67.txt71.45 KBRainbowArray
#68 2575421-67-add-stable-theme.patch118.72 KBRainbowArray
#67 interdiff-2575421-65-66.txt1.27 KBRainbowArray
#66 interdiff-2575421-65-66.txt0 bytesRainbowArray
#66 2575421-66-add-stable-theme.patch48.03 KBRainbowArray
#65 interdiff-2575421-64-65.txt461 bytesRainbowArray
#65 2575421-65-add-stable-base-theme.patch200.36 KBRainbowArray
#64 interdiff-2575421-36-64.txt193.83 KBRainbowArray
#64 2575421-64-add-stable-base-theme.patch200.36 KBRainbowArray
#37 interdiff.txt22.74 KBstar-szr
#37 add_a_stable_base_theme-2575421-36.patch6.53 KBstar-szr
#34 interdiff.txt3.56 KBstar-szr
#34 add_a_stable_base_theme-2575421-33.patch10.51 KBstar-szr
#28 interdiff.txt644 bytesstar-szr
#28 add_a_stable_base_theme-2575421-27.patch76.71 KBstar-szr
#24 interdiff.txt2.72 KBstar-szr
#24 add_a_stable_base_theme-2575421-24.patch9.71 KBstar-szr
#19 interdiff.txt691 bytesstar-szr
#19 add_a_stable_base_theme-2575421-19.patch10.51 KBstar-szr
#15 interdiff.txt2.63 KBlauriii
#15 add_a_stable_base_theme-2575421-12.patch30.65 KBlauriii
#11 interdiff.txt4.39 KBstar-szr
#11 add_a_stable_base_theme-2575421-11.patch7.94 KBstar-szr
#5 interdiff.txt1.96 KBstar-szr
#5 add_a_stable_base_theme-2575421-4.patch3.55 KBstar-szr
#3 interdiff.txt316 bytesstar-szr
#3 add_a_stable_base_theme-2575421-3.patch1.6 KBstar-szr
#2 add_a_stable_base_theme-2575421-2.patch1.59 KBstar-szr
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Cottser created an issue. See original summary.

star-szr’s picture

Status: Active » Needs review
Issue tags: +Needs tests
FileSize
1.59 KB

I think this is roughly what we are looking at, some tests definitely need to be adjusted but for the most part things seem to work. My focus for today is to make sure we can handle library/CSS/JS changes via hook_library_info_alter(), and of course templates as well.

If someone wants to look into the test failures that would be helpful :)

star-szr’s picture

Oops. I had named it Safe before as a temporary name.

The last submitted patch, 2: add_a_stable_base_theme-2575421-2.patch, failed testing.

star-szr’s picture

We may want to consider adding a new property because if people are just checking isset($info['base theme']) or similar I'm not sure what we can do.

The last submitted patch, 3: add_a_stable_base_theme-2575421-3.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 5: add_a_stable_base_theme-2575421-4.patch, failed testing.

The last submitted patch, 2: add_a_stable_base_theme-2575421-2.patch, failed testing.

The last submitted patch, 3: add_a_stable_base_theme-2575421-3.patch, failed testing.

The last submitted patch, 5: add_a_stable_base_theme-2575421-4.patch, failed testing.

star-szr’s picture

Status: Needs work » Needs review
FileSize
7.94 KB
4.39 KB

Work in progress.

Status: Needs review » Needs work

The last submitted patch, 11: add_a_stable_base_theme-2575421-11.patch, failed testing.

davidhernandez’s picture

Issue tags: +Needs change record
+++ b/core/themes/stable/stable.info.yml
@@ -0,0 +1,7 @@
+description: 'Shelter from the Wild Wild West.'

Love the description.

Why are the libraries being moved to Classy?

star-szr’s picture

@davidhernandez that's just a test, proof of concept. But in principle that is what we would do because Classy does not extend from Stable.

The reason for that is to make it easy to remove the BC layer (Stable) when the time comes. The downside is copy and pasting.

lauriii’s picture

Status: Needs work » Needs review
FileSize
30.65 KB
2.63 KB

Pair coding FTW!!

davidhernandez’s picture

I still don't understand the "remove the BC layer later" argument. Aren't we talking about D9? When we start working on 9 we're going to want to update all the Classy templates, libraries, etc anyway.

lauriii’s picture

Drupal 8 will have LTS release at some point. After that we are allowed to remove BC layers and that way break the BC.

Status: Needs review » Needs work

The last submitted patch, 15: add_a_stable_base_theme-2575421-12.patch, failed testing.

star-szr’s picture

Status: Needs work » Needs review
FileSize
10.51 KB
691 bytes

This should fix some fails.

Just to be clear all the moving around of CSS and JS and stuff won't end up here but I'm not sure where else to put that stuff. Seems easier to just keep it together temporarily for a short while.

Status: Needs review » Needs work

The last submitted patch, 19: add_a_stable_base_theme-2575421-19.patch, failed testing.

The last submitted patch, 11: add_a_stable_base_theme-2575421-11.patch, failed testing.

The last submitted patch, 15: add_a_stable_base_theme-2575421-12.patch, failed testing.

The last submitted patch, 19: add_a_stable_base_theme-2575421-19.patch, failed testing.

star-szr’s picture

Status: Needs work » Needs review
FileSize
9.71 KB
2.72 KB

Certain things are quite tricky and it might be easier to just copy everything over to Stable, otherwise things get risky if we start pulling things out.

In other words I should listen to @davidhernandez, he knows what he's talking about :)

We started a doc to go over what things might change and if/how we can support BC with those changes.

This should be less faily still (and make less changes), but not yet green.

RainbowArray’s picture

  1. +++ b/core/core.libraries.yml
    @@ -199,8 +199,6 @@ drupal.dropbutton:
    -    theme:
    -      misc/dropbutton/dropbutton.theme.css: {}
    

    Moving this seems out of scope for this issue?

  2. +++ b/core/modules/system/tests/themes/test_wild_west/test_wild_west.info.yml
    @@ -0,0 +1,6 @@
    +description: This theme has been built by a crazy themer who wants to be wild and not use the Stable theme.
    

    Let's find a different word from crazy here.

  3. +++ b/core/themes/classy/classy.theme
    similarity index 100%
    copy from core/misc/dropbutton/dropbutton.theme.css
    
    copy from core/misc/dropbutton/dropbutton.theme.css
    copy to core/themes/classy/css/system/dropbutton.theme.css
    
    similarity index 100%
    copy from core/modules/toolbar/js/toolbar.js
    
    copy from core/modules/toolbar/js/toolbar.js
    copy to core/themes/classy/js/toolbar/toolbar.js
    

    I don't understand why these changes are in this issue.

I guess that dropbutton is being moved to both stable and classy. But I'm not sure why that's in this issue.

star-szr’s picture

Status: Needs review » Needs work

@mdrummond proof of concept only, won't be in the final patch. Not in the mood to create a separate issue and manage combined patches, sorry for the confusion.

RainbowArray’s picture

I think it's worth considering setting the base theme of Classy to Stable.

Otherwise any BC layer protections we put into Stable may also need to be copied to Classy, except sometimes they won't, because Classy will often have its own copies of templates. So any issues that would need a Stable update will require a lot of manual evaluation to see if they need to be updated in Classy as well. Much better to make Classy depend on Stable, and then we won't need to worry about that hot mess.

star-szr’s picture

Status: Needs work » Needs review
FileSize
76.71 KB
644 bytes

Fixes #25.2.

The last submitted patch, 24: add_a_stable_base_theme-2575421-24.patch, failed testing.

The last submitted patch, 24: add_a_stable_base_theme-2575421-24.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 28: add_a_stable_base_theme-2575421-27.patch, failed testing.

The last submitted patch, 28: add_a_stable_base_theme-2575421-27.patch, failed testing.

Sam152’s picture

This is an very interesting. Out of interest are there any cases we've seen during previous release cycles where we've been blocked from adding functionality due to the limitation of having to keep markup the same? It would be handy to evaluate those cases to see what kind of functionality or enhancements you would be missing out on if you chose to extend 'stable'.

Could an alternative be to keep all the templates in core stable, and provide markup enhancements in classy, acknowledging there will be markup changes between point releases? From a semantics perspective it makes more sense to me that a theme you are extending would evolve and change over time vs extending no theme at all. Could also be less disruptive for existing themes.

star-szr’s picture

Status: Needs work » Needs review
FileSize
10.51 KB
3.56 KB

Edit: Just trying to fix the tests. I don't think we want Stable to be the default if someone is using another template engine such as Nyan Cat.

star-szr’s picture

Status: Needs review » Needs work

Also in #28 I definitely forgot to rebase.

LewisNyman’s picture

It would be handy to evaluate those cases to see what kind of functionality or enhancements you would be missing out on if you chose to extend 'stable'.

I think the idea here is that stable would block improvements to existing HTML+CSS. This includes simplifying existing CSS components, improving performance, etc. If a new feature was added (behind an experimental module) then Stable and Classy would also gain templates.

From a semantics perspective it makes more sense to me that a theme you are extending would evolve and change over time vs extending no theme at all.

It needs to be very clear that stable is stable mark up, no theme is not. There's still a lot of mark up and CSS in the default module output that we want to remove.

star-szr’s picture

Status: Needs work » Needs review
FileSize
6.53 KB
22.74 KB

Time to split things up I guess and make it less confusing: #2575737: Copy templates, CSS, and related assets to Stable and override core libraries' CSS

@Sam152 by the way I'm not ignoring you, just trying to move forward for now.

davidhernandez’s picture

Yeah, I'm beginning to think maybe we need to rethink this. We have to jump through so many hoops to get this to work and trick core into tricking itself. Should we instead flip the scenario? Leave core alone and just add an experimental base theme to core? Anything we want to change, CSS, JS, templates, we move into the base theme. It is a lot easier to make the theme override core than have core change and make the theme put it back.

This at least puts the burden on the experimental base theme and not on core or people looking for stability. If CSS ordering changes slightly in the experimental theme, so what. If there is a slightly unexpected consequence for something we do, so what. You are using the wild west theme. Put that burden on the group that is best able to deal with it.

I don't see any difference from a BC perspective, because we have to maintain BC for any internal code we write anyway. And when we start working on 9, we just move what is in the experimental theme into core. I don't see the obsession with just deleting Stable. We have to do a lot of other things to remove the BC layer. This way at least all our changes are in one place and we can keep track of what we've been doing, and probably why.

The last submitted patch, 34: add_a_stable_base_theme-2575421-33.patch, failed testing.

Sam152’s picture

If I were to name such a theme, I'd call it something like 'evolutionary' instead of 'experimental'. It clearly describes that things gradually change for the better and doesn't imply that things are potentially broken or untested.

LewisNyman’s picture

Should we instead flip the scenario? Leave core alone and just add an experimental base theme to core? Anything we want to change, CSS, JS, templates, we move into the base theme. It is a lot easier to make the theme override core than have core change and make the theme put it back.

This does not solve the problem IMO. The aim here is to be able to continue to evolve Drupal's default mark up. That is the baseline that we want to strip bare so in the future we can build anything we want off of core, without any default output.

If we add a theme that continues to remove mark up and CSS, we are effectively putting mothership in core. There's no point in having an experimental theme in core. It might as well be contrib like mothership is now, it can evolve even faster there.

davidhernandez’s picture

Yes, adding mothership into core is exactly the point. It sandboxes the changes. The problem is no matter what we do we have to maintain backwards compatibility, and maintain it for the largest percentage of our user base. The changes we make can only be seen by a smaller percentage of the user base, so what difference does it make where those changes live? If we try to make Stable work we are essentially creating the anti-mothership in core which it seems is a lot more difficult to make work. If we instead add a theme where the improvements happen, we can do everything in a Drupal way and it doesn't require any theme system funny business on the backend to make work.

We'd also have the advantage over a contrib theme of being able to do things you can't do in contrib. Instead of doing certain things in preprocess to say add a template variable, we can just add that directly in core. If there are core changes needed to make certain things work in the experimental theme, we can do them, as long as we maintain BC which we would have to do anyway. The whole problem isn't the changes, it's the BC.

LewisNyman’s picture

I am not sure that I understand the problems of having a theme that adds stuff on top of core? Isn't this what we do already in Classy? Is there a good example of the code we would have to right to get stable working as we want that is really tricky?

If we can manage to keep core clean and add stuff in stable/classy that would be idea, because the whole idea behind stark->classy instead of stark->bleach is that it's easier to add stuff on top of a clean base rather than take stuff away. I'm thinking about a crazy hook where we have to modify render arrays to remove one class or div.

The last submitted patch, 34: add_a_stable_base_theme-2575421-33.patch, failed testing.

davidhernandez’s picture

Adding stuff on top is the easy part. If we just want to change the page template, and that requires putting the old copy in Stable, that's no big deal. The problem is all the other things we have to account for.

For example, if someone extends a template:

{% extends "@block/block.html.twig" %}

If the block template changes, we have to do more than copy it to Stable. We have to make sure these extends and includes still return the same template as before, which has been moved to Stable. Even if we get that to work, which is really tricky, I don't know how we account for someone wanting to get the new block template from the block module. (Extend @block, no really, I mean the real one not the fake one.) Adding that same extends line would presumably return the Stable template. That would be a giant WTF.

The same goes for macros, which I just thought about, which are done with includes. If you use a core macro like from the menu template and then we change how the macro works, we need to provide the old one for you. This is serious funny business behind the scenes.

And that is just for templates. We have to do the same thing for libraries and assets. If you remove system.admin.css with stylesheets remove, and later we decide we want to split that file up into components, we have to make sure that removal line still removes all the individual components. Or system.admin.css gets moved to Stable and we make the stylesheets-remove recognize that file with a library alter, but how do we account for the CSS we added in system as separate files? Only enable the library if you aren't using Stable? I don't even know how that would work if you use core directly. I guess we have to check if you have base theme set to false and then conditionally add the library? This is a lot of complexity and unpredictability we are adding to what the api essentially produces. It all makes my head spin, and makes me think we are over-engineering when we could just do it the other way. And doing it the other way means using all the tools core provides, the way they were intended to be used, in a way that is a lot easier to understand for everyone.

Also, the biggest worry I have is that we're trying to do this right before release without enough time to let the idea digest and without much testing, and without realizing all the scenarios we aren't realizing yet. I just thought of the old template versus new template thing, for example. I don't want to see us collectively put our faces in our hands six months from now and go, "oh, what the fuck did we do?"

But if we reverse it, there seems like very little risk. We don't have to make changes to core, we don't need behind the scenes magic, and we don't have to care as much about the BC implications. If we make a breaking change in the experimental theme, too bad. Deal with it. You should only be using that if you know what you are doing. You are chasing the cutting edge of core. We have free range to do whatever we want with any breaking result. We can figure out what works, what doesn't, mistakes we make we can reverse later. I think it also gives us more justification to add other base themes. Say we do decide to add some kind of bootstrap base theme. That is a lot easier to do as its own thing than try to make core bootstrap compatible and undo all those changes in Stable. That gives us a lot more flexibility, with less risk, than constantly trying to reverse engineer core for BC every time we want to do something new.

davidhernandez’s picture

Just thinking this though some more. The only way to account for the problem with extending the templates is to copy all templates to Stable. (which was one of the ideas from the Barcelona meeting) So the not copy all templates option I was hoping for seems undoable. If we did that we'd have to get everyone used to the pattern of always extending/copying/including/etc from Stable as the default for documentation and everything. We are otherwise making things very confusing. In the same vein we'd have to copy all libraries and assets to Stable as well. We can't tell anyone to extend @block or @system. Only extend @classy or @stable or shit will break.

(I'm working my self in circles)

I think we are in all or nothing territory. If we do Stable we have to put absolutely everything in core in it and make it work for release. Or we add an experimental theme that we don't have to deal with right now and can add to later.

Does anyone see a workable middle ground that is future proof?

davidhernandez’s picture

That would also mean Classy would have to extend Stable. I don't think we are getting around that unless we copy everything to Classy as well which seems wasteful.

markhalliwell’s picture

Version: 8.0.x-dev » 8.1.x-dev
Category: Task » Feature request
Priority: Major » Normal

I'm really not trying to be negative here, but I'm seriously perplexed as to what this issue is really attempting to "solve".

Introducing a "stable base theme" in an attempt to fix the underlying issues and crux of the current "theme system" is almost laughable. This process, continuing to band-aid themes and the theme system in core, will almost certainly be doomed for failure (no matter really which direction is taken here) just due to the very nature of the existing cruft.

In fact, I find it rather amusing and quite sad that this community continues to focus or start very trivial issues when it comes to the "theme system" (class names, markup and css "perfection"). Theme BC breaks is really just a symptom of a much larger issue: a very, very broken/antiquated "theme system".

Core should not introduce something that:

  1. Has not been tested/proven in real world use cases/workflows (e.g. that is what contrib is for). Sure things always sound good on paper, but real sites and real workflows often tell a different story. We shouldn't be adding theories to core, especially this close to an RC/stable release, no matter how "good it may sound".
  2. Adds more complexity to an already complicated "theme system" without first attempting to actually fix the theme system in the first place.
  3. Is marked as a "major task" when it has, in fact, always been an issue for themes (i.e. this is not a new problem).... let's be real, this is adding new functionality and is really a feature request.

I'm not saying that this is a "bad direction", but rather this needs some serious thought and practical use-case data behind it. As such, I'm moving this to 8.1.x (tempted to even say 9.x considering that this is actually a radical shift in how we approach themes, css, markup and JS) and marking it as a feature.

There's other ways to fix this problem, namely replacing the theme system with something that actually works in the first place. Shoving things in just so we can get around that pesky "BC" rule seems like a huge and massive RED FLAG.

P.S. I know this issue is a result of the meeting that was held, I was invited, but could not attend and would have brought all this up then.

RainbowArray’s picture

Version: 8.1.x-dev » 8.0.x-dev
Category: Feature request » Task

I think there are better ways to respond to this issue than to call the work that's being done to get Drupal 8's front-end polished and ready "amusing", "sad", and "trivial."

There will be plenty of ways we will continue to evolve Drupal's theme system in D8 feature releases leading up to Drupal 9. The fact that more needs to be done in no way negates the incredibly good work that is being done. I completely disagree that the work that has been done to improve Drupal's default markup, CSS and JS is trivial That has been a continual hassle when theming Drupal sites, and the work that's being done is going a long way to make that better. I'd love to see further improvements down the line, like an OO rendering system that eliminates a lot of the mysteries involved with render arrays. For now, though, we can work to make tangible improvements.

We are making progress on cleanup work, but the concern has been, what do we do when the music stops, and most front-end assets are frozen? If we haven't finished the cleanup work on markup and CSS in particular, is there a way to continue to make improvements going forward?

I think in theory the Stable theme is a decent answer to that. If somebody likes Drupal theming to start with a fair amount of default classes (which are hopefully more sensible than before), then they can use Classy as a base theme, and we'll guarantee backwards compatibility for those who do so. However, if somebody wants to start from a clean base with only the few functional classes necessary for Drupal's admin tools (primarily), what then? If they use core's default markup and CSS, then we need to guarantee that markup and CSS stays pretty much the same to guarantee backwards compatibility. If instead we could use a Stable theme as our backwards compatibility layer, then we can continue to make improvements to the default markup and CSS in core.

It does seem like Stable may more challenging than expected. I think ideally Stable would start as a blank slate, with almost no templates and CSS. We would only move templates and CSS to Stable once they're actually needed, because we changed something in core. I think ideally Classy would also be based off Stable, so that we don't need to make BC changes to both Stable and Classy.

My understanding is that the two concerns for doing something like that are:

1) If we provide a CSS file in Stable, it may load in a different order than it would have in core, which could cause unintended side effects. That makes sense because theme CSS loads after module CSS by default (at least that's my understanding).

2) If we add a template to Stable, and it extends a template in core, or a template in core extends that template, will the @extends break? My memory was that we already did something so that extends takes into account which version of a template is loading, whether that is from the original module, a theme or a subtheme. If that's not the case, we have larger problems with extends.

My understanding is that the suggested solution to items 1 and 2 is to provide copies of all templates and CSS in core in Stable. That does seem like a fair amount of overhead. Again, though, I'm not sure if item 2 really is a problem.

I do think it's worth thinking about what we're actually getting out of the Stable layer. Yes, we could change markup and CSS in core, but to what end? I don't think it would be wise to base a theme on core markup if we're changing it regularly, unless you want to update your theme all the time. I also don't think you could remove the Stable theme prior to Drupal 9, as if we've made significant changes in core, then that would be a pretty big BC break. I suppose at some point you could say, well, now we're guaranteeing no BC breaks for core markup and CSS. Then it's a little confusing that core markup/CSS is stable, but so is the Stable theme, only with more problems.

It does seem that if what we really want is an even more more clean version of core front-end assets, then adding a Cleaner theme in 8.1 or 8.2 might be a simpler solution.

I do think we should keep this issue active for 8.0.x: the bits of this patch that define what happens if no base theme is defined seem worth keeping no matter if we add a Stable theme or not. I sort of think we might even want to define the default theme as Classy. That's more in line with how Drupal markup has worked in the past. I personally am a big fan of removing a lot of the default classes, but I do think that's the more advanced scenario for Drupal theming, and we should consider making the default something that works well for the 80% rather than the 20%.

Finally, while I think we shouldn't close this right now, I also think it makes sense to put the bulk of our efforts into finishing the last theme cleanup issues before RC1. I think there's a lot we can still accomplish if we can work together. I also think that means working together respectfully. I think it's awesome all the work people have been doing together. Let's keep that cooperative spirit going through the end of the time where we can make the biggest influence on Drupal 8's front end.

davidhernandez’s picture

Priority: Normal » Major

Yes, I believe it was agreed that this is a "try to figure out if there is something we can do before release" issue. We ultimately may not find a working solution, but we aren't punting the discussion or attempts. And to bolster what Marc said, literally laughing at people that are working very hard to find a solution to a problem that has plagued us for a long time is disrespectful and unproductive. We may not come up with a perfect answer, but there is no telling what we'll learn or come up with until we try. Even wrong paths are valuable in teaching us what direction not to take, and the more we push the system the more we learn about what needs addressing. Just discussing this problem forces us to understand the system better and the different ways the api may be leveraged.

Regarding #49-2, if someone extends a template and lets the theme system discover the correct template (from within the theme, up to the base theme, or on up to core,) I believe that process is working correctly and would pull the correct template. But using extends/include you can specify where to retrieve the template. If someone extends a core template directly, to maintain BC, we'd need to still provide the old version of the template. This particular scenario is poking holes in the Stable idea, since I don't think there is a way we can provide the old for those that want it and the new for those that want that instead. We need clear, predictable separation. We also have some similar problems with CSS. The ordering is one problem, but themes can also target assets directly with stylesheets-remove and library alter. So the problem of how to interpret the intention of the themer is the biggest problem in making any BC work right.

LewisNyman’s picture

If a custom theme did stylesheet-remove: css/system.js.css then this would break if we moved this theme into Stable right? It would require stylesheet-remove: @stable/css/system.js.css

davidhernandez’s picture

I don't think the generic removal lines even work any more. We had to change that a while back to specifying the exact location of the file or using a placeholder.

So either this:

stylesheets-remove:
  - core/modules/toolbar/css/toolbar.icons.theme.css

or this:

stylesheets-remove:
  - @toolbar/css/toolbar.icons.theme.css

In any case, the above methods work. So if at some point we change the toolbar CSS in this file, we'd have to move the file to Stable. But these remove lines are still pointing to the file in the toolbar module, and a new file in Stable gets loaded in the page because it isn't being removed. Also, if we renamed the file to toolbar.icons.css, the file being removed disappears and a new file starts showing up.

We have an even bigger problem if we try to continue splitting up the files into components. system.admin.css is on that list to be broken up. If an admin theme removed that file and then we split it up into ten separate files, how do we keep it working the same as before?

catch’s picture

There's an issue somewhere to provide ids for files in libraries, which would help with that problem.

Even if we had ids though, it'd still be an issue if one file gets split into 3. I think we could look at providing aliasing within the library system, so that you specify the old file and an array of new files, and stylesheets_remove on the old file still works.

Alternatively we can state explicitly that the location of files in the filesystem is @internal and don't use stylesheets_remove unless you're prepared to update. We've said similar for hook_form_alter() already.

Just a note I'd originally wanted to do this with a module rather than a theme. That could help with css ordering, and templates could still move to the theme.

On triviality while individual markup changes might be small, something like a field template can have a large effect on page weight overall, which in turn affects bandwidth, dom size, rendering time. And it does that for every request to every Drupal site (that hasn't overridden the template).

Making the change directly in core means that people copying templates will copy the up to date one etc. so I think that's worth pursuing if we can.

star-szr’s picture

For what it's worth so far CSS ordering has not been an issue whatsoever, hook_library_info_alter() provides a fair amount of flexibility there. Tested it on #2575737: Copy templates, CSS, and related assets to Stable and override core libraries' CSS, I realize it's only one example.

For stylesheets-remove and also Twig template overrides (you can include/extend etc. with a namespace like @system) I think things get less complex if we copy everything into Stable. Should we talk about that option some more?

I think we should get together on a hangout to discuss again the pros and cons of our different options here in various aspects. Stability, maintainability, DX/TX, amount of work short term and long term, etc.

catch’s picture

I think we should copy everything to Stable, seems like whatever happens that will be less work than trying not to.

Just to note if Stable turns out to be very difficult to implement, we also just discussed documenting that anyone not using Classy or another base theme should copy core templates to their own theme as part of the theme creation process. That's still an option if this doesn't work out I think.

RainbowArray’s picture

I think if the alternative to Stable not working is everybody needs to copy templates to their own theme, I think we're better off just copying all the templates (and css if necessary) to Stable. Templates hide in a remarkable number of places, and asking everybody who wants to use the clean markup that core provides to dig into all those nooks and crannies to copy everything manually seems wrong.

I really love what we've achieved in terms of cleaning up Drupal's markup, and providing an option for a clean base. Something like Stable makes a ton of sense as a way to make it easier and more reliable to achieve that.

Yes, copying things over means a little more work changing things in multiple places going forward, but it also gives us the freedom to continue to evolve core markup throughout the D8 cycle.

I'm all for a hangout to discuss this if necessary. Before we decide to do that, though, are there any strenuous objections to the "copy everything and be done with it" approach? If not, let's just do that. Time is short before RC1, would love for this to move forward.

If we do copy everything, we will need to decide if we do what we've done with Classy in terms of organizing templates into grouped folders. I think it's worthwhile being consistent with Classy, and a folder with a hundred some templates in it isn't very friendly, so I'd go for using the same grouping we use for Classy.

I'd also still suggest that we change Classy to use Stable as its base, to reduce maintenance on Classy going forward. Any thoughts on that particular change, catch (or anything else)?

RainbowArray’s picture

Status: Needs review » Needs work

Discussion from today's front-end hangout:
- Copy all templates, CSS, JS and library definitions into Stable
- Stable should be the default theme if no base theme is set (too big a change to switch that now)
- Classy should use Stable as a base theme to minimize maintenance

LewisNyman’s picture

If we move everything to Stable, then there is nothing left in core to evolve and improve? I'm not sure what the benefit is. Why not just move everything we would want into Classy in the remaining time?

davidhernandez’s picture

Replace move with copy. The same way Classy has copies of core templates, but core still has its templates.

RainbowArray’s picture

Think of Stable as if we froze Drupal core's front-end assets in carbonite.

In Drupal 9, Boussh shows up, frees Stable from carbonite, except Stable wakes up refreshed because we've done lots of work behind the scenes to have everything fresh and cleaned up.

Or... something like that.

We still want to get everything we can done before RC1. Stable is just a really big boost so we can keep working behind the scenes after RC1.

RainbowArray’s picture

Assigned: Unassigned » RainbowArray

I'm going to start working on copying all core templates, CSS and JS into Stable. Hopefully my next patch can be titled Attack of the Clones.

davidhernandez’s picture

@catch

There's an issue somewhere to provide ids for files in libraries, which would help with that problem.

Do you know what issue that is?

davidhernandez’s picture

@catch

There's an issue somewhere to provide ids for files in libraries, which would help with that problem.

Do you know what issue that is?

RainbowArray’s picture

This adds all core templates to the Stable theme.

RainbowArray’s picture

FileSize
200.36 KB
461 bytes

This fixes the use of @extends within Stable. Only one thing that needed fixing. I'll need to check all other core themes as well though.

RainbowArray’s picture

FileSize
48.03 KB
0 bytes

This fixes the other usages of extends in other core themes and also sets Classy's base theme as Stable.

RainbowArray’s picture

FileSize
1.27 KB

Corrected interdiff.

RainbowArray’s picture

FileSize
118.72 KB
71.45 KB

This adds in all the CSS and JS and adds the library definitions to Stable, including path changes in the libraries.

RainbowArray’s picture

Assigned: RainbowArray » Unassigned

Passing this over to Cottser now, who is going to work on the libraries alter work so that Stable is replacing core's library definitions with Stable's definitions. Or at least that's how I understand it. Would be nice if the libraries override patch went in. Might make that part loads easier.

star-szr’s picture

Assigned: Unassigned » star-szr

Yup for sanity we may have to block this on (or temporarily combine patches with) #2451411: Add libraries-override to themes' *.info.yml. Thanks a million @mdrummond!

RainbowArray’s picture

FileSize
127.47 KB
8.57 KB

One thing I also wanted to do was add default blocks for the Stable theme in the standard profile in order to provide a more sensible starting point, and for there to be actual content on the page should somebody make Stable the default. So this does that. This is a mix of Stark's blocks with a few additions that seemed to make sense from Bartik, adjusting for which regions are available and such.

Also copied the logo and screenshot from Stark into Stable.

RainbowArray’s picture

Added similar blocks to Classy in #2578429: Enable blocks in Classy.

star-szr’s picture

Overall things seem to be working well with libraries-override. Some (relative) paths to images and assets specified in CSS need to be adjusted with this approach. The drupalSettings library has some things hardcoded that expect it to live within core so I am leaving that there.

I may not include the changes from #71, I'm doing some testing now but IMO they are not necessary for MVP.

I'll post a patch and interdiff on this issue once it's in better shape.

star-szr’s picture

Status: Needs work » Needs review
FileSize
181.81 KB
53.13 KB

Upon further inspection there are definitely some problems. Libraries override is not working how I'd expect it to: it's not maintaining the position of assets that are being overridden. So this results in Stable assets coming after Bartik's and Seven's which is very bad indeed. Despite that, here is a work in progress.

This combines the latest patch from #2451411: Add libraries-override to themes' *.info.yml and is based on #68 for the time being to keep things more focussed from my perspective. The interdiff is from #68 and does not show the application of the patch from #2451411: Add libraries-override to themes' *.info.yml.

star-szr’s picture

And just to note that based on the above a direct hook_library_info_alter() approach may unfortunately be more viable at this point.

Status: Needs review » Needs work

The last submitted patch, 74: add_a_stable_base_theme-2575421-74.patch, failed testing.

The last submitted patch, 74: add_a_stable_base_theme-2575421-74.patch, failed testing.

RainbowArray’s picture

davidhernandez’s picture

@Cottser, I assume it is ordering the assets based on how the theme would do it regardless of its original placement? It kind of makes sense now that the theme assets are intermingling. To correct for that maybe we need to adjust the weight of the assets or put them all in base category in their original implementation?

davidhernandez’s picture

FileSize
524.07 KB

I haven't tried replacing a library with a library, but if you replace a specific CSS file it does put it in the exact same place.

See attached screenshot where I replaced toolbar.icons.css with blah.css.

davidhernandez’s picture

I played with replacing a library with another. The dependancies were processed as they normally would be and ended up where they normally would. The CSS I added ended up where it normally would for a theme. Honestly, I can understand it working this way. Replacing one library with another can't work exactly the same way since you could be replacing anything with anything. I just replaced a library with several dependencies, javascript files, and multiple CSS files in different smacss categories by one CSS file. How would it determine what it is replacing and where it should go?

But it seems we could make this work asset by asset, which means Stable doesn't need libraries, just one giant libraries-override. Does that sound too daunting?

star-szr’s picture

Assigned: star-szr » Unassigned
Status: Needs work » Needs review
FileSize
182.84 KB

That makes some sense @davidhernandez, what I was proposing before was essentially replacing each individual asset but somewhat programmatically. But if we don't do the copies in a consistent manner that falls apart and that's been my stumbling block.

Here's a revert of the libraries patch now that it's committed, and I'll try to at least do a bit of the work towards the individual asset overriding. Going to be a very big info file.

star-szr’s picture

#82 is a bad patch, posting a better one shortly.

star-szr’s picture

The last submitted patch, 82: add_a_stable_base_theme-2575421-82.patch, failed testing.

The last submitted patch, 82: add_a_stable_base_theme-2575421-82.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 84: add_a_stable_base_theme-2575421-83.patch, failed testing.

The last submitted patch, 84: add_a_stable_base_theme-2575421-83.patch, failed testing.

star-szr’s picture

Status: Needs work » Needs review
FileSize
156.72 KB
29.27 KB

Something like this.

Status: Needs review » Needs work

The last submitted patch, 89: add_a_stable_base_theme-2575421-89.patch, failed testing.

The last submitted patch, 89: add_a_stable_base_theme-2575421-89.patch, failed testing.

star-szr’s picture

Status: Needs work » Needs review
FileSize
162.91 KB
6.33 KB

Some test changes, including the template change (whitespace modifier) from #2348729-62: Convert theme_views_view_field to twig. So potentially this could be a theme function override for now instead of template override.

A good chunk of what is remaining are upgrade path tests because Classy now relies on Stable. I probably won't be able to work on this in that capacity over the next few days so if someone knows (or wants to learn) how to work with the upgrade path tests that would be very helpful. Also in general this is exposing how a lot of our tests rely on Classy.

Status: Needs review » Needs work

The last submitted patch, 92: add_a_stable_base_theme-2575421-92.patch, failed testing.

The last submitted patch, 92: add_a_stable_base_theme-2575421-92.patch, failed testing.

RainbowArray’s picture

I think there's trouble with ThemeInitialization. getActiveThemeByName() is looking for base theme ancestors, and my guess is that it's getting thrown off because Stable is Classy's base theme, but it isn't declared. The default nature of Stable probably needs to be accounted for here and maybe elsewhere too.

RainbowArray’s picture

RainbowArray’s picture

Status: Needs work » Needs review
FileSize
1.25 MB
5.17 KB

Checking if we explicitly define stable as the base theme for Classy if that fixes some of the test failures.

Also some of the test failures are due to checking for specific paths for JS and CSS files, which are different now that they are being loaded in Stable. So a few fixes for that.

Status: Needs review » Needs work

The last submitted patch, 97: 2575421-97-add-stable-theme.patch, failed testing.

RainbowArray’s picture

Status: Needs work » Needs review
FileSize
391.88 KB
389 bytes

Specifically declaring Stable as the base theme for Classy does not fix the errors at all.

Also, turns out if you forget to do git diff -C, the patch gets really really really big.

Status: Needs review » Needs work

The last submitted patch, 99: 2575421-99-add-stable-theme.patch, failed testing.

The last submitted patch, 97: 2575421-97-add-stable-theme.patch, failed testing.

star-szr’s picture

Status: Needs work » Needs review
FileSize
6.53 KB

Scaling back for the time being to get things ready for RC, we can do the copying/overriding/etc. in a separate issue as per discussion on IRC with @catch and @webchick.

This is just a repost of #37 for now. Next, upgrade path things.

star-szr’s picture

Assigned: Unassigned » star-szr

Just so we're clear I'm working on the upgrade path bits. If you want to help ping me in IRC, #drupal-contribute or #drupal-twig :)

RainbowArray’s picture

Change record drafted at https://www.drupal.org/node/2580687.

Bojhan’s picture

@mdrummond I changed the change notice a little to make it more scannable. Let me know if this is correct.

RainbowArray’s picture

@Bojhan: Looks good. I made a few minor edits, but looks solid.

star-szr’s picture

Needs upgrade path tests still but I've manually tested this both ways.

The last submitted patch, 99: 2575421-99-add-stable-theme.patch, failed testing.

star-szr’s picture

Failing/passing upgrade path tests (wasn't so bad!) :)

star-szr’s picture

Oops one minor thing.

joelpittet’s picture

  1. +++ b/core/lib/Drupal/Core/Extension/ThemeHandler.php
    @@ -282,6 +283,11 @@ public function rebuildThemeData() {
    +      if (empty($theme->info['base theme']) || $theme->info['engine'] != 'twig') {
    +        unset($theme->info['base theme']);
    +      }
    

    Should we be removing the base theme if it's not twig? That seems a bit extreme, other engines may have base theme support.

  2. +++ b/core/themes/stable/stable.info.yml
    @@ -0,0 +1,7 @@
    +name: Stable
    +type: theme
    +description: 'Shelter from the Wild Wild West.'
    

    Sure hope we can hide these base themes or at least demote them somehow in the UI.

The last submitted patch, 109: add_a_stable_base_theme-2575421-109-testupgradepath.patch, failed testing.

RainbowArray’s picture

Based on IRC discussion, suggest we change the theme description to something like 'A default base theme using Drupal 8.0.0's core markup, CSS, and JavaScript.'

This makes it a little more clear as to why you might use Stable as a base theme.

lauriii’s picture

  1. +++ b/core/lib/Drupal/Core/Extension/ThemeHandler.php
    @@ -282,6 +283,11 @@ public function rebuildThemeData() {
    +      if (empty($theme->info['base theme']) || $theme->info['engine'] != 'twig') {
    

    I think we have to set the default only when theme engine is Twig. This logic seems wrong because it unsets base themes always when theme engine is not Twig

  2. +++ b/core/modules/system/src/Tests/Theme/StableThemeTest.php
    @@ -0,0 +1,70 @@
    +  public static $modules = ['system'];
    

    Docs are missing.

  3. +++ b/core/modules/system/src/Tests/Theme/StableThemeTest.php
    @@ -0,0 +1,70 @@
    +    $this->assertTrue(empty($base_themes), 'No base theme has been set.');
    

    Nit: This could be "No base theme has been set when theme has opted out of using stable"

  4. +++ b/core/modules/system/src/Tests/Update/StableBaseThemeUpdateTest.php
    @@ -0,0 +1,54 @@
    +    $theme_handler->refreshInfo();
    

    We could explain here why this is necessary because it might seem wrong when first looking at this

lauriii’s picture

+++ b/core/lib/Drupal/Core/Extension/ThemeHandler.php
@@ -282,6 +283,11 @@ public function rebuildThemeData() {
+      // Remove the default Stable base theme when 'base theme: false' is set in
+      // a theme .info.yml file or the Twig templating engine is not being used.
+      if (empty($theme->info['base theme']) || $theme->info['engine'] != 'twig') {
+        unset($theme->info['base theme']);
+      }

Actually I feel like removing this completely. I think this should remain the same by default for all engines. There shouldn't be technical limitation for using theme using other engine as base theme

RainbowArray’s picture

This addresses points 1 and 3 in #115. Not entirely sure what I did for #1 is correct.

star-szr’s picture

This addresses everything from #111, #113, and #114, except for:

#111.2 is covered by #2574975: Allow (base-)themes to be excluded from the UI (e.g. blocks, Appearance)..

Interdiff is from #110, sorry @mdrummond. I did incorporate one wording change from your patch as well :)

star-szr’s picture

Issue summary: View changes
star-szr’s picture

Issue summary: View changes

The last submitted patch, 116: 2575421-115-add-stable-base-theme.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 117: add_a_stable_base_theme-2575421-117.patch, failed testing.

The last submitted patch, 109: add_a_stable_base_theme-2575421-109-testupgradepath.patch, failed testing.

The last submitted patch, 110: add_a_stable_base_theme-2575421-110.patch, failed testing.

The last submitted patch, 116: 2575421-115-add-stable-base-theme.patch, failed testing.

The last submitted patch, 117: add_a_stable_base_theme-2575421-117.patch, failed testing.

RainbowArray’s picture

PIFR makes this looks much worse than it is due to rando AWS fails.

Looks to me like only two real fails. Trying to add base theme: false in case that helps, although I don't know if that's the real fix that's needed here.

star-szr’s picture

Yup those are the right changes, plus rolling back this misplaced one that I did too quickly earlier. Thanks @mdrummond!

star-szr’s picture

Some tweaks after self review.

joelpittet’s picture

Status: Needs review » Reviewed & tested by the community

Tested locally and passes as it did in #126. @Cottser's self review caught all the nitpicks. Concerns were addressed in #117 and fails #126

Reviewed the code and the tests and everything seems copacetic.

The last submitted patch, 71: 2575421-71-add-stable-theme.patch, failed testing.

The last submitted patch, 71: 2575421-71-add-stable-theme.patch, failed testing.

star-szr’s picture

Issue summary: View changes

Noting where a failing/passing upgrade path test can be found in the IS and other IS updates.

catch’s picture

+++ b/core/modules/system/system.install
@@ -1808,5 +1808,18 @@ function system_update_8011() {
+}

Shouldn't info['base theme'] always be set to either something else, stable, or explicitly to FALSE? The isset() looks like it could hide errors.

Similarly, is the theme info guaranteed to be up to date here?

star-szr’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
11.21 KB
777 bytes

Thanks @catch this should address #133.

star-szr’s picture

alexpott’s picture

Status: Needs review » Needs work
  1. +++ b/core/lib/Drupal/Core/Extension/ThemeHandler.php
    @@ -282,6 +283,11 @@ public function rebuildThemeData() {
    +      // Remove the default Stable base theme when 'base theme: false' is set in
    +      // a theme .info.yml file.
    +      if (empty($theme->info['base theme'])) {
    +        unset($theme->info['base theme']);
    +      }
    

    Given we're dealing with Yaml here I think this should be === FALSE

  2. +++ b/core/modules/system/system.module
    @@ -906,6 +906,11 @@ function system_get_info($type, $name = NULL) {
    +        // Remove the default Stable base theme when 'base theme: false' is set
    +        // in a theme .info.yml file.
    +        if ($type == 'theme' && empty($info[$shortname]['base theme'])) {
    +          unset($info[$shortname]['base theme']);
    +        }
    

    I'm not sure that this is necessary. Doesn't this come from the data built by rebuildThemeData()?

star-szr’s picture

Thanks @alexpott!

It's possible that the system_get_info() change was only needed because things were cached when I was testing, I would be glad if that's the case. First patch just changes both to === FALSE. Second patch tries to not add the second hunk at all. Interdiff is for the second patch.

The last submitted patch, 137: add_a_stable_base_theme-2575421-137-false-only.patch, failed testing.

The last submitted patch, 137: add_a_stable_base_theme-2575421-137-false-only.patch, failed testing.

star-szr’s picture

Nice!

RainbowArray’s picture

Status: Needs review » Reviewed & tested by the community

Looks to me as if the feedback from catch and alexpott has been addressed. For what it's worth, I manually tested using Stable as a default theme. That works fine. I also created a subtheme of Stable, Schmable, and that worked well too. So back to RTBC.

RainbowArray’s picture

Status: Reviewed & tested by the community » Needs review

Oh, I forgot, the one thing that felt odd to me was that Stable doesn't have a screenshot or logo. So that looks broken. I think you could just copy over the screenshot and logo from Stark into Stable, and that would work just fine. Once that's in, I'll move this back to RTBC.

RainbowArray’s picture

Status: Needs review » Reviewed & tested by the community

I checked, and a subtheme of Classy with no logo in the subtheme folder also has a broken image icon. So this is no different. No screenshot is not the end of the world either. If we really want to tackle that, it can be done in a follow-up. Let's get this in.

alexpott’s picture

Ticking credit boxes for everyone who attended meeting in Barcelona to discuss the creation of this.

alexpott’s picture

We should also credit: emma.maria, webchick and mortendk who were also present at the meeting in Barcelona.

davidhernandez’s picture

It's gunna bug me if I don't ask. What exactly has been tested?

star-szr’s picture

@davidhernandez not sure if this will answer your question but we've tested the upgrade path automatically and manually. We've tested that themes do and don't inherit from Stable in the appropriate circumstances automatically and manually.

davidhernandez’s picture

Thanks.

emma.maria’s picture

Commenting to help with credit. Thanks all!!

catch’s picture

Patch looks great to me.

Observation with 'Stable' that I keep reading it as $table, this is not a problem except in issue titles - in context you can't possibly get confused.

Not committing just because I'm in the process of heading afk for a couple of hours.

webchick’s picture

Awesome, this looks like what we talked about. I think this is great because it gives front enders the choice between classful or classless markup, without coupling that choice with stability vs. wild west.

davidhernandez’s picture

Well, not until we get everything copied over. I assume we are clear to do that post RC?

webchick’s picture

Yes, until RC, core markup can still change.

davidhernandez’s picture

I'm saying after RC1 is released, which I assume is coming out tomorrow. This patch doesn't copy any of the templates or assets over. This isn't fully BC until that is done.

See #2575737: Copy templates, CSS, and related assets to Stable and override core libraries' CSS

webchick’s picture

Yes, sorry, I was agreeing with you. I meant "that's correct; we'll want to hold that patch until after RC, because up until RC markup can still change."

  • catch committed b75c57f on
    Issue #2575421 by Cottser, mdrummond, lauriii, davidhernandez,...
catch’s picture

Status: Reviewed & tested by the community » Needs work

Committed/pushed to 8.0.x, thanks!

This needs a follow-up to copy the templates/CSS over - CNW until that follow-up is opened (but let's do two issues for git history).

webchick’s picture

Status: Needs work » Fixed
mortendk’s picture

*puts my cowboy hat on*
... yes a very internal joke

Seriously this is awesome.

catch’s picture

yched’s picture

It's a bit unclear to me how Stark fits in the picture now that we have Stable ?

Also, Stark is the only core theme with a README.txt. If we now intend Stable and Classy to be the main base themes for actual uses by actual themes, we might want to make them at least as "inviting" as Stark by providing READMEs as well ?

yched’s picture

Also, from Stark's .info.yml :
"An intentionally plain theme with no styling to demonstrate default Drupal’s HTML and CSS. Learn how to build a custom theme from Stark in the Theming Guide"

Maybe we should update that, if Stark is not really intended to be a base theme anymore ?

(according to this graph attributed to @mortendk at the end of https://www.lullabot.com/articles/a-tale-of-two-base-themes-in-drupal-8-..., stark is only there for our test suite now ?)

mortendk’s picture

yched pretty much - stark is afaik dead, and is a leftover from D7
we should take the last step and remove it completely to make it clear for everybody

webchick’s picture

I thought stark remained as the way to see "naked" Drupal's markup, which will shift in 8.1, 8.2... whereas Classy/Stable won't?

joelpittet’s picture

@mortendk @webchick is correct, it's to see 'naked drupal core markup', though since we strongly discourage using Drupal core's markup directly (so we can change it). I'd suggest we use Stable to this end and relegate Stark to a test only theme. This will allow us to test core markup, and not encourage Stark's use.

yched’s picture

I'd suggest we use Stable to this end and relegate Stark to a test only theme

Not sure how disruptive that would be at this point, but big +1, that would make the "base theme landscape" way clearer :-)

mortendk’s picture

I'd suggest we use Stable to this end and relegate Stark to a test only theme

@joel & @webchick yup which means in reality stark is dead ;) long live stable

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

andrewmacpherson’s picture

Component: theme system » Stable theme

A stable component was recently added to the issue queue. Moving this issue there to make it easier to find. (I came looking for the back-story to stable.)