Problem/Motivation

#3041924: [META] Convert hook_help() module overview text to topics for the config module(s).

Proposed resolution

Take the information that is currently in the hook_help module overview section for the module(s), and make sure the information is in one or more Twig help topic files. Steps:

  1. Find the hook_help() implementation function in the core/modules/MODULENAME/MODULENAME.module file(s). For example, for the core Contact module, the module files is core/modules/contact/contact.module, and the function is called contact_help().
  2. Locate the module overview portion of this function. This is located just after some lines that look something like this:
      switch ($route_name) {
        case 'help.page.contact':
    

    And ends either at the end of the function, or where you find another case 'something': line.

  3. We want to end up with one or more topics about the tasks that you can do with this module, and possibly a section header topic. So, read the help and figure out a good way to logically divide it up into tasks and sections. See Standards for Help Topics for information on how to do this.
  4. See if some of these tasks are already documented in existing topics. Currently, all topics are in core/modules/help_topics/help_topics. Note that to see existing topics, you will need to enable the experimental Help Topics module (available in the latest dev versions of Drupal 8.x).
  5. For each task or section topic that needs to be written, make a new Twig topic file (see Standards for Help Topics) in core/modules/help_topics/help_topics. You will need to choose the appropriate module prefix for the file name -- the module that is required for the functionality. Alternatively, if the information spans several modules or if the information should be visible before the module is installed, you can use the "core" file name prefix. For instance, it might be useful to know that to get a certain functionality, you need to turn on a certain module (so that would be in the core prefix), but then the details of how to use it should only be visible once that module is turned on (so that would be in the module prefix).
  6. File names must be MODULENAME.TOPICNAME.html.twig -- for example, in the Action module, you could create a topic about managing actions with filename action.managing.html.twig (and "MODULENAME" can be "core" as discussed above).
  7. Make a patch file that adds/updates the Twig templates. The patch should not remove the text from the hook_help() implementation (that will be done separately).

Remaining tasks

a) Make a patch (see Proposed Resolution section).

b) Review the patch:

  1. Apply the patch.
  2. Turn on the experimental Help Topics module in your site, as well as the module(s) listed in this issue.
  3. Visit the page for each topic that is created or modified in this patch. The topics are files in the patch ending in .html.twig. If you find a file, such as core/modules/help_topics/help_topics/action.configuring.html.twig, you can view the topic at the URL admin/help/topic/action.configuring within your site.
  4. Review the topic text that you can see on the page, making sure of the following aspects:
    • The text is written in clear, simple, straightforward language
    • No grammar/punctuation errors
    • Valid HTML -- you can use http://validator.w3.org/ to check
    • Links within the text work
    • Instructions for tasks work
    • Adheres to Standards for Help Topics [for some aspects, you will need to look at the Twig file rather than the topic page].
  5. Read the old "module overview" topic(s) for the module(s), at admin/help/MODULENAME. Verify that all the tasks described in these overview pages are covered in the topics you reviewed.

User interface changes

Help topics will be added to cover tasks currently covered in modules' hook_help() implementations.

API changes

None.

Data model changes

None.

Release notes snippet

None.

CommentFileSizeAuthor
#100 interdiff-95-100.txt7.93 KBAmber Himes Matz
#100 3095734-100.patch13.31 KBAmber Himes Matz
#95 interdiff-92-95.txt6.2 KBAmber Himes Matz
#95 3095734-95.patch13.24 KBAmber Himes Matz
#92 interdiff-91-92.txt9.56 KBAmber Himes Matz
#92 3095734-92.patch13.65 KBAmber Himes Matz
#91 Screenshot 2020-11-24 at 5.14.44 PM.png583.44 KBRamya Balasubramanian
#91 interdiff_89-91.txt10.38 KBRamya Balasubramanian
#91 3095734-91.patch14.36 KBRamya Balasubramanian
#89 interdiff_83-89.patch5.09 KBsarvjeetsingh
#89 3095734-89.patch12.49 KBsarvjeetsingh
#83 3095734-83.patch12.46 KBjhodgdon
#79 interdiff-76-78.txt6.94 KBAmber Himes Matz
#79 3095734-78.patch12.45 KBAmber Himes Matz
#76 interdiff-71-76.txt5.13 KBAmber Himes Matz
#76 3095734-76.patch12.56 KBAmber Himes Matz
#71 3095734-69.patch12.97 KBjhodgdon
#68 interdiff-56-67.txt11.84 KBAmber Himes Matz
#68 3095734-67.patch12.95 KBAmber Himes Matz
#56 3095734-56.patch13.17 KBAmber Himes Matz
#56 interdiff-53-56.txt7.7 KBAmber Himes Matz
#53 interdiff.txt1.83 KBjhodgdon
#53 3095734-53.patch8.36 KBjhodgdon
#51 interdiff.txt4.5 KBjhodgdon
#51 3095734-51.patch8.46 KBjhodgdon
#4 config_help_topics-3095734-04.patch8.83 KBabhisekmazumdar
#7 interdiff_04-07.txt7.61 KBabhisekmazumdar
#7 config_help_topics-3095734-07.patch8.48 KBabhisekmazumdar
#11 config_help_topics-3095734-11.patch7 KBabhisekmazumdar
#11 interdiff_07-11.txt10.62 KBabhisekmazumdar
#13 3095734-13-config_help_topics.patch7.08 KBabhisekmazumdar
#13 interdiff.3095734.11-13.txt9.27 KBabhisekmazumdar
#18 3095734-18-config_help_topics.patch7.08 KBVladimirAus
#18 interdiff.3095734.13-18.txt15.77 KBVladimirAus
#20 3095734-20-config_help_topics.patch14.75 KBVladimirAus
#20 interdiff.3095734.13-20.txt15.77 KBVladimirAus
#22 3095734-22-config_help_topics.patch6.93 KBsaurabh-2k17
#22 interdiff-20-22.txt8.03 KBsaurabh-2k17
#25 interdiff_22-25.txt11.46 KBabhisekmazumdar
#25 config_help_topics-3095734-25.patch4.51 KBabhisekmazumdar
#29 3095734-29.patch8.5 KBjhodgdon
#34 config.spell_.png200.72 KBnaresh_bavaskar
#34 config.spell_.png200.72 KBnaresh_bavaskar
#35 configissue.png196.25 KBnaresh_bavaskar
#37 3095734-37.patch8.48 KBpradeepjha
#37 interdiff_29-37.txt2.12 KBpradeepjha
#39 3095734-29.patch8.5 KBjhodgdon
#41 Screenshot 2020-06-02 at 7.54.47 AM.png1.13 MBsiddhant.bhosale
#41 Screenshot 2020-06-02 at 8.17.45 AM.png1012.46 KBsiddhant.bhosale
#41 Screenshot 2020-06-02 at 8.17.51 AM.png1.09 MBsiddhant.bhosale
#41 Screenshot 2020-06-02 at 8.17.40 AM.png1022.34 KBsiddhant.bhosale
#41 Screenshot 2020-06-02 at 8.18.02 AM.png988.57 KBsiddhant.bhosale
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhodgdon created an issue. See original summary.

