Supply better information on how to get started with this module

Created on 30 September 2024, 3 months ago

Problem/Motivation

We recently got a few issues regarding the usability of this module, let's make the steps a bit clearer.

Steps to reproduce

  • Implement hook_help() in each module / submodule, here is a snippet:
/**
 * Implements hook_help().
 */
function my_module_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    case 'help.page.my_module':
      $text = file_get_contents(__DIR__ . '/README.md');
      if (!\Drupal::moduleHandler()->moduleExists('markdown')) {
        return '<pre>' . Html::escape($text) . '</pre>';
      }
      else {
        // Use the Markdown filter to render the README.
        $filter_manager = \Drupal::service('plugin.manager.filter');
        $settings = \Drupal::configFactory()->get('markdown.settings')->getRawData();
        $config = ['settings' => $settings];
        $filter = $filter_manager->createInstance('markdown', $config);
        return $filter->process($text, 'en');
      }
  }
  return NULL;
}
  • Adjust the message for when there are no project wiki entries. Currently it only says: "There are currently no entries in the Project Wiki." Add further information on how to get started with the module ( e.g.: "Install the 'project_wiki_entity_content' for creating wiki entries per UI, install the 'project_wiki_markdown_content_example', for a markdown example, etc.)
  • Make adjustments to the module page description.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇩🇪Germany Grevil

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024