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

The theme named Stable was added to core to function as a default base theme, and backwards compatibility (BC) layer for Drupal 8. This purpose goes beyond simple themer preference for how to do things, which resulted in Classy. Stable will exist so that changes to core templates and CSS can continue to happen after release. This information is not widely known and is a paradigm shift from previous version of Drupal.

To make it clear to anyone that might theme Drupal 8, we should add a README.txt file to Stable explain why it exists and how to use, or not use, it. It does not have to contain incredibly detailed information, but at least make people aware of the BC layer, what happens if you don't use it, and where to get more information. (We can point to the d.o theming guide.)

I put this in documentation, since Stable is not currently listed as a Component.

Comments

davidhernandez created an issue. See original summary.

catch’s picture

Issue tags: -rc target triage +rc eligible
davidhernandez’s picture

Status: Active » Needs review
StatusFileSize
new1.11 KB

Here is some text to get it started.

anil280988’s picture

StatusFileSize
new1.61 KB

@davidhernandez
Added few lines to the file. Kindly see if its fine.

Status: Needs review » Needs work

The last submitted patch, 4: add_readme_txt_file_to-2612618-4.patch, failed testing.

anil280988’s picture

Status: Needs work » Needs review
StatusFileSize
new1.21 KB

Recreated the patch.

davidhernandez’s picture

Status: Needs review » Needs work

Thanks, Anil. I don't think the headings are actually necessary. Since the readme is in Stable's directory, it should be obvious that it will only contain information about Stable. The "About Drupal Theming" heading is separating that section and link completely from the other text, which I wouldn't want to do. Also, I don't think we would use all caps headings like that.

anil280988’s picture

@davidhernandez
I have added Heading in accordance with other themes README files, to maintain similar format. As in Stark theme ReadMe file, there are heading in Caps, so it keeps Uniformity.

davidhernandez’s picture

Fair enough. I see what you mean. We have some definite inconstancies here. Some of core's file have headings, some don't, some have all caps headings, some like maintainers.txt don't have all caps.

anil280988’s picture

Status: Needs work » Needs review

Changing status

The last submitted patch, 4: add_readme_txt_file_to-2612618-4.patch, failed testing.

kaushalkishorejaiswal’s picture

Status: Needs review » Reviewed & tested by the community

I have compared the file with other Readme files and it is in proper format.

The last submitted patch, 4: add_readme_txt_file_to-2612618-4.patch, failed testing.

jhodgdon’s picture

Component: documentation » Stable theme
Status: Reviewed & tested by the community » Needs work
Issue tags: -rc eligible

Thanks! I've added a new Stable component to the issue queue.

And this is fairly good, but it really could use some improvement before we add it to Core:

  1. +++ b/core/themes/stable/README.txt
    @@ -0,0 +1,29 @@
    +
    +
    +Stable is a base theme with minimal markup and very few classes, and functions
    

    Nitpick: Extra blank line here.

  2. +++ b/core/themes/stable/README.txt
    @@ -0,0 +1,29 @@
    +Stable is a base theme with minimal markup and very few classes, and functions
    +as a backwards compatibility layer for Drupal 8's core markup, CSS and JS. This
    

    This first sentence is run/on and/or garbled.

  3. +++ b/core/themes/stable/README.txt
    @@ -0,0 +1,29 @@
    +A theme will use Stable as the base theme if no base theme is set in its
    +.info.yml file, or set the base theme setting to false.
    

    The grammar here is garbled.

  4. +++ b/core/themes/stable/README.txt
    @@ -0,0 +1,29 @@
    +.info.yml file, or set the base theme setting to false.
    

    false => FALSE I think? Hm, maybe not. Someone check this?

  5. +++ b/core/themes/stable/README.txt
    @@ -0,0 +1,29 @@
    +
    +base theme: false
    

    This line is an example for the previous paragraph. It should not be separated by a blank line, and the previous line should end in : to make this clear.

star-szr’s picture

For 4 lowercase is correct.

anil280988’s picture

Status: Needs work » Needs review
StatusFileSize
new1.22 KB

Created patch with changes suggested by jhodgdon.

Status: Needs review » Needs work

The last submitted patch, 16: add_readme_txt_file_to-2612618-16.patch, failed testing.

star-szr’s picture

Interdiff please :) also looks like the patch doesn't apply.

anil280988’s picture

Status: Needs work » Needs review
StatusFileSize
new1.12 KB
new1.22 KB

Recreated Patch and added interdiff file.

star-szr’s picture

Status: Needs review » Needs work
  1. +++ b/core/themes/stable/README.txt
    @@ -17,9 +16,8 @@ Themes that opt out of using Stable will need continuous maintenance as core
    +Stable will be used as the base theme if no base theme is set in current
    

    "in the current" here would read better.

  2. +++ b/core/themes/stable/README.txt
    @@ -0,0 +1,27 @@
    +Stable is a base theme with minimal markup and very few classes, it functions
    

    I would consider ending the sentence after "very few classes" and starting a new one.

  3. +++ b/core/themes/stable/README.txt
    @@ -0,0 +1,27 @@
    +theme's .info.yml file, or when the base theme setting is set to false:
    +base theme: false
    

    I didn't read this closely enough. Stable will *not* be used when you set base theme to false, that's how you opt out as is discussed in the previous paragraph.

Thanks @anil280988!

kaushalkishorejaiswal’s picture