jhodgdon’s picture

Version: 8.8.x-dev » 8.9.x-dev
Issue tags: -Seattle2019
abhisekmazumdar’s picture

Assigned: Unassigned » abhisekmazumdar

I will be working on this.

abhisekmazumdar’s picture

Status: Active » Needs review
FileSize
8.83 KB
pratik_kamble’s picture

pratik_kamble’s picture

@abhisek thanks for the patch. The topics mostly look good to me. Here are some of my notes/observations for your patch.

1. Managing your site configuration
-- No need to write the goal in the overview sections.
-- Add information about the UUID

2. Exporting a single configuration item
-- Goal: Try to be more imperative like "Export the single configuration item".
-- Step 5: Try to use construct a more imperative sentence like "Corresponding *.yml file name will be displayed on the page for you to copy."

3. Exporting the full configurations
-- Goal: Try to be more imperative like "Export full site configuration."

4. Importing a single configuration item
-- Goal: Try to be more imperative like "Import single configuration item."

5. Importing full site configurations
-- Goal: Try to be more imperative like "Import Full site configurations."

6. Synchronizing configuration
-- Goal: Try to construct a more imperative sentence.
-- Step 2: Try to construct a more imperative sentence.

abhisekmazumdar’s picture

Assigned: pratik_kamble » Unassigned
FileSize
7.61 KB
8.48 KB

Thanks @pratik_kamble for the suggestions. I have updated the patch.

pratik_kamble’s picture

Status: Needs review » Reviewed & tested by the community

@abhisekmazumdar patch LGTM. Marking it as RTBC.

jhodgdon’s picture

Status: Reviewed & tested by the community » Needs work

Thanks for the patch and review! However, this patch is not quite ready to go yet. Some things to fix:

a) Navigation: You need to use HTML entities & instead of > in the navigation lines in steps.

b) YAML is mentioned in several topics but is not explained. I think it should be.

c) I don't think "configuration" can be plural (it is not countable). So the heading "What are configurations?" in the overview topic should probably be "What is configuration?". Also the UUID section is confusing to me.

d) config.import_full.html.twig -- I think it should have a link to the export full topic, because that is where it tells you how to export this tar.gz file that you are uploading. I also don't think it is useful to make the synchronize page a link, because without following the steps, you wouldn't see anything useful on that page.

e) Avoid words like "just" and "simply" in help. People are reading help because they need help. These types of words make them think they are stupid for not already knowing how to do things.

f) config.import_single.html.twig -- needs to link to the single export topic. Also needs to explain why you would need to put in a custom entity ID (it currently just says "if required" but doesn't explain why).

g) config.sync.html.twig -- I don't think this makes sense as a separate topic from the full import topic?

h) config_environment.overview.html.twig -- this topic should be merged into the overview topic I think? It has a goal but no steps, so it is not a task topic.

i) Could use a little proofreading.

abhisekmazumdar’s picture

Assigned: Unassigned » abhisekmazumdar

Hi @jhodgdon,
Thanks for the suggested changes, I'm updating the patch.

abhisekmazumdar’s picture

Assigned: abhisekmazumdar » Unassigned
Status: Needs work » Needs review
FileSize
7 KB
10.62 KB
jhodgdon’s picture

Status: Needs review » Needs work

Thanks for the new patch -- this is definitely an improvement! But please check the Standards for Help Topics.

A few things to fix still:

a) Grammar: missing a lot of a/an/the especially, some extra a/an/the, sometimes singular/plural forms of verbs are mixed up, etc. You might try viewing the topic, and pasting the output HTML into a word processor that has grammar checking for English (this is available as an add-on for Open/Libre Office, and most commercial word processors have that feature too).

b) <h2>{% trans %}Managing UUID{% endtrans %}</h2>
This is not an acceptable heading. Should start with "What is" or "What are".

c) config.import_full.html.twig -- navigation still has one > that needs to be an HTML entity.

d) Click on the <em>Upload</em> button. should just be Click <em>Upload</em> (and similarly for other "Click" instructions).

e) Single import topic:
<li>{% trans %}Paste the YAML structured configuration, which can be created from <a href="{{ single_export }}">Single Export Page</a>.{% endtrans %}</li>
Can we do something like "See (link to the topic name here) for instructions" (with a link to the single export topic name) instead of linking to the admin UI page?

f) This also applies to the full import topic.

abhisekmazumdar’s picture

Status: Needs work » Needs review
FileSize
7.08 KB
9.27 KB

