Problem/Motivation

#3041924: [META] Convert hook_help() module overview text to topics for the menu_link_content, menu_ui 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
#32 3095740-32.patch8.53 KBjhodgdon
#32 interdiff.txt7.73 KBjhodgdon
#27 interdiff.txt3.03 KBpratik_kamble
#27 3095740-27.patch8.54 KBpratik_kamble
#24 30595740-24.patch8.56 KBjhodgdon
#20 interdiff.3095740.17-20.txt13.91 KBVladimirAus
#20 drupal-menu_help_topics-3095740-20-d8.patch9.8 KBVladimirAus
#18 MenuReview.JPG100.03 KBkuralarasanm
#17 interdiff.txt619 bytesshimpy
#17 3095740_17.patch16.23 KBshimpy
#14 3095740_13.patch7.96 KBshimpy
#14 interdiff.txt13.33 KBshimpy
#12 Screenshot from 2020-01-10 13-23-35.png114.05 KBshimpy
#12 Screenshot from 2020-01-10 13-22-36.png100.59 KBshimpy
#12 Screenshot from 2020-01-10 13-22-21.png102.18 KBshimpy
#12 Screenshot from 2020-01-10 13-22-08.png128.06 KBshimpy
#12 Screenshot from 2020-01-10 13-21-51.png100.2 KBshimpy
#12 3095740_12.patch7.98 KBshimpy
#12 interdiff.txt13.31 KBshimpy
#9 menu_help_topics-3095740-09.patch12.22 KBRangaswini
#9 interdiff-05-09.txt11.48 KBRangaswini
#5 menu_help_topics-3095740-05.patch9.81 KBRangaswini
#5 interdiff-04-05.txt472 bytesRangaswini
#4 menu_help_topics-3095740-04.patch9.79 KBRangaswini
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhodgdon created an issue. See original summary.

Rangaswini’s picture

Assigned: Unassigned » Rangaswini
jhodgdon’s picture

@Rangaswini -- are you still planning to work on this issue? If so, please comment here. If not, please unassign so that someone else can work on it. Thanks!

Rangaswini’s picture

Rangaswini’s picture

Assigned: Rangaswini » Unassigned
Status: Active » Needs review
FileSize
472 bytes
9.81 KB
jhodgdon’s picture

Status: Needs review » Needs work

This is a good start, thanks!

A few things that need to be done to improve the patch -- see the help topics standards page for reference: https://www.drupal.org/docs/develop/documenting-your-project/help-topic-...

a) Steps should be OL lists not UL lists on task topics.

b) A few of the topics are not following our heading structure, like missing the heading for Steps.

c) grammar proofreading in all topics. There are a lot of missing articles (a/an/the).

d) core.menus.html.twig -- how about putting the "What is a menu?" section first? Also when answering "What is a menu link?", answer that question, not "What is the Menu Link module?" (which is what the answer looks like). We don't want module overview topics.

e) Some of the navigation instructions follow our conventions, and some of them don't. See standards page.

f) menu_ui.delete.html.twig -- steps seem to be about adding a menu, not deleting it?

Rangaswini’s picture

Assigned: Unassigned » Rangaswini
Status: Needs work » Active
jhodgdon’s picture

Status: Active » Needs work

Needs work is the correct status for an issue that has a patch that needs to be updated.

Rangaswini’s picture

Rangaswini’s picture

Assigned: Rangaswini » Unassigned
Status: Needs work » Needs review
shimpy’s picture

Assigned: Unassigned » shimpy
shimpy’s picture

Status: Needs review » Needs work

The last submitted patch, 12: 3095740_12.patch, failed testing. View results

shimpy’s picture

Status: Needs work » Needs review
FileSize
13.33 KB
7.96 KB

New patch

Status: Needs review » Needs work

The last submitted patch, 14: 3095740_13.patch, failed testing. View results

jhodgdon’s picture

I will wait to review this patch until the tests pass... Thanks!

shimpy’s picture

Status: Needs work » Needs review
FileSize
16.23 KB
619 bytes

Hii I have recreated a patch for test to pass. Please review.

kuralarasanm’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
100.03 KB

Hi,

I have tested the patch and looks good. Related topics also looks well and good. Please find the attached image for reference. Hence I am changing the status to RTBC.

Menu Help Topic Review

Thanks.

jhodgdon’s picture

Status: Reviewed & tested by the community » Needs work

Just a quick look -- this patch has some grammar problems. Also some HTML problems, such as in the top-level topic, under Additional Resources there is a UL list but the item in the list is not in an LI tag. Also not all the topics follow the templates/standards in Standards for Help Topics.

I don't have time for a full review right now and there may be other problems, so I'm just setting it back to Needs Work.

VladimirAus’s picture

Status: Needs work » Needs review
FileSize
9.8 KB
13.91 KB

Reviewed and updated.

benjifisher’s picture

Assigned: shimpy » Unassigned
Issue tags: +midcamp2020

I am unassigning this issue and tagging it for MidCamp 2020. I hope we can get someone to work on it today.

benjifisher’s picture

