Problem/Motivation

#3041924: [META] Convert hook_help() module overview text to topics for the big_pipe, dynamic_page_cache, and page_cache modules.

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.

Comments

vadim.hirbu created an issue. See original summary.

vadim.hirbu’s picture

StatusFileSize
new778 bytes

Added patch.

vadim.hirbu’s picture

Status: Active » Needs review
bramdriesen’s picture

Status: Needs review » Needs work
+++ b/core/modules/big_pipe/help_topics/big_pipe.info.html.twig
@@ -0,0 +1,5 @@
+<p>{% trans %}Module BipPipe is used to speeding up your site and it not requires any configurations. Every part of the page contains metadata that allows BigPipe to figure this out on its own.{% endtrans %}</p>

Is this correct English? Sounds very weird to me.

vadim.hirbu’s picture

StatusFileSize
new773 bytes
vadim.hirbu’s picture

Status: Needs work » Needs review
jhodgdon’s picture

Status: Needs review » Needs work

Here is the hook_help() module overview topic for this module that we are trying to replace:

$output = '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('The BigPipe module sends pages with dynamic content in a way that allows browsers to show them much faster. For more information, see the <a href=":big_pipe-documentation">online documentation for the BigPipe module</a>.', [
        ':big_pipe-documentation' => 'https://www.drupal.org/documentation/modules/big_pipe',
      ]) . '</p>';
      $output .= '<h3>' . t('Uses') . '</h3>';
      $output .= '<dl>';
      $output .= '<dt>' . t('Speeding up your site') . '</dt>';
      $output .= '<dd>' . t('The module requires no configuration. Every part of the page contains metadata that allows BigPipe to figure this out on its own.') . '</dd>';
      $output .= '</dl>';

So it sounds like the topic we really need would be titled "Speeding up your site", and the instruction would be something like "One way to speed up page loads for your site is to install the core BigPipe module".

Let's make that the topic, and locate it in the help_topics module instead of in the big_pipe module. The reason for that is that if we put it in the big_pipe module area, then no one will be able to see the topic without first installing the big_pipe module, which would make the topic kind of useless. But if it's in the help_topics module area, then it allows people to learn about the existence of this module, and in another issue, we could also later add to the topic with more information about how to speed up a site.

Thanks!

vadim.hirbu’s picture

Added a patch with big_pipe topic on help_topics module #2920309: Add experimental module for Help Topics.

jhodgdon’s picture

Sorry for the confusion! We need the patch to be here on this issue. But it should add its topic file under core/modules/help_topics/help_topics. Thanks!

vadim.hirbu’s picture

Status: Needs work » Needs review
StatusFileSize
new494 bytes
jhodgdon’s picture

Issue tags: +Novice

Looks good! Simple and clean, and we can always add more to the topic later. Good choice of topic file name too. Thanks!

I haven't tested that the help topic is visible and formatted OK (I just read the code in the patch), so I am not yet marking this RTBC. Adding Novice tag to see if someone else wants to test.

Status: Needs review » Needs work
jhodgdon’s picture

Don't worry about the test failure. Until the parent patch has been committed to core (which will hopefully be soon!), there is no way this patch will pass tests.

jhodgdon’s picture

Status: Needs work » Needs review
jhodgdon’s picture

Status: Needs review » Postponed

We need to postpone this until the #2920309: Add experimental module for Help Topics gets committed. No idea when/if that might happen right now...

jhodgdon’s picture

Status: Postponed » Needs review

That issue was committed, so we can un-postpone this now!

jhodgdon’s picture

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

Adding some more modules to this task.

jhodgdon’s picture

Issue summary: View changes

Updated issue summary with better instructions/guidelines

jhodgdon’s picture

Issue summary: View changes

Some new guidelines again. Please check out the new issue summary. Thanks!

jhodgdon’s picture

Issue summary: View changes

We've migrated the help topic standards to https://www.drupal.org/docs/develop/documenting-your-project/help-topic-... so updating issue summary again.

volkswagenchick’s picture

Issue tags: +badcamp2019

Tagging this for badcamp2019. (October 2-5)

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

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