Hi, @jhodgdon thanks for the continued support.
I have made few changes on Grammar(used: Grammarly) part. Also made the other suggested chnages.
Thank You

jhodgdon’s picture

I probably cannot review your new patch for a couple of weeks, sorry! Possibly someone else will review. Thanks for making the patch!

kuralarasanm’s picture

Assigned: Unassigned » kuralarasanm

I am reviewing the patch and let you know.

kuralarasanm’s picture

Status: Needs review » Reviewed & tested by the community

Hi, I have reviewed the topics and it's looks good. Hence changing the status to RTBC.

jhodgdon’s picture

Status: Reviewed & tested by the community » Needs work

There are grammar problems in these topics. Also some standards problems, such as that all UI text needs to be put in EM tags (italics) (such as navigation). I don't have time to itemize all the problems... sorry! I will probably make a new patch in the next few days unless someone else does so first, but I wanted to make sure in the meantime that the patch didn't get committed.

VladimirAus’s picture

Thanks @jhodgdon.
Updated patch 13.

VladimirAus’s picture

Status: Needs work » Needs review
VladimirAus’s picture

Please ignore #18. I uploaded incorrect files.

jhodgdon’s picture

Title: Convert config, config_environment module hook_help() to topic(s) » Convert config module hook_help() to topic(s)
Issue summary: View changes
Status: Needs review » Needs work

Actually, I just realized the config_environment module is experimental status, so we should not document it yet.

Also, the latest patch here has a bunch of block-related topics in it... seems wrong? Please fix.

saurabh-2k17’s picture

Hi @jhodgdon Please look into my patch thanks.

saurabh-2k17’s picture

Assigned: saurabh-2k17 » Unassigned
Status: Needs work » Needs review
VladimirAus’s picture

Status: Needs review » Needs work

@Saurabh_sgh some of your changes in /core/modules/help_topics/help_topics/help.help_topic_search.html.twig are just extra spaces. We don't really need double spaces, e.g.

+  <li>{% trans %}In the  <em>Manage</em> administrative menu, navigate to <em>Structure</em> &gt; <em>Block layout</em>.{% endtrans %}</li>
-  <li>{% trans %}In the <em>Manage</em> administrative menu, navigate to <em>Structure</em> &gt; <em>Block layout</em>.{% endtrans %}</li>
abhisekmazumdar’s picture

Status: Needs work » Needs review
FileSize
11.46 KB
4.51 KB

Re-rolled the patch with the suggested changes. Kindly review.

saurabh-2k17’s picture

Hi @VladimirAus,
as per comment no #21.
1. I have removed config_environment
2. removed block-related topics
3. Also removed changes to other file config like help.help_topic_search.html.twig

"help.help_topic_search.html.twig" I have reset this file to default check "here"

jhodgdon’s picture

Status: Needs review » Needs work

The patch in #25 is entirely composed of changes to files that are not related to this issue. Where is the patch with new topics?

abhisekmazumdar’s picture

Kindly ignore my patch I totally missed the comments by @jhodgdon about the wrong files added on the patch.

Sorry my bad Ignore the patch on the comment #25

The patch on #22 looks good to me.

jhodgdon’s picture

Status: Needs work » Needs review
Issue tags: +midcamp2020
FileSize
8.5 KB

OK, thanks! I went back to the patch in #22 and reviewed it. It was pretty good, but needed some grammar cleanup and a few things for standards (see https://www.drupal.org/docs/develop/documenting-your-project/help-topic-... ), so I made a new patch. Since nearly every line in the original patch changed, I did not make an interdiff file (not useful).

Also adding tag, as I worked on this at the MidCamp 2020 virtual contribution day.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

msuthars’s picture

Assigned: Unassigned » msuthars
msuthars’s picture

Status: Needs review » Reviewed & tested by the community

@jhodgdon Review the patch and it looks good to me. Tested the patch with Drupal core 9.1.x and it's working fine. Marking it as RTBC.

msuthars’s picture

Assigned: msuthars » Unassigned
naresh_bavaskar’s picture

Status: Reviewed & tested by the community » Needs work
FileSize
200.72 KB
200.72 KB

I have reviewed the patch and found some issue IMO,

naresh_bavaskar’s picture

FileSize
196.25 KB
pradeepjha’s picture

Assigned: Unassigned » pradeepjha
pradeepjha’s picture

Assigned: pradeepjha » Unassigned
Status: Needs work » Needs review
FileSize
8.48 KB
2.12 KB

Hi @Naresh B
I've made correction. Made text as `devices`.

Status: Needs review » Needs work

The last submitted patch, 37: 3095734-37.patch, failed testing. View results

jhodgdon’s picture

Status: Needs work » Needs review
FileSize
8.5 KB

The patch in #37 is wrong. The word should be device, not devices. Going back to the patch in #29, which I will re-upload.

Setting back to Needs Review, because I see no indication based on #32 that a full review was done, just that someone verified "it works" which is not what was asked for in the issue summary for a careful review.

siddhant.bhosale’s picture

Assigned: Unassigned » siddhant.bhosale
siddhant.bhosale’s picture

Hi, the patch works fine for me on the drupal 9.1.x branch. Attaching the screenshots for the same.
It looks to be merged.

siddhant.bhosale’s picture

Assigned: siddhant.bhosale » Unassigned
siddhant.bhosale’s picture

Status: Needs review » Reviewed & tested by the community
jhodgdon’s picture

Status: Reviewed & tested by the community » Needs review

Did you follow the instructions for reviewing that are in the issue summary of this issue? I see no indication that you did that, only that you applied the patch and verified the topics could be viewed, which we already knew from the automated test. Please do not set these help topic issues to Reviewed and Tested unless you have done all of the review steps.

pratik_kamble’s picture

Assigned: Unassigned » pratik_kamble
pratik_kamble’s picture