Issue tags: -midcamp2020

We did not get to this issue at MidCamp yesterday, so I am removing the tag.

jhodgdon’s picture

Status: Needs review » Needs work

Thanks for the patches! And sorry for the delay reviewing. I had some time today, so I looked at the most recent patch (#20). I did not apply the patch, just looked at the text. It still needs some work:

  1. core.menus.html.twig
    • Title should be sentence case not proper case (second word not capitalized).
    • What is custom menu link?
      This heading, if we keep it, should be written "What is a custom menu link?". However, as written, the text in this section seems to be describing the functionality of the Custom Menu Links module, not giving us information about what a custom menu link is. I am getting kind of tired of saying this in reviews, but please go read the help topic guidelines https://www.drupal.org/docs/develop/documenting-your-project/help-topic-... before making or revising patches. We do not want to have text that describes modules. We want to have text in our topics that tells you how to do things with Drupal (task-oriented), or that give overviews and background information that you would need to perform these tasks. So, this section needs a rewrite, or maybe the small amount of information that is actually needed to describe custom menu links should be added to the previous section? So that section might just have a few sentences saying that the links in the menu can either be provided by modules, or can be custom (and explain what a custom link is).
    • This topic is missing the required "Overview of managing menus" section for an Overview topic (see help topic standards)
  2. menu_ui.content_type_configuration.html.twig
    • Goal section text should start with "Configure" not "Configuring". Again, please read the help topic standards and look at the example there and other help topics as models. Goal should also have an additional sentence with more information about what you are configuring, which is setting up which menu items each type of content can be placed in when adding/editing content.
    • Navigation is wrong. Should not be going to Add content type.
    • Choose <em>Menu settings</em> tab. Select the required menus. We should word this as "Under Menu settings, select the menus that you would like to have content items placed in", or something like that.
    • Last sentence should be something like "Optionally, select a parent menu item, if the content items should not be placed at the top level of the menu." or something similar.
    • Missing an instruction to click Save or Save configuration or whatever the button is called.
  3. Other topics need similar work, as well as grammar/punctuation. Really, someone needs to read them through carefully, make sure they are worded consistently with other topics, make sure there are not grammar/punctuation errors, and make a new patch. When I have time, I will work on a new patch if someone else doesn't do it first... but I think my time would be better spent making this patch rather than explaining all the necessary changes in an issue comment.
  4. I'm also not sure that the division into topics makes perfect sense... do we need whole topic on how to expand a menu item, for instance, or should we just add a "What settings do menus have?" heading to the overview topic, and explain this and other settings on menus and menu items? That might be more useful.

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.

pratik_kamble’s picture

Assigned: Unassigned » pratik_kamble
pratik_kamble’s picture

@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.
Validated HTML, no issues found.
Links within the text redirects to appropriate pages.
Adheres to Standards for Help Topics.
The text is written in clear, simple, and in straightforward language. At two places I find changes were needed so attaching a new patch with correction.

pratik_kamble’s picture

Assigned: pratik_kamble » Unassigned
jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Thanks very much for the careful review! The changes you have suggested look very good to me. I think that since you have given this a careful review, we can mark the latest patch RTBC on the strength of that review with your two small changes.

catch’s picture

Status: Reviewed & tested by the community » Needs review
+++ b/core/modules/help_topics/help_topics/core.menus.html.twig
@@ -0,0 +1,14 @@
+related:
+  - block.place
+---
+<h2>{% trans %}What is a menu?{% endtrans %}</h2>
+<p>{% trans %}A menu is a collection of links used to navigate a web site; the links are known as <em>menu items</em>. Menus and menu items can be provided by modules or site administrators.{% endtrans %}</p>
+<h2>{% trans %}Managing menus overview{% endtrans %}</h2>

Reading through the help text, it looks like we use menu link and menu item interchangeably. Is that by design or should we try to standardise?

jhodgdon’s picture

Status: Needs review » Needs work

Good point, we should standardize on what it says in the UI, which I is "link". We should also verify that this is consistent in the UI, but that would be a separate issue if it's not consistent.

jhodgdon’s picture

Status: Needs work » Needs review
FileSize
7.73 KB
8.53 KB

Well, the Menu UI module uses a mix of terms -- it usually says "menu link" or "link", but it occasionally says item. I created an issue for thatL:
#3158562: Consistently refer to "menu links" as that, not "menu items", in the UI

I will assume that should be fixed eventually, and proceed with this fix. Note that some UI text is referred to directly in the help, and so the word "item" still appears in the help. Here's a new patch.

Adsyy’s picture

Status: Needs review » Reviewed & tested by the community

Hi, i'm a bit new to contributing, i've setup my local environment 9.1-dev and apply your patch. I've look the topic and how to complete this "Review task", seems good for me. passing to RTBC.

  • catch committed f669278 on 9.1.x
    Issue #3095740 by shimpy, Rangaswini, jhodgdon, pratik_kamble,...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed f669278 and pushed to 9.1.x. Thanks!

Status: Fixed » Closed (fixed)

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