Status: Needs work » Needs review
StatusFileSize
new1.22 KB
star-szr’s picture

Interdiff please!

jhodgdon’s picture

Status: Needs review » Needs work
  1. +++ b/core/themes/stable/README.txt
    @@ -0,0 +1,27 @@
    +as a backwards compatibility layer for Drupal 8's core markup, CSS and JS. This
    

    Need comma after CSS in this line.

  2. +++ b/core/themes/stable/README.txt
    @@ -0,0 +1,27 @@
    +and styling do not affect themes using Stable.
    

    Should this say "... using Stable as a base theme." ?

  3. +++ b/core/themes/stable/README.txt
    @@ -0,0 +1,27 @@
    +Stable will be used as the base theme if no base theme is set in the current
    +theme's .info.yml file, or when the base theme setting is set to false:
    

    I think we should not be talking about "the current theme" here.

    Also in the second line, see Cottser's recent review. I think if you set base theme to false, you do NOT get Stable, right?

davidhernandez’s picture

That can probably be, "if no base theme is set in a theme's .info.yml file" ?

I think if you set base theme to false, you do NOT get Stable, right?

Correct. It looks like when that sentence was rewritten its meaning became reversed. False opts out from using Stable.

r_sharma08’s picture

Status: Needs work » Needs review
StatusFileSize
new1.33 KB
new2.37 KB

Thanks Jhodgdon and davidhernandez for clarification.
Attaching patch for review.

Status: Needs review » Needs work

The last submitted patch, 25: add_readme_txt_file_to-2612618-25.patch, failed testing.

star-szr’s picture

@r_sharma08 both patch and interdiff don't seem quite right, can you try generating those again please?

r_sharma08’s picture

Status: Needs work » Needs review
StatusFileSize
new1.24 KB
new1.28 KB

Re attached the patch and interdiff files. Please review

jhodgdon’s picture

Status: Needs review » Needs work

Thanks for fixing up the patch files, but the previous review comments *still* have not been addressed:

  1. +++ b/core/themes/stable/README.txt
    @@ -0,0 +1,27 @@
    +Stable will be used as the base theme if no base theme is set in the current
    

    Can we please NOT use the word "current" here? See previous comments.

  2. +++ b/core/themes/stable/README.txt
    @@ -0,0 +1,27 @@
    +theme's .info.yml file, or if the base theme setting is set to false:
    +base theme: false
    

    And this is still wrong.

star-szr’s picture

Assigned: Unassigned » star-szr
Issue tags: -Novice

It seems to be a new person writing the patch each time which is not helping. I'm going to go ahead and make those changes.

star-szr’s picture

Status: Needs work » Needs review
StatusFileSize
new1.32 KB
new1.86 KB

Summary of changes:

  1. +++ b/core/themes/stable/README.txt
    @@ -0,0 +1,27 @@
    +as a backwards compatibility layer for Drupal 8's core markup, CSS, and JS. This
    +allows markup and styling to evolve throughout the life of Drupal 8, while
    

    Removed JS - Stable doesn't contain any JS. Changed "This" to "Stable".

  2. +++ b/core/themes/stable/README.txt
    @@ -0,0 +1,27 @@
    +and styling do not affect themes using Stable as base theme.
    

    as base theme = as a base theme, per #23.2.

  3. +++ b/core/themes/stable/README.txt
    @@ -0,0 +1,27 @@
    +Themes that opt out of using Stable will need continuous maintenance as core
    +changes, so only do so if you are prepared to keep track of those changes and
    +how they affect your theme.
    ...
    +Stable will be used as the base theme if no base theme is set in the current
    +theme's .info.yml file, or if the base theme setting is set to false:
    +base theme: false
    

    Updated the opt-in/opt-out details and moved the "Themes that opt out of using Stable" to after where we tell them how to opt out. Made it more of a clear warning. See interdiff/patch for all the details :)


Overall to me the first paragraph reads more like an explanation we would give to a core contributor rather than a new themer (for example). It also contradicts the next paragraph with this phrase: "clean, minimal markup provided by core". I think we can make it easier to understand. Here's an attempt:

Stable is the default base theme in Drupal 8 which provides minimal markup and very few classes. If you prefer more structure and classes see the Classy base theme (also in Drupal core).

All the backwards compatibility, evolution, etc. stuff could be explained further down I think for those who are interested. I also think we should add a similar README to Classy which points back to Stable.

Thoughts?

davidhernandez’s picture

There is an open issue to add a README to Classy.

#2575387: Add README.txt to Classy Base Theme?

star-szr’s picture

Bueno.

jhodgdon’s picture

Status: Needs review » Fixed

Excellent. As Cottser is theme system maintainer, and I am docs maintainer, and both of us like this, I went ahead and committed it to both 8.x branches. And I'll take a look at the other issue too for Classy. THANKS!

  • jhodgdon committed d1d0c6e on 8.0.x
    Issue #2612618 by anil280988, r_sharma08, Cottser, davidhernandez,...

  • jhodgdon committed af11320 on
    Issue #2612618 by anil280988, r_sharma08, Cottser, davidhernandez,...
star-szr’s picture

Well we can still iterate on it (my thoughts about the first paragraph, I will open a new issue for that to not hold this up any more). Thanks @jhodgdon! Glad to see we have a README in now.

star-szr’s picture

Status: Fixed » Closed (fixed)

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

cilefen’s picture