Thanks @jhodgdon for the patch.
I have reviewed patch in #39.

Verified the grammar. The text is written in clear, simple, and in straightforward language. Validated HTML, no issues found.
Links within the text redirects to appropriate pages.
Adheres to Standards for Help Topics.

pratik_kamble’s picture

Assigned: pratik_kamble » Unassigned
pratik_kamble’s picture

Status: Needs review » Reviewed & tested by the community
jhodgdon’s picture

Thanks again for the careful review!! You are doing an excellent job and it is much appreciated.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
  1. +++ b/core/modules/help_topics/help_topics/config.import_full.html.twig
    @@ -0,0 +1,25 @@
    +<p>{% trans %}UUID stands for Universally Unique Identifier. Each configuration item contains a UUID that identifies the site that the configuration came from. You cannot mix configuration with different UUIDs, so if you are importing configuration into a site, it needs to have originated as an export from the same site or a clone.{% endtrans %}</p>
    

    The system.site config file has a UUID that has to match for config import to work. Config entities have UUIDs that are use to determine whether a config object is updated or deleted and re-created.

  2. +++ b/core/modules/help_topics/help_topics/config.overview.html.twig
    @@ -0,0 +1,19 @@
    +<p>{% trans %}Configuration is relatively permanent information about your site that is not content; this information is used to define how your site behaves or is displayed. Some smaller pieces of configuration (like field labels, the name of your site, etc.) can also be displayed on your site. Drupal stores site configuration data in the database in YAML format.{% endtrans %}</p>
    

    relatively permanent? I think the second bit of the sentence is better. I.e. Configuration is information that is used to define how your site behaves or is displayed.

    This bit Drupal stores site configuration data in the database in YAML format. is not true. It stores it as serialised PHP. I think the removing the in YAML format should be remove. The serialisation format in the DB is neither here nor there for the end-user. The What is YAML? bit should be below - Overview of managing configuration bit as that correctly talks about YAML being the language of config import / export

jhodgdon’s picture

Good points. Here's a new patch that tightens up and corrects those sections of the help topics.

alexpott’s picture

  1. +++ b/core/modules/help_topics/help_topics/config.import_full.html.twig
    @@ -11,7 +11,7 @@ related:
    +<p>{% trans %}UUID stands for Universally Unique Identifier. Each configuration item contains a UUID that helps determine how and whether it has been modified. The system.site configuration item has a UUID that identifies the site that the configuration came from. You cannot mix configuration from different site UUIDs, so if you are importing configuration into a site, it needs to have originated as an export from the same site or a clone.{% endtrans %}</p>
    

    Each configuration item contains a UUID that helps determine how and whether it has been modified.
    This is still not quire right. Simple config general does not have a UUID - for example system.file does not have one. It's because they are a singleton.

  2. +++ b/core/modules/help_topics/help_topics/config.overview.html.twig
    @@ -8,11 +8,11 @@ related:
     <h2>{% trans %}What is YAML?{% endtrans %}</h2>
    -<p>{% trans %}YAML is a human-readable data serialization standard that can be used in conjunction with all programming languages. The recursive YAML acronym stands for &quot;YAML Ain't Markup Language&quot;. It can be used with nearly any application that needs to store or transmit data.{% endtrans %}</p>
    +<p>{% trans %}YAML is a human-readable data serialization standard that can be used in conjunction with all programming languages. The recursive YAML acronym stands for &quot;YAML Ain't Markup Language&quot;. Configuration data can be exported to and imported from YAML files.{% endtrans %}</p>
    

    I'd move this section to below Overview of managing... otherwise the reader could be thinking why are you telling me about YAML? I think this is less important than the next section.

jhodgdon’s picture

FileSize
8.36 KB
1.83 KB

Our help topic standards say that the "Overview" section comes last in this type of topic, and our other topics are following this standard, so I think I'll leave item 2 alone.

Thanks again for clarifying on item 1. How's this? I just took out the sentence you identified as being wrong. I think the section still makes sense, and the important thing is getting across that you can't mix the site UUIDs.

volkswagenchick’s picture

Issue tags: +Global2020

Tagging this for DrupalCon Global happening July 14-17

pratik_kamble’s picture

Issue tags: +DIACWJuly2020
Amber Himes Matz’s picture

Thank you to everyone who has been working on this issue so far.

I've rewritten and added more info to the config overview topic (config.overview.html.twig) keeping an audience of site admin/builders in mind who are completely new to configuration management. With this in mind, I broadened the overview and defined common terms. My goal is that someone who is totally new to the concept of managing configuration will have a better understanding of the system's purpose and terminology. And can confidently use the additional resources and related topics to perform configuration management tasks.

jhodgdon’s picture

Issue tags: +Usability

Something interesting came up on #3095737-30: Convert internationalization modules: config_translation, content_translation, locale, language module hook_help() to topic(s) and the following comment: When you translate configuration, you need to understand the difference between "simple" configuration and what we call in code "configuration entities".

I think we should:
a) Decide on the terminology for "configuration entities". On that other issue I called it "list configuration", because the UI for config translation uses the verb "list" for these -- you have to select the type and then list them out, and then you can pick one to translate, as opposed to simple configuration that you can choose directly. penyaskito suggested in Slack to call them "configuration objects". I'm not sure we want to call them "entities", as I think we are trying to avoid that.

b) Add a bit to the config.overview.html.twig topic about this subject.

c) Change the file name to core.config_overview so that it will be visible even if the config manager module is not enabled.

jhodgdon’s picture

Status: Needs review » Needs work

