Problem/Motivation
#3041924: [META] Convert hook_help() module overview text to topics for the admin UI-related modules: contextual, help, inline_form_errors, quickedit, settings_tray, shortcut, toolbar, tour 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:
- 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
siddhant.bhosale commentedComment #3
siddhant.bhosale commentedI have made the patch for the above mentioned modules.
Please review.
Comment #4
siddhant.bhosale commentedI have made the patch for the above mentioned modules.
Please review.
Comment #5
siddhant.bhosale commentedComment #7
snehalgaikwad commentedI tried this patch, here adding few suggestions.
1. Using the administrative toolbar
- The heading itself says about administrative toolbar it is making confusion with admin toolbar(contrib) and toolbar(core) modules. Need to be explained about toolbar module in detail.
2. How to use the settings tray
- More detailed steps need to be added with navigation
3. Using the quick edit module
- Quick edit file name is not correct, it should me same as module name. Currently it is quick_edit.overview it should be quickedit.overview
4. Managing the shortcut
- Write with goal and detailed steps for shortcuts
Comment #8
pratik_kamble@siddhant.bhosale patch is failing. Please have a look at it.
Comment #9
jhodgdonThe current fail message is:
Topic shortcut.configure is either top-level or related to at least one other top-level topic
What that means is that every topic either needs to be labeled as "top level", or if not, it must be related to a "top level" topic. shortcut.configure is neither. It should probably be marked as "related" to core.ui_components.html.twig, which already mentions the Shortcut module.
A few other comments about the patch:
a) core.administrative_toolbar.html.twig -- this topic is only related to the toolbar module, so it should be in the toolbar namespace, not core (i.e., change the file name). Given that, it shouldn't need to mention that the Toolbar module needs to be enabled (because the topic will be hidden if the module is not on). Note that the core.ui_components topic already gives a one-line summary of this functionality (including mentioning the module).
b) Probably most of the other topics in this patch in the "core" file namespace also need to be moved to other namespaces. If they aren't already mentioned in the core.ui_components topic, you may need to add a line or two to that topic, as part of this patch.
c) Please read the page on help topic standards. This tells what we do and don't want to see in topics, how to divide help text into topics, and the allowed headings. For example, "About" is not an allowed heading in either a task or concept topic. Also, we are not looking for module overviews here -- topics need to either be about tasks or about concepts, not about modules. https://www.drupal.org/docs/develop/documenting-your-project/help-topic-...
Comment #10
siddhant.bhosale commentedThanks for the suggestions @jhodgdon and @snehalgaikwad. Will make the changes.
Comment #11
siddhant.bhosale commentedHi, I have uploaded the patch with suggestions implemented.
Comment #12
siddhant.bhosale commentedComment #13
siddhant.bhosale commentedHi, I have uploaded the patch with suggestions implemented and fixed the coding standard.
Comment #14
siddhant.bhosale commentedHi, I have uploaded the patch with suggestions implemented and fixed the coding standard. Also adding the interdiff of patches
help_topic-3095739-04.patch and help_topic-3095739-14.patch
Comment #15
siddhant.bhosale commentedComment #18
siddhant.bhosale commentedThe test case failed as there was one string which was not encoded in {% trans %}. Adding the changes.
Comment #19
ravi.shankar commentedComment #21
jhodgdonIt looks like one of the topics has enough of a syntax error that it cannot be viewed. I suggest applying the patch to a live Drupal site and trying to view all the topics in the patch, to figure out which one is the problem. It is always a good idea to do that before you upload a patch anyway. Sometimes viewing the topics inside a Drupal site and reading them will show you problems that you would not see in the code editor.
Comment #22
siddhant.bhosale commentedComment #23
jhodgdonI'm going to make a new patch now, since there has not been a response in a few days...
Comment #24
jhodgdonThanks for the patches! Rather than review again, I decided to make a new patch (saves time and is easier for me than explaining what needs to be done and waiting to see if my suggestions are understood). I made a few changes of note in this patch:
a) There is some confusion in the topics between Overview topics and Task topics, and which headings belong where -- see Standards for Help Topics. For example, an Overview topic should not have a Goal, and a Task topic (which has a Goal), needs to have Steps. So for example, the toolbar topic in the previous patch is a mixture of both... not so good.
b) Some of the topics probably we don't need as they are... For example, the topic "Using the toolbar" is actually just an overview of the administrative menu system headings. Which is useful to have, but it is not specific to the Toolbar module or the Toolbar at all. If you go to /admin you will see those same menu items, even if you don't have the toolbar module enabled. So, I think the information is better as a section of the core.ui_components topic, and I moved it there.
c) As stated in previous reviews, we do not want module overview topics or module overview sections. So please please please don't make sections called "What is the xyz module" or "Overview of the xyz module".
d) A core topic should never list as Related a topic that is not in the core namespace. It is better to put the Related link on the other topic.
e) Topic titles should be in "Sentence case" not "Title Case".
With all that in mind, here is a new patch. There were too many changes to make an interdiff file useful, sorry.
Comment #25
senthilmohith commentedComment #26
senthilmohith commentedI have reviewed the patch #24 and it's working fine as we expected in the 8.9.x version. Please find the attached screens.
Comment #27
jhodgdon"Working fine" is not the review we are looking for (see issue summary for review instructions). I'm setting this back to Needs Review, because I don't think all of the items in the issue summary were probably checked by this reviewer, since they didn't mention what they did.
Comment #28
pratik_kambleComment #29
pratik_kamble@jhodgdon, Thanks for the patch. The patch covers help topics for inline_form_errors, quickedit, settings_tray, shortcut, toolbar, tour, contextual links. LGTM.
Comment #30
pratik_kambleComment #31
jhodgdonThanks for taking a look! Can you confirm that you followed all the review steps in the issue summary please (such as following all the steps, clicking the links, reading carefully for grammar, HTML validation, etc.)? They are listed in the issue summary at the top of this page, under "Remaining tasks", item (b).
Comment #33
pratik_kamble@jhodgdon, I have checked the patch in #24. I have verified the patch using the tasks mentioned for the review process against branch 9.1.
Verified the grammar for the patch and found few minor issues for punctuation and grammar. Attaching a new patch with correction.
Comment #34
pratik_kambleComment #35
jhodgdonThanks very much for the careful review! Most of your suggested changes look good. Two exceptions:
a)
This change doesn't look good to me. I think the first sentence doesn't make sense now at all. Maybe we can change it to two sentences:
Find the pencil button for the content or setting you want to edit. Click the button to open the contextual links for that part of the page.
b)
Taking the comma out here is incorrect according to the standards of the Drupal project. See https://www.drupal.org/drupalorg/style-guide/content#english and look for "serial comma" in that section.
So, here's a patch that fixes these two things.
Comment #36
pratik_kambleComment #37
pratik_kambleThanks @jhodgdon for pointing out the issues. Validated both grammar and HTML. Language is also simple and straight forward. New suggested changes LGTM.
Comment #38
pratik_kambleComment #40
jhodgdonUnrelated test fail in Drupal\Tests\quickedit\FunctionalJavascript\QuickEditIntegrationTest::testArticleNode
Comment #42
jhodgdonThis fail was
Looks like a random infrastructure glitch.
Comment #44
jhodgdonUnrelated fail in Drupal\Tests\quickedit\FunctionalJavascript\QuickEditIntegrationTest
Comment #46
jhodgdonUnrelated fail in Drupal\Tests\jsonapi\Functional\FileTest::testRelated this time.
Comment #48
jhodgdonDrupal\Tests\media_library\FunctionalJavascript\WidgetUploadTest failed this time.
Comment #50
jhodgdonThis should not really be a Novice issue
Comment #51
catchI'm not sure we need to use 'non-administrative' here. If an entity is rendered normally on an admin page, it will have quick edit links, and it will be possible to edit inline there too. For example you could have a block that shows on admin pages, and quickedit would let you edit that block inline without going to admin/structure/block.
What this is really trying to say is that you don't have to go to a separate page to edit. I think we could just drop 'while visiting a non-administrative page' and 'on a non-administrative page'.
This seems out of scope?
Comment #52
ayushmishra206 commentedAddressed #51.1 in this patch. Also added an interdiff to reflect that. Please review.
Comment #53
jhodgdonThanks! The interdiff looks good to me.
Regarding #51.2, I think it is in scope. We are documenting the Toolbar module, and the core.ui_components.html.twig mentions that the Toolbar module displays the admin menu. I think that a section documenting what is in the menu needs to exist in order to document Toolbar fully (and it should be in the help topics somewhere)... We could delay this issue and do that documentation elsewhere (technically it is provided by the System module but we didn't document it when we wrote the system module help topics, so here we are)... I think we should do it here since I think it belongs in this topic that we are adding information to.
Comment #54
jhodgdonComment #56
jhodgdonLooks like a random database server error for this fail in Drupal\Tests\workflows\Functional\Rest\WorkflowXmlBasicAuthTest.
Comment #57
ilgnerfagundes commentedI applied the patch and for me everything is correct, rtbc +1
Comment #58
catchQuick edit and settings tray both have explicit dependencies on the contextual links module, so there's no need to make sure that contextual links is installed.
Settings tray has an explicit dependency on core toolbar, and quickedit doesn't.
Really the modules are responsible for making sure that they work with the correct dependencies, not the site admin, so I think this bullet can be removed.
Can we show the pencil icon here?
Comment #59
jhodgdonRegarding the pencil icon, it is in the CSS for the contextual links module, so themes can override it. So probably we shouldn't call it a pencil icon or if we do, we should say it depends on the theme.
Regarding the modules, on #3121340: Fix up minor copy problems in help topics we will be adding a separate "Who can" section to topics, which covers permissions and modules that need to be installed, so I put this information there and rewrote the topic.
Comment #60
andypostFix url generation with
help_topic_linkCR https://www.drupal.org/node/3192582Comment #61
jhodgdonThanks!
I think this needs a bit more thought though. Since the help_topic_link function will put in the actual topic name instead of custom text, we need to make sure the topic name makes sense in context of the sentence where the link goes. I think both of these changes fail in that regard and need to be adjusted. Here's a new patch.
Comment #62
andypostMixed patch and interdiff names
Looks better, meantime I find having suffixes like (_topic, _link) useful
EDIT For example
s/{{ accessibility }}/{{ accessibility_topic }}Comment #63
jhodgdonSorry about the mixed-up file names. Not sure what I was thinking! Anyway, here's a patch with suffixes on the variables.
Comment #64
jhodgdonI really shouldn't be making patches today apparently. Wrong extension on the Interdiff. ?!?
Comment #65
ankit mauryaComment #66
andypost@jhodgdon thank you!
I think it rtbc again
@ankit1114 please check it
Comment #67
jhodgdonRestoring tag that was removed. Please don't remove past event tags, thank you! Also in general, people are asked not to assign themselves on Core issues. Instead, please add a comment explaining that you plan to work on it and giving a time frame, something like:
I am reviewing this patch at the Drupallover event, and will report back within 1 day.
That way if you don't report back, we know that someone else can start working on the issue.
Comment #68
daffie commentedJust 1 remark:
On the page using the administrative interface: Can we change "/admin" to a link in the sentence: "The administrative menu, which you can navigate by visiting /admin on your site or by using an administrative toolbar"
Comment #69
jhodgdonExcellent idea -- thanks for reviewing! I can probably make a patch for this tomorrow, unless someone else has time before.
Comment #70
jhodgdonThis should take care of making that link.
Comment #72
jhodgdonFixed the mismatched em tag. Interdiff -- was:
now
Comment #73
daffie commentedI followed the review process as described in the IS.
I all looks good to me.
For me it is RTBC.
Comment #74
kleiton_rodrigues commentedTested the Patch #72 by @jhodgdon, applied successfully and looks good to me.
RTBC + 1
Comment #76
larowlanThis functionality relies on the quickedit module being enabled. Should we reference that?
edit: we do that on the top level page, ignore
The items visible will also depend on permissions.
Should we mention that?
Comment #77
jhodgdonGood idea! Here's a very minor update to the patch (which I edited directly to make item 2 from the previous comment say:
... depending on which modules are currently installed on your site, and your permissions
I used the interdiff utility to make an interdiff file too.
[edited this comment to make it less confusing]
Comment #78
daffie commentedThe point (#76.2) of @larowlan has been addressed. Back to RTBC.
Comment #79
larowlanAdding issue credits, unchecking @ilgnerfagundes - there's no need to provide screenshots that a patch applies. Unchecking @kleiton_rodrigues who provided a screenshot of a patch applied as well as a screenshot of one of the three topics added in this patch, we already had screenshots at that point. If you disagree with my assessment, please comment and I'll review. Please note https://www.drupal.org/node/2888804 for how we assign credit.
Comment #81
larowlanCommitted 0f7faa6 and pushed to 9.3.x. Thanks!
Backported to 9.2.x because help topics is experimental.
Comment #83
quietone commentedAdjusting credit as described in #79. I happened to notice that @kleiton_rodrigues was not to be ticked.