jhodgdon’s picture

Issue summary: View changes

We just found out that all topic Twig files currently need to go into core/modules/help_topics/help_topics (with their finalized module-based file names), for the time being until the Help Topics module is stable. Updating issue summary. Patch will need to be updated too.

mradcliffe’s picture

Issue tags: +Amsterdam2019

Tagging for amsterdam 2019 event.

vitor faria’s picture

I am going to work on this.

vitor faria’s picture

StatusFileSize
new3.83 KB
new3.61 KB

Have changed the name of the speed help topic file to be consistent with the other help topic files.

Have added 2 new help topic files based on the hook_help method of each module.

To test this make sure the modules are enabled (big_pipe, dynamic_page_cache, page_cache)

And then go to the URL: "/admin/help"

vitor faria’s picture

Status: Needs work » Needs review
joycelam’s picture

Hi, I'll be testing/reviewing the patch.

ChrisBee’s picture

Hi, I'll be reviewing the patch.

ChrisBee’s picture

  1. --- /dev/null
    +++ b/core/modules/help_topics/help_topics/help_topics.big_pipe.html.twig
    

    File names must be MODULENAME.TOPICNAME.html.twig, without the prefix help_topics

  2. +++ b/core/modules/help_topics/help_topics/help_topics.big_pipe.html.twig
    --- /dev/null
    +++ b/core/modules/help_topics/help_topics/help_topics.dynamic_page_cache.html.twig
    

    File names must be MODULENAME.TOPICNAME.html.twig, without the prefix help_topics

  3. +++ b/core/modules/help_topics/help_topics/help_topics.dynamic_page_cache.html.twig
    --- /dev/null
    +++ b/core/modules/help_topics/help_topics/help_topics.page_cache.html.twig
    

    File names must be MODULENAME.TOPICNAME.html.twig, without the prefix help_topics

Status: Needs review » Needs work

The last submitted patch, 26: 3041924-26.patch, failed testing. View results

joycelam’s picture

Hi, thanks for the patch.

I agree with #30 that the path should be changed. As said in the summary above, the path should be:admin/help/topic/[MODULENAME].
Also in issue https://www.drupal.org/project/drupal/issues/3047703 the path was also admin/help/topic/[MODULENAME].

jhodgdon’s picture

Also, please read the information in the Help Topic Standards page about how to divide the help information into topics. We want our information to be task-based. We don't want to end up with something just like the existing hook_help() that gives us module overviews. And the structure of the topics also does not match our standards for Help Topics. This is just a copy/paste of the hook_help and that is not what we want. Thanks!

gayathri j’s picture

StatusFileSize
new4.87 KB

Hi jhodgdon

I have created patch for bigpipe and dynamic page cache and page cache modules. i am trying to dived topics can u suggest me, because of this 3 modules there is no that much configuration process. Please review

gayathri j’s picture

Status: Needs work » Needs review
jhodgdon’s picture

Status: Needs review » Needs work

Please, when you make a patch, set it to Needs Review, which will launch the test automatically, and if it fails, it will automatically set the issue to Needs Work. If you add the test manually, that doesn't happen. Anyway I will wait to review the patch until it at least passes the tests. Thanks!

gayathri j’s picture

#36 I will do like this onwords thank you i am trying to fix error i will make another patch.

gayathri j’s picture

Status: Needs work » Needs review
gayathri j’s picture

StatusFileSize
new4.96 KB

Status: Needs review » Needs work

The last submitted patch, 39: 660022.11.patch, failed testing. View results

gayathri j’s picture

Status: Needs work » Needs review
gayathri j’s picture

StatusFileSize
new4.96 KB

#39 h2 tag syntax error coming i solved that please review. can u suggest how we can dived topics actually this modules does not contain much configuration.

Status: Needs review » Needs work

The last submitted patch, 42: bigpipe_pagechae.patch, failed testing. View results

jhodgdon’s picture