This looks mostly great, thanks! A few suggestions (see also the help topic standards page https://www.drupal.org/docs/develop/documenting-your-project/help-topic-...):

1. Generally, we've been trying to avoid using the word "Drupal" in the UI and help. Some people may use distributions or other means to obscure the fact they are running Drupal, and this is fine. Better wording can be "You can ___" or "Your site ___" or "The core software".

2. Overview topic:
- According to our standards, the headings in overview topics should be questions, except one called "____ Overview"
- The terminology section... some of the explanations seem pretty technical? For example, the YAML entry talks about "serialization", which I'm sure I wouldn't have understood a few years ago.

3. config.import_full:
- The "What is" sections seem to be repeats of information that is on the overview topic? I think the information should only be in one place; I don't feel strongly about which place.

4. I think I saw a few typos but overall it looks great! Will wait to nitpick until the content issues are addressed.

5. See previous comment for an additional piece of information we need to add and a possible name change for the overview topic.

sarvjeetsingh’s picture

Assigned: Unassigned » sarvjeetsingh
sarvjeetsingh’s picture

Assigned: sarvjeetsingh » Unassigned
MeenakshiG’s picture

Assigned: Unassigned » MeenakshiG
MeenakshiG’s picture

Assigned: MeenakshiG » Unassigned
Amber Himes Matz’s picture

Assigned: Unassigned » Amber Himes Matz

Thanks for the review @jhodgdon! I'll update with your suggestions. (Assigning to myself.)

Amber Himes Matz’s picture

Regarding "configuration entities" as a term that needs defining, I suggest we discuss that in #3095737: Convert internationalization modules: config_translation, content_translation, locale, language module hook_help() to topic(s) (which is where I left a comment on that subject).

[Edit] Apparently this is a better issue to discuss it in.

Amber Himes Matz’s picture

Here's what I am working on as definitions for simple config, configuration entities, and configuration schema in the config.overview help topic. No patch yet, still working on it, but thought I'd provide it as a basis for discussion regarding the definition of these terms.

<dt>{% trans %}Simple configuration{% endtrans %}</dt>
  <dd>{% trans %}It may be helpful to think of simple configuration as module settings. Simple configuration is used by modules to store settings values as boolean, integers, text strings in key/value pairs. These key/value pairs storing module settings may also be organized into a multi-dimensional array, as in the <em>system.site</em> configuration object. This is mostly a behind-the-scenes developer term, but you may come across it in the UI when doing translation.{% endtrans %}</dd>
  <dt>{% trans %}Configuration entities{% endtrans %}</dt>
  <dd>{% trans %}While <em>simple configuration</em> contains module-defined settings, <em>configuration entities</em> store user-defined configuration. Configuration entities are used to define image styles, views, content types and more. This is a concept that module developers need to know and is seldom seen in the administrative UI.{% endtrans %}</dd>
  <dt>{% trans %}Configuration schema{% endtrans %}</dt>
  <dd>{% trans %}Schema files contain structure descriptions for both simple configuration and configuration entities. Since this configuration can appear in the administrative UI in settings forms, it is best practice to provide a schema that identifies translatable strings.{% endtrans %}</dd>
jhodgdon’s picture

That's a great start! I was going to write something up, but this is much better than what I was thinking. :)

A few thoughts:

a) I don't think we should talk about schema. That is something only a developer cares about.

b) I don't think we should use terms like "boolean" (which if we do use it, needs to be Boolean, capitalized by the way, sorry for the nitpick), or key/value pairs or multi-dimensional arrays. Let's focus on things the end user in the UI would see, which are forms for settings, not the contents of the YAML files.

c) I don't agree that config entities are not seen in the UI. On the contrary, most config entities have a UI for CRUD operations on them, like creating/updating/deleting views.

So maybe we can do something even simpler... for simple config, something more like:

A simple configuration item is a group of settings, such as the settings for a module or theme. Each simple configuration item has its own unique structure.

And for entities:

Configuration entities are user-defined configuration items grouped by type, such as views, image styles, and content types. Each configuration entity within a type has a similar structure.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Amber Himes Matz’s picture

Assigned: Amber Himes Matz » Unassigned
Status: Needs work » Needs review
FileSize
12.95 KB
11.84 KB

This patch addresses items in comments 57, 58, and 66.

- Renames the config overview topic to core.config_overview so that it shows up regardless if Configuration Manager module is enabled.
- Updating wording and formatting of the overview topic to enhance clarity and readability (hopefully!). Removed "Drupal" in favor of other terms according to the help topics standards. Added headings. Changed headings to use the form of a question.
- Removed a terminology section in the config.import_full topic that was contained in the overview topic.

Needs a copy edit, standards review, and any other necessarily clarifications. Ready for review and thanks for your patience!

Status: Needs review » Needs work

The last submitted patch, 68: 3095734-67.patch, failed testing. View results

jhodgdon’s picture

The test error looks like it is from several places that have:

+related:
+- config.overview

But the topic is actually named core.config_overview.

jhodgdon’s picture

Status: Needs work » Needs review
FileSize
12.97 KB

I went ahead and edited the patch file directly -- just did a search-and-replace for config.overview -> core.config_overview. Let's see if this one passes the tests.

Status: Needs review » Needs work

The last submitted patch, 71: 3095734-69.patch, failed testing. View results

jhodgdon’s picture

Search test still fails. It seems that the search indexing is failing with the new topics, possibly related to this error:

Warning:       Your XML configuration validates against a deprecated schema.
Suggestion:    Migrate your XML configuration using "--migrate-configuration"!

I have no idea what that is about. ?!? Weird. I did take a look and verified that in Drupal Core without this patch, that message does not appear in the console log, so it seems to be related to this patch.

jhodgdon’s picture

I tried to debug this a bit. It seems that during the test, it is for some reason stalling/crashing while trying to index the core.config_overview topic.

Ohhhhh... I was going to say I don't know why, but I think I actually do. At the top of this topic is:

+---
+{% set config_sync = render_var(url('config.sync')) %}

This URL is only valid if the config module is installed. That needs to go away. This topic is in the core namespace now, and it can't depend on anything in a non-required module like Config Manager.

