Additional People to Credit
There were several issues that had patches that were combined into this one. Additional people to credit, who worked on the other issues:
#3043460: Convert automated_cron module hook_help() to topic(s)
vadim.hirbu
BramDriesen
shwetaneelsharma
#3047585: Convert ban module hook_help() to topic(s)
lisagodare@gmail.com
Problem/Motivation
#3041924: [META] Convert hook_help() module overview text to topics for the automated_cron, ban, dblog, syslog, system, update, and user modules
Exception: Functionality in the System module that is related to themes should go in #3055055: Convert appearance-related modules: breakpoint, color, layout_builder, layout_discovery module hook_help() to topic(s) instead.
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.configuringwithin 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.
| Comment | File | Size | Author |
|---|---|---|---|
| #38 | 3041926-38.patch | 32.3 KB | jhodgdon |
| #38 | interdiff.txt | 2.8 KB | jhodgdon |
| #34 | Screenshot 2019-11-20 at 2.44.34 PM.png | 59.73 KB | anmolgoyal74 |
| #34 | Screenshot 2019-11-20 at 2.41.28 PM.png | 110.09 KB | anmolgoyal74 |
| #34 | Screenshot 2019-11-20 at 2.40.11 PM.png | 115.39 KB | anmolgoyal74 |
Comments
Comment #2
jhodgdonComment #3
jhodgdonI'm working on this as a test for the meta issue process.
Comment #4
jhodgdonOK, first the analysis. The current hook_help() [module overview part] for the actions module says:
So it looks like the tasks here are:
- Viewing available actions
- Configuring advanced actions
This is fairly short, so I wrote it up in one topic called "Viewing and managing actions". Since there is not yet a top-level topic that this belongs in, I have put it as top-level for now. Added a note to #3031642: Deprecate hook_help() and combine with Topics that after this whole project is done, we may need to reorganize the topics.
Anyway, here's a patch. Obviously won't do anything until #2920309: Add experimental module for Help Topics is committed.
Comment #5
vadim.hirbu commentedJust tested both patches and the file name of help topic is not working with this patch https://www.drupal.org/project/drupal/issues/2920309.
Comment #6
jhodgdonGood catch! I guess I named it "actions" instead of "action". Thanks for testing!
Comment #7
jhodgdonI will add a note to the meta issue with the file name concern.
Comment #8
jhodgdonUpdating issue summary as per new issue template from the parent issue.
Comment #9
jhodgdonUpdated summary from template.
Comment #10
shwetaneelsharma commentedTested the patch 3041926-5.patch. Although the information provided is similar, I have an observation as mentioned below:
Comment #11
jhodgdonThanks for reviewing! That link for configuring the Action module permissions is generated automatically on all hook_help() module overview pages. It will not be generated automatically in the help topics.
So, that is something we need to think about...
Comment #12
jhodgdonI created an issue to discuss this question of what to do about the permissions links.
Comment #13
jhodgdonGuess this needs to be postponed until that decision is made.
Comment #14
benjifisherI am updating the issue summary with the screenshots from #10. Yay, screenshots!
I also moved the completed tasks from "Remaining tasks" to "Completed tasks".
Comment #15
jhodgdonI have un-postponed most of the issues for conversion, but this one is still blocked (see #12).
Comment #16
jhodgdonWe are combining this issue with several other modules.
Patches to be added and people to credit:
#3043460: Convert automated_cron module hook_help() to topic(s) - vadim.hirbu , shwetaneelsharma
#3047585: Convert ban module hook_help() to topic(s) - lisagodare@gmail.com
The other modules had not been patched yet.
Comment #17
jhodgdonUpdated issue summary with better instructions/guidelines
Comment #18
jhodgdonI don't think we need to make links to the permissions i n the tasks. But these topics need to be revisited based on our new guidelines (see issue summary). Also I'm not currently working on this issue.
Comment #19
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 #20
volkswagenchickTagging this for badcamp2019. (October 2-5)
Comment #22
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 #23
mradcliffeAdding event tag.
Comment #24
jhodgdonI'm going to work on this module. First thing: as a starting point, here's a not working patch that combines the patches for the related issues that were combined into this one with the previous patch on this issue.
And I updated the issue summary to make sure people from the other issues are credited here.
Comment #25
jhodgdonHere's a new patch -- still not done. What I did this time:
- Updated the meta-data for the three topics that were in the last patch to the new format, so that they would actually load.
- Wrote topics for the User module (and updated the one User module topic that was already committed)
- Made the Ban module topic be related to the User overview topic, instead of top-level
- The topics in this patch can at least be viewed now.
Still to do:
- Review the Action and Automated Cron topics. They probably shouldn't be top-level but right now there is nothing obvious to Relate them to.
- Write topics for dblog, syslog, system, and update.
- This should probably include an overview topic on cron that would mention automated cron and other ways to run cron. We might not need a whole topic on automated cron actually.
- Probably the topics for dblog and syslog can be combined into a topic about logging.
- Maybe we'll need a top-level topic about maintenance and troubleshooting (we have a chapter on that in the user guide) -- that would probably be a good grouping for the logging, cron, and update topics.
Anyway, I'll upload this now and continue to work on this the next few days, but leaving at Needs Work because it is not done yet.
Comment #26
jhodgdontriggering tests, then I'll set this back.
Comment #27
jhodgdonComment #28
jhodgdonHere's a new patch, which fixes a couple of minor things, and adds new topics on Cron and a (currently mostly empty) top-level Maintaining topic. I got rid of the automated cron topic; the Cron topic covers this.
System module functionality that still needs to be documented:
- Maintenance mode
- Installing/uninstalling modules
- Updating modules, themes, and core [needs to be Related to existing Maintaining and Security topics]
- Themes: installing/uninstalling, setting default, admin theme -- or could add this to #3055055: Convert appearance-related modules: breakpoint, color, layout_builder, layout_discovery module hook_help() to topic(s), which is all about theme-related stuff? I think that would be better actually. This patch will already be big enough. I'll do that (updating summary here also).
- Reports and logging (syslog and dblog, plus other reports. See also system.config_error -- which covered logging settings and visiting the dblog page.)
Also still need to figure out what to do with Actions. I'm trying to figure out what core functionality actually uses actions or why someone would want to configure them.
Comment #29
jhodgdonComment #30
jhodgdonI had a discussion with berdir and xjm in Slack. I decided the Actions module should be in its own patch, as in Core it's really mostly used in Views. So I created #3094482: Convert action module hook_help() to topic(s), including views bulk operations and am taking Actions out of this issue (the patch still needs to have that topic removed).
Comment #31
jhodgdonHere's another iteration, which documents clearing the cache and maintenance mode.
Still to do in this patch:
- Installing/uninstalling modules
- Updating modules, themes, and core [needs to be Related to existing Maintaining and Security topics]
- Reports and logging (syslog and dblog, plus other reports. See also system.config_error -- which covered logging settings and visiting the dblog page.)
Comment #32
jhodgdonOK, here it is! I think this patch is actually ready for a review now.
One note: I did not write topics about updating Drupal Core or modules. I think this is pretty complicated, depends a lot on your hosting, and should be left to the User Guide, which covers all the contingencies.
Comment #33
jhodgdonOh wait, I forgot -- the actions topic is not supposed to be in this patch. I didn't make an interdiff -- same patch but without the file action.configuring.html.twig [that is moved to the related issue].
Comment #34
anmolgoyal74 commentedThe patch looks fine. Added some of the screenshots.
Just one question: Should we change 'anonymous' to 'visitor' now or should we wait for https://www.drupal.org/project/drupal/issues/479708
to get fixed?
Comment #35
jhodgdonWe should wait for the other issue to be fixed definitely.
Comment #36
amber himes matzTL;DR: Looks great. Setting to RTBC.
The patch in #33 modifies 4 existing topics and adds 14 new topics in core/modules/help_topics/help_topics.
Modified topics:
1. core.security.html.twig: Link to relevant User Guide chapter added. Link verified.
2. help.help_topic_search.html.twig: Related topic added to new-in-this-patch system.cache. Link added to system.cache in the body of the topic. Both links verified.
- We should add as related: core.cron
3. system.config_error.html.twig: Related topic added to new-in-this-patch core.maintenance. A line regarding database logging was removed because it is now covered in system.reports.html.twig and referenced in core.maintenance.html.twig.. Link verified.
4. user.security_account_settings.html.twig: Related topic added to user.overview. Link verified.
New topics:
1. ban.banning_ips.html.twig: (Install Ban module to view.) Looks good.
2. core.cron.html.twig: Looks good. Links verified.
3. core.extending.html.twig: Looks good. Links verified.
4. core.maintenance.html.twig: Looks good. All topics mentioned in the overview have related topic link listed.
5. system.cache.html.twig: Looks good. Links verified.
6. system.maintenance_mode.html.twig: Looks good. Links verified.
7. system.module_install.html.twig: Looks good. Links verified.
8. system.module_uninstall.html.twig: Looks good. Links verified.
9. system.reports.html.twig: Looks good. Links verified.
10. user.create.html.twig: Looks good. Links verified.
11. user.new_role.html.twig: Looks good. Links verified.
12. user.overview.html.twig: Looks good. Links verified.
13. user.permissions.html.twig: Looks good. Links verified.
14. user.update.html.twig: Looks good. Links verified.
Comment #37
amber himes matzSorry, just 1 thing. I pulled the RTBC trigger too soon. This was a big patch and my eyes got crossed a bit.
Comment #38
jhodgdonThanks for the thorough review! Here's a new patch with the fix to add core.cron as related in the search topic. Also added a link to the text of that step (since it's a core-namespace topic, it will always be available).
Comment #39
amber himes matzThank you @jhodgdon! Great idea to add a link to that step as well. Tested the new link and everything looks great.
This patch in #38 is good to go.
Comment #41
jhodgdonUnrelated random fails.
Comment #43
jhodgdonTest error this time is "Unable to start the web server", unrelated to this patch.
Comment #45
alexpottComment #46
alexpottCommitted and pushed abc0df85ba to 9.1.x and c6fba094be to 9.0.x and d5cdc02c2a to 8.9.x. Thanks!