Write module description and README.md

Created on 25 November 2024, 5 months ago

Problem/Motivation

Write module description and README.md

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Active

Version

1.0

Component

Documentation

Created by

πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

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

Merge Requests

Comments & Activities

  • Issue created by @Anybody
  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    And a screenshot from the setting in the product variation type, please :)

  • niharika.s β†’ made their first commit to this issue’s fork.

  • Pipeline finished with Success
    3 months ago
    Total: 164s
    #396336
  • Status changed to Needs work 2 months ago
  • πŸ‡©πŸ‡ͺGermany lrwebks Porta Westfalica

    The proposed README is still missing a lot of points and not following the Drupal Standard β†’ very well, so I will redo it quickly.

  • πŸ‡©πŸ‡ͺGermany lrwebks Porta Westfalica

    Once this is merged, I can use the README as a template for the module page and improve it a bit (including our support snippets at the end of the page).

  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica
  • πŸ‡©πŸ‡ͺGermany Grevil

    Commented the MR.

  • πŸ‡©πŸ‡ͺGermany Grevil

    And don't forget the README help page hook:

    /**
     * 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;
    }
  • πŸ‡©πŸ‡ͺGermany lrwebks Porta Westfalica

    I have added the help hook now and also rephrased the description and configuration sections to point out that the prefix label is generated, and the separator is configurable.

    @grevil, what do you think β€” is the new phrasing appropriate?

Production build 0.71.5 2024