This is an overview topic, and there shouldn't be any reason to link to that admin URL or describe specific tasks (those should be left to Task topics). I don't think we should have a heading in that topic saying "Where do I manage configuration?" either -- again, that should be left to task topics.

Amber Himes Matz’s picture

Assigned: Unassigned » Amber Himes Matz
Status: Needs work » Needs review

Thanks for debugging! I have time to work on this today and will work on a new patch.

Amber Himes Matz’s picture

Assigned: Amber Himes Matz » Unassigned
FileSize
12.56 KB
5.13 KB

I removed the render_var call and links to the other task topics from the core config overview page.

Wondering if the wording about seeing related topics will be confusing if the Configuration Manager module is not enabled? Probably? Should I add something about enabling the Configuration Manager in the overview? Probably makes sense.

jhodgdon’s picture

Oh, should have clarified:

The render_var is a problem. The links at the top under "related" will not cause any problems. Unknown "related" topics are simply skipped during rendering, but the render_var will crash and burn.

And yes, in other overview topics we've had a section at the end called something like "Overview of managing xyz". This section would list the Core modules that provide the relevant functionality, and then have the "see related topics" wording:
https://www.drupal.org/docs/develop/documenting-your-project/help-topic-...

I guess the standards don't currently say anything about listing the core modules, but our existing topics are doing that, at least the recent ones.

So something like "Configuration management functionality is provided by the core Configuration Manager module [or whatever it is called]. See the related topics..."

Status: Needs review » Needs work

The last submitted patch, 76: 3095734-76.patch, failed testing. View results

Amber Himes Matz’s picture

I've reworked the intro paragraph of the core.config_overview topic to be more in-line with our help topics standards. And I removed the other various references to "see the related topics" in the body of the topic, since that statement (about seeing related topics) is now contained in the introductory paragraph.

I think the tests will still fail. I don't know what this

Warning:       Your XML configuration validates against a deprecated schema.
Suggestion:    Migrate your XML configuration using "--migrate-configuration"!

is about.

jhodgdon’s picture

Status: Needs work » Needs review
jhodgdon’s picture

I don't know what the XML problem is. I thought it was due to the links having invalid href attributes due to the broken render_var, but you got rid of that... Maybe something to do with a faulty German translation of something ... ??? I don't get it. The previous patch (which failed the search test) worked fine on my test site as far as being renderable and searchable.

But in the search test, the cron jobs fail to index the new topics (I debugged it that far). ... ... not sure. Maybe I'll try installing German like the test does, and see if I can still index for search. ??!? weird.

jhodgdon’s picture

Status: Needs review » Needs work

Found it!

<dd>{% trans %}The configuration sync directory location is set in the site's <em>settings.php</em>. When configuration is exported, the active configuration is exported and described in YAML files which are stored in the configuration sync directory. After the first export, the system compares the site's active configuration with the configuration data in the sync directory and will only export active configuration that are different than its counterpart in the sync directory.</dd>

Weird error message, but this dd does not have an endtrans tag!

jhodgdon’s picture

Status: Needs work » Needs review
FileSize
12.46 KB

Let's see what this does. Same patch as #78 but with the endtrans added in that one line as per #83.

I have a feeling that XML error is not from us, but is something that is getting spit out whenever a test fails due to something wrong in the PHPUnit config, because there was a random test fail on that last one that also had that XML error... not sure. Anyway.

Amber Himes Matz’s picture

Thanks for catching that missing endtrans tag! Wish the test failure output was more helpful in this case. (Should that wish go into a new issue, I wonder?)

Any other feedback on the patch content?

jhodgdon’s picture

That was indeed a weird error. No idea what it was from really. I guess we could add an issue but maybe we should just let it go -- the topic did have a syntax error and the test caught that there was an error, even if it didn't give us useful information about the error.

Anyway, yes I need to make time to review the patch today. Will try to do that!!

jhodgdon’s picture

Sorry, ran out of time yesterday... Quick content review of the Overview topic -- see also
https://www.drupal.org/docs/develop/documenting-your-project/help-topic-...

a) The headings for the sections in this topic should be "What is..." or "What are..." questions, except the last one. To maintain consistency with other topics, we need to rewrite the "How" headings as "What" instead. Example: How is configuration synchronized between site instances? could be "What is configuration synchronization?" . [The idea of this type of topic is giving background ("what"), not explaining tasks ("how").]

b) The last one should be something like "Managing configuration overview". By convention based on our other topics [this is not in the Standards doc but should be], we've been making a list in this section of which Core modules provide which functionality, and then including the standard "See the related topics listed below for specific tasks." sentence at the end.

c) Avoid the word "Drupal". Use "The core software" instead or mention particular core modules.

d) Themes and installation profiles (not just modules) can also define default configuration.

e) YAML is explained under "How is configuration synchronized between site instances?", but the term is used above that section, so it should probably be explained earlier?

f) I don't think we should mention Drush. We haven't in other Core topics. But I think it's fine to have an Additional Resource link that mentions Drush.

jhodgdon’s picture

Forgot to say, this is looking very good! I just got into the nitpicking...

jhodgdon’s picture

Status: Needs review » Needs work

apparently I forgot to change the status.

sarvjeetsingh’s picture

Status: Needs work » Needs review
FileSize
12.49 KB
5.09 KB

Updated patch as suggested above.
#86.b) Not sure where else YAML should be explained.
please review.

jhodgdon’s picture

Status: Needs review » Needs work

Thanks for the new patch and interdiff! (To prevent automated testing on interdiff files, use a .txt extension next time instead of .patch for the interdiff file.)