Yes, my suggestion would be to make 1 top-level overview topic in the "core." filename space, called something like "Speeding up your site". Describe the 3 modules and what they do in that topic. And since there is only really 1 task here (doing the configuration for that), I think I would go ahead and put the Goal and Steps also in this same topic, and put in the Steps everything you can do on that admin/config/performance page. If some of it pertains to just one module being enabled, you can say something like this in one step: "If the Foo Bar module is installed, ...".

sukottokun’s picture

Status: Needs work » Needs review
StatusFileSize
new4.23 KB

I took a pass at the overview section described in #44.

Status: Needs review » Needs work

The last submitted patch, 3044059-45.patch, failed testing. View results

jhodgdon’s picture

Thanks for the new patch!

We have some tests in place for Help Topics, and apparently the core.performance file does not have all of its text translated. It looks like the part that is untranslated is in the Additional Resources section (the link text needs to be translated).

I also took a quick look at the patch. A few notes:

  1. The section called "Overview" -- the section is needed, but it needs a new title. See Standards for Help Topics for more information about the headings in task topics.
  2. Also read about describing navigation in the Standards and fix On the Admin > Config > Development > Performance page so that it matches the standards
  3. Generally I don't think the Steps are really steps. Each step should be an action, not an explanation.
jhodgdon’s picture

Assigned: vadim.hirbu » Unassigned
Status: Needs work » Needs review
StatusFileSize
new3.21 KB

Since there has been no response for a few weeks... Here is a new patch. I simplified what was in the previous patch down to a much more concise topic, which I think still conveys the essential information. I didn't make an interdiff, because pretty much every line of the file changed.

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.

rkoller’s picture

Status: Needs review » Needs work

I have taken a look at patch #48 and here are a few thoughts and suggestions about the "Optimize site performance" help topic.

- If you start from the perspective of a novice user and enter the top level topic "Optimizing site performance" in his or her shoes you would expect actionable task descriptions instead he or she is confronted with two questions at first; what is caching and what is file aggregation? Well each is provided with an explanation but if the user hasn't a certain degree of background knowledge that step might be a bit too abstract and detached from the top level topic. Instead writing what the gist of "Optimizing site performance" is - simply to make the site faster (the load times as well the perceived performance) for anonymous as well as logged in users. That is accomplished by caching and file aggregation out of the box. I would mention that in most parts there is no need for configuration. And also name and briefly explaining the available parts in the introductory gist part instead of the "What can I do to improve my site's performance?" part. And maybe link to the additional documentation for the caching modules maybe inline instead of as additional resources underneath. So it isn't detached and separated.

- For the only available task to describe I would describe aside where to find those settings also what they are actually good for. Meaning what effect has "no caching", when to choose a shorter max age and when to choose the maximum age of 1 day. And also when does it makes sense to switch of the aggregation of CSS and JS files and when not to. Just to provide some explanation and context about the effect and thoughts behind those settings.

- I've also entered the text in http://www.hemingwayapp.com and the readability level for a few sentences is still hard to very hard. Overall readability score is labeled as good.

jhodgdon’s picture

Thanks for the review!

The "What is" format is part of our help topic standards. We do not want to mix concepts into the steps -- that is not considered good practice for technical writing in general. There are 2 ways to do that: (a) have a separate overview topic with the concepts and (b) have a separate section within the task topic. Our standard says if there is only 1 task we should do (b). So that is what is done here. The structure needs to stay as it is, unless we go back and change the standards, which we could do later but right now would really derail the whole process.

Apart from that question, I'm finding it difficult to take your review and act on it... Can you provide any specific suggestions of which sentences or steps you think need to be rewritten, and make bullet points rather than a rambling complaint? I just can't process what you've written, sorry!

rkoller’s picture

At first thank you for the feedback and a big sorry I got into rambling. That wasn't intended at all! I hope I now slowly get the ideas behind the concepts you've crafted out (Reading up on that one again helped). Always tended to slip in my own ideas for improvement. But you are totally right with the following point:

unless we go back and change the standards, which we could do later but right now would really derail the whole process.

So I try to stick to the current standards to speed the process up. I try to rephrase the suggestions:

- Perhaps add another help topic upfront like "What is site performance" explaining what is there in Drupal to accomplish that the site loads faster for anonymous as well as logged in users (load times as well the perceived performance). And that this is accomplished by caching and file aggregation out of the box in most parts with zero configuration.

-> Intention is bridging the gap between the abstract site performance in the headline and the questions "what is caching" and "what is file aggregation". So that not that tech savvy people know site performance is accomplished in Drupal mainly by caching and file aggregation with up to zero configuration explained in the topics afterwards.

- I've missed comment #44 where you've explained your reasoning behind "What can I do to improve..." so most of the other changes I suggested aren't valid anymore. The structure is good the way it is!

- Reduce the length of sentences. Perhaps split up longer sentences where applicable to further improve readability (Especially the caching and file aggregation paragraphs are highlighted in the http://www.hemingwayapp.com). One example:

Before:
Caching is saving already-rendered HTML output and other calculated data for later use the first time it is needed, so that the next time the same data is needed it can be quickly retrieved instead of recalculated.
After:
Caching is the storing of pre-rendered HTML output and other calculated data. Once that stored data is needed it can be retrieved instead of being recalculated.

jhodgdon’s picture

Thanks for the more concrete suggestions... some thoughts:

  1. You cannot assume that things will be set up "out of the box". Not everyone installs with the Standard profile -- they might have used Minimal or a distribution, and some of the modules and configuration may not be installed and/or set up for site performance if they didn't use the Standard profile, or they may have uninstalled modules, or inherited a site someone else already configured. I would not like to tell people that they should already have these things working, if they require a particular Core module to be installed -- they may have turned it off or not used the Standard profile.
  2. I assume that the phrase "site performance" would be understood without further explanation, which is why I didn't have a section "What is site performance".
  3. There is already a section on the page called "What can I do to improve site performance", which lists the modules you can turn on (if they're not already on) etc. But you cannot read that site without understanding cache and aggregation, which is why the topics on that page are in that order.
  4. OK, the sentence length could be reduced. But you have actually changed the meaning in the example you gave -- slightly anyway. In the sentence that is there, the word "so" is used to indicate the relationship between the first part "what is cache" and the second part "why is it useful". The second example is I think less clear (especially the second sentence is awkward!) and doesn't show that relationships as clearly. There may be a way to separate it out into two dependent sentences, but I'm not sure that it really buys you anything in readability or understandability, just because an online tool suggests it?

So... right now I'm not sure what I would want to do to improve these topics...

jhodgdon’s picture

Status: Needs work » Needs review
StatusFileSize
new2.79 KB
new3.47 KB

On second thought... I've made a few changes that should improve the readability (by shortening sentences), and I also added a section to the top called "What is site performance".

Status: Needs review » Needs work

The last submitted patch, 54: 3044059-54.patch, failed testing. View results

jhodgdon’s picture

Status: Needs work » Needs review
StatusFileSize
new3.47 KB

Sorry, typo -- trans vs. endtrans at the end of thls line

+<p>{% trans %}Site performance, in this context, refers to speed factors such as the page load time and the response time after a user action on a page.{% trans %}</p>

Here's a hopefully fixed patch. Not on my computer where I can test this right now, sorry!

bramdriesen’s picture

Status: Needs review » Reviewed & tested by the community

Looks great to me :-)

alexpott’s picture

Version: 9.1.x-dev » 8.9.x-dev
Status: Reviewed & tested by the community » Fixed

Committed and pushed 8b9b1304b5 to 9.1.x and 14afd1cbe5 to 9.0.x and 4ad4f0b226 to 8.9.x. Thanks!

Backported to 8.9.x since this is an experimental module and this is only text.

  • alexpott committed 8b9b130 on 9.1.x
    Issue #3044059 by jhodgdon, vadim.hirbu, Gayathri J, Vitor Faria,...

  • alexpott committed 14afd1c on 9.0.x
    Issue #3044059 by jhodgdon, vadim.hirbu, Gayathri J, Vitor Faria,...

  • alexpott committed 4ad4f0b on 8.9.x
    Issue #3044059 by jhodgdon, vadim.hirbu, Gayathri J, Vitor Faria,...

Status: Fixed » Closed (fixed)

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