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:
- 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().
- 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.
- 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.
- 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).
- 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).
- 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).
- 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:
- Apply the patch.
- Turn on the experimental Help Topics module in your site, as well as the module(s) listed in this issue.
- 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.
- 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].
- 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
Comment #2
vadim.hirbu commentedAdded patch.
Comment #3
vadim.hirbu commentedComment #4
bramdriesenIs this correct English? Sounds very weird to me.
Comment #5
vadim.hirbu commentedComment #6
vadim.hirbu commentedComment #7
jhodgdonHere is the hook_help() module overview topic for this module that we are trying to replace:
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!
Comment #8
vadim.hirbu commentedAdded a patch with big_pipe topic on help_topics module #2920309: Add experimental module for Help Topics.
Comment #9
jhodgdonSorry 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!
Comment #10
vadim.hirbu commentedComment #11
jhodgdonLooks 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.
Comment #13
jhodgdonDon'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.
Comment #14
jhodgdonComment #15
jhodgdonWe need to postpone this until the #2920309: Add experimental module for Help Topics gets committed. No idea when/if that might happen right now...
Comment #16
jhodgdonThat issue was committed, so we can un-postpone this now!
Comment #17
jhodgdonAdding some more modules to this task.
Comment #18
jhodgdonUpdated issue summary with better instructions/guidelines
Comment #19
jhodgdonSome new guidelines again. Please check out the new issue summary. Thanks!
Comment #20
jhodgdonWe've migrated the help topic standards to https://www.drupal.org/docs/develop/documenting-your-project/help-topic-... so updating issue summary again.
Comment #21
volkswagenchickTagging this for badcamp2019. (October 2-5)
Comment #23
jhodgdonWe 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.
Comment #24
mradcliffeTagging for amsterdam 2019 event.
Comment #25
vitor faria commentedI am going to work on this.
Comment #26
vitor faria commentedHave 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"
Comment #27
vitor faria commentedComment #28
joycelam commentedHi, I'll be testing/reviewing the patch.
Comment #29
ChrisBee commentedHi, I'll be reviewing the patch.
Comment #30
ChrisBee commentedFile names must be MODULENAME.TOPICNAME.html.twig, without the prefix help_topics
File names must be MODULENAME.TOPICNAME.html.twig, without the prefix help_topics
File names must be MODULENAME.TOPICNAME.html.twig, without the prefix help_topics
Comment #32
joycelam commentedHi, 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].Comment #33
jhodgdonAlso, 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!
Comment #34
gayathri j commentedHi 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
Comment #35
gayathri j commentedComment #36
jhodgdonPlease, 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!
Comment #37
gayathri j commented#36 I will do like this onwords thank you i am trying to fix error i will make another patch.
Comment #38
gayathri j commentedComment #39
gayathri j commentedComment #41
gayathri j commentedComment #42
gayathri j commented#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.
Comment #44
jhodgdonYes, 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, ...".
Comment #45
sukottokun commentedI took a pass at the overview section described in #44.
Comment #47
jhodgdonThanks 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:
On the Admin > Config > Development > Performance pageso that it matches the standardsComment #48
jhodgdonSince 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.
Comment #50
rkollerI 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.
Comment #51
jhodgdonThanks 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!
Comment #52
rkollerAt 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:
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.
Comment #53
jhodgdonThanks for the more concrete suggestions... some thoughts:
So... right now I'm not sure what I would want to do to improve these topics...
Comment #54
jhodgdonOn 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".
Comment #56
jhodgdonSorry, typo -- trans vs. endtrans at the end of thls line
Here's a hopefully fixed patch. Not on my computer where I can test this right now, sorry!
Comment #57
bramdriesenLooks great to me :-)
Comment #58
alexpottCommitted 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.