The interdiff looks mostly good! I took a look at that and at the patch as a whole, and I found a few minor things to fix (in spite of the number of comments here, really the topics are all in very good shape). These comments are all about the core.config_overview.html.twig topic, except the last suggestion:

  1. For the question about YAML from previous reviews: the explanatory information about YAML should be moved to the first mention of YAML in the topic.
  2. "Configuration system of the core software enables you" ==> needs to start with "The".
  3. "Default configuration can be provided by modules, themes and installation profiles" ==> In the Drupal project, we use "serial commas". So we need a comma before "and" so it says "modules, themes, and installation profiles"
  4. +<h2>{% trans %}What is configuration synchronization?{% endtrans %}</h2>
     <p>{% trans %}Each site has unique identifier, also called a <em>UUID</em>, which identifies the site to the system in any instance of the site, as long as the site instances have been reproduced as clones, (in short, the codebase and database are copied to create a new site instance). When site instances are cloned, a "dev" instance of the site has the same UUID as the "live" instance. When site instances share the same UUID, configuration can be exported from one instance to another.{% endtrans %}</p>
    

    It seems like this section's paragraph should start with a sentence explaining what configuration synchronization is, before launching into an explanation of the UUID and how it is used? Maybe something like this:

    Configuration synchronization is the process of exporting and importing configuration to keep configuration synchronized between different versions of a site; for example, between a development site and the live site.

  5. +<h2>{% trans %}Managing configuration overview{% endtrans %}</h2>
    +<p>{% trans %}Configuration management tasks can be done either through the administrative UI or using any tool.{% endtrans %}</p>
    

    This "overview" section should do the following:
    a) List which core modules handle configuration management tasks, and list the tasks in brief. So we definitely need to mention the core Configuration Manager module (make sure to verify the name!) and its import/export/synchronize tasks. I think we should also have a sentence something like "Most modules and themes also provide administrative user interfaces for managing their own configuration."
    b) End with the standard sentence "See the related topics listed below for specific tasks."

    I don't think we need the sentence that is currently in the patch at all.

  6. The first heading in the topic is "Configuration system overview". That section should be retitled "What is the configuration system?". And the paragraph near the end of that section saying "Configuration management functionality is provided by the core Configuration Manager module. See the related topics listed below for specific tasks." should be removed (see previous item).
  7. I think we should take out the words ", as the name implies," in the bullet point about active configuration. This phrase is not really needed and it kind of sounds like we're saying people should already know what "active configuration" is.
  8. Nitpick: "module's configuration without interference from the module" -- there are two spaces between "module's" and "configuration".
  9. Under "What is configuration data", we have " Default configuration can be provided by modules, themes and installation profiles when they are installed, and those default settings can then be updated by a site administrator using the administrative interface.". I think we should actually take those two sentences out. This information is provided later in the topic in more detail.
  10. Under the "Default configuration" bullet point:

    Default configuration can be defined by a module in their config/install or config/optional directories as YAML files, as either simple configuration or a configuration entity.
  11. a) Should say "by a module, theme, or installation profile in its"
    b) "as YAML files, as either simple configuration or a configuration entity" ==> I think this part would be less awkward as a new sentence saying "Configuration consists of YAML files containing simple configuration and configuration entities."

  12. The other topics are looking great! I do have one comment: We have to consider that people are possibly going to find these topics through searches. So it is helpful if in the Goal section of the task-oriented topics, we have a sentence like:

    See Managing and deploying configuration for more information about configuration.

    (where "Managing and deploying configuration" would link to the core.config_overview topic). It is helpful to have this in addition to the Related topic link, because it gives people more specific guidance on where to find the overview information.

Ramya Balasubramanian’s picture

Status: Needs work » Needs review
FileSize
14.36 KB
10.38 KB
583.44 KB

Hi @jhodgdon,
I have not addressed 11th point, because in #89 this 'Managing and deploying configuration' is already linked to core.config_overview. I didn't get that point clearly. Please let me know what needs to be done on that part. Please see the below patch and screenshot for reference and let me know if there are any issues.

Amber Himes Matz’s picture

FileSize
13.65 KB
9.56 KB

Thank you @Ramya Balasubramanian and @sarvjeetsingh for the recent work on this issue!

1. On the config overview topic's "Managing configuration overview" section, I removed the part added in #91 with the verbose list of tasks, replacing it with 2 new sentences in the first paragraph of that section. (Users can refer to the link list of related topics.)

2. I added links back to the config overview page in the goal section of each of the individual topics on exporting/importing config.

3. Other minor edits.

I think we're close!

jhodgdon’s picture

Status: Needs review » Needs work

This is definitely looking close!! Thanks to both of you for the patches.

I took a look at the latest patch, and I have a few comments/suggestions:

a) in the overview topic:

+<h2>{% trans %}What is configuration data?{% endtrans %}</h2>
+<p>{% trans %}Configuration data describes settings that define how your site behaves or is displayed. For example, when a site administrator updates settings using an administrative form, these settings are stored as configuration data. Configuration data describes settings as simple as a site name and as complex as a view or image style.{% endtrans %}</p>
+<dl>
+  <dt>{% trans %}YAML{% endtrans %}</dt>
+  <dd>{% trans %}YAML is a human-readable data serialization standard that can be used in conjunction with all programming languages. In the core software, YAML is used to describe various meta-information, routing, menu items, as well as configuration data. Files in a your site's codebase with the extension <em>.yml</em> are in YAML-format.{% endtrans %}</dd>
+</dl>

This seems a bit weird. The section is called "What is configuration data". The first paragraph does not mention YAML (which is fine). And then suddenly there is (with no introduction) a DL list with a definition of YAML. ????

The first actual mention of YAML is actually in the next section, entitled "What kinds of configuration are there?", in the last item in the list "Default configuration". So maybe what we should do is rewrite that DD to say something like:

<dd>{% trans %}Default configuration can be defined by an extension (module, theme, or installation profile) in its <em>config/install</em> and/or <em>config/optional</em> directories. Configuration is provided in YAML files (file extension .yml); YAML is a human-readable data serialization standard that is used by the core software for several purposes. Once the default configuration has been imported into the site's active configuration (through installing the extension), that configuration is owned by the site, not the extension. This means that future updates of the extension will not override the site's active configuration for that extension.{% endtrans %}</dd>

I made several other suggested changes to that paragraph, which I think make it read clearer?

b) in Overview topic in section "Managing configuration overview" -- we should mention that the adminstrative UI for configuration import/export/sync is provided by the core Configuration Manager module. So:
"can be done either through the administrative UI" ==> "can be done either through the administrative UI provided by the core Configuration Manager module".

c) In the export_single topic: I think in the Goal section we should say "Export a single configuration item to a file.". I guess that is understood, but we don't have "to a file" in there? Best to be explicit?

The rest all looks great!!!

Amber Himes Matz’s picture

Assigned: Unassigned » Amber Himes Matz
Amber Himes Matz’s picture

Assigned: Amber Himes Matz » Unassigned
Status: Needs work » Needs review
FileSize
13.24 KB
6.2 KB

Thanks for the review and suggestions @jhodgdon! I agree with your ideas and have attached another patch and interdiff.

jhodgdon’s picture

This looks great to me! I haven't actually tested the patch on a live site to make sure all the links go to the right places and the UI text mentioned in the topics matches what you see in the UI. So I haven't yet marked it RTBC. But I will make time to do that in the next day or two.

jhodgdon’s picture

Status: Needs review » Needs work

I hate to do this... but although these topics seem very good, I think we need to change a few more things -- all very minor except the first item:

a) As I read through the help topics in this patch on an actual site... I started at core.config_overview (which is the only top-level topic). The first section is "What is the configuration system?", and it talks about moving and synchronizing changes as being the main functions of the core configuration system.

However, really the main function of the configuration *system* is to manage the site's configuration. The main function of the core Configuration Manager module is to move/synchronize changes.

So, I think we should change that first sentence. Maybe something like:

The configuration system provides the ability for administrators to customize the site, and to move and synchronize configuration changes between development sites and the live site.

b) in the overview topic, first section: "... between instances of the same site, for example, from" ==> should be a semicolon before "for example", not a comma

c) overview topic, under "Active configuration": I think we could say "of a site" rather than the more convoluted "of an instance of a site"?

d) overview topic under "What is configuration synchronization", second paragraph: "... as clones, (in short," -- should not be a comma before the parenthesis.

e) Also at that same spot... I think the parenthetical remark "in short, the codebase and database..." would be better as "cloning is when the codebase and database...".

f) in that section under "Configuration sync directory": "is set in the site's settings.php" I think should say "settings.php file".

g) same area, next sentence: "will only export active configuration that are different than its counterpart" ... this has some singular/plural confusion between the verb "are" and the pronoun "its" and noun "counterpart". How about "will only export active configuration items that are different than their counterparts"? We use the term "configuration item" elsewhere in these topics.

h) First paragraph under "Managing configuration overview" I think should end with the word "file" (settings.php file) and it also needs a . at the end.

i) For future proof-ness, I don't think the topic number (1.5, 11.7, etc.) should be included in the link text when making links to the User Guide. Those numbers sometimes change as we add topics.

The rest looks great! I didn't find even anything minor in the task topics. Great work everyone!

Amber Himes Matz’s picture

Assigned: Unassigned » Amber Himes Matz
jhodgdon’s picture

Issue tags: -Novice

This should not really be a Novice issue unless we want to recruit a group of novice contributors to follow the review instructions.

Amber Himes Matz’s picture

Assigned: Amber Himes Matz » Unassigned
Status: Needs work » Needs review
FileSize
13.31 KB
7.93 KB

Thanks for the careful review, @jhodgdon! Agree on all points; great suggestions. I've attached a new patch and interdiff.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Looks great!

I will note that on #2144861: [meta] Replace Drupal in UI text with the name of the distribution we are trying to get rid of the word "drupal" from UI text, so we'll eventually probably want to say "User Guide" rather than "Drupal User Guide" (although Drupal User Guide is the name of the guide, so ... not sure about that). But we have two items related to this on #3121340: Fix up minor copy problems in help topics (not using the word Drupal and also making links to the User Guide consistent across topics), so for now let's leave this as it is. Thanks for all the patches!

alexpott’s picture

Version: 9.2.x-dev » 9.1.x-dev
Status: Reviewed & tested by the community » Fixed
Issue tags: +Needs followup

I think we need a follow-up issue to add information about installing from configuration as the part on cloning could encompass this and if people knew about and used installing from configuration more often then people wouldn't think some much about the site UUID. But everything detailed here looks correct to me and a step in the right direction so I'm going to commit the patch.

Committed and pushed 1d58176c36 to 9.2.x and 5413c57a3b to 9.1.x. Thanks!

Backported to 9.1.x as help_topics is still experimental.

jhodgdon’s picture

a) Are you backporting all the topics commits? Because we don't want to end up with an inconsistent set of topics/tests in 9.1/9.2. Might be better to just commit to the latest branch. I hadn't noticed other Help Topics patches being committed to two places (but maybe just didn't notice).

b) I added the follow-up note to #3121340: Fix up minor copy problems in help topics

  • alexpott committed 77e75d6 on 9.2.x
    Issue #3095734 by Amber Himes Matz, jhodgdon, abhisekmazumdar,...

  • alexpott committed 11da537 on 9.1.x
    Issue #3095734 by Amber Himes Matz, jhodgdon, abhisekmazumdar,...
alexpott’s picture

@jhodgdon help_topics is still experimental - it should be committed to both 9.2.x and 9.1.x.

Status: Fixed » Closed (fixed)

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

quietone’s picture

Issue tags: -Needs followup

Removing tag per #103.