Write README.md and module description

Created on 15 October 2024, 11 months ago

Problem/Motivation

The project page should clearly describe, what the module does.

It should also reference Posthog and clearly point out, that this is an integration.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Active

Component

Code

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
  • Status changed to Needs work 7 months ago
  • πŸ‡©πŸ‡ͺGermany lrwebks Porta Westfalica
  • πŸ‡©πŸ‡ͺGermany lrwebks Porta Westfalica
  • πŸ‡©πŸ‡ͺGermany lrwebks Porta Westfalica
  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    @grevil would you please do this by time? No urgency ;)

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

    Once this is merged, I can copy the README to the module page (changing it up a bit of course to better fit the webpage setting).

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

    Hm, the README doesn't go deep enough for me. We should have submodule specific sections, with their respective requirements, and what they do and how to do basic configuration.

  • πŸ‡©πŸ‡ͺGermany Grevil

    But I love the idea of a single README! Good stuff :)

    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 Grevil
  • πŸ‡©πŸ‡ͺGermany lrwebks Porta Westfalica

    We should have submodule specific sections, with their respective requirements, and what they do and how to do basic configuration.

    In that case, we should opt to have a README for each of the submodules within their respective module folders, instead of cramming everything into here, right? At least, a lot of complex modules like Webform do it that way.
    In a sense, I have already prepared us for this approach by keeping the main module description general and listing submodule features rather than explaining them in detail.

    @grevil, what do you think about this? I will add the help hook in the meantime.

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

    Re #12 I agree. I also think modularity and a specific README.md per submodule might be the better choice, instead of a huge one in the main module. The submodules should better describe themselves.

    Anyway we should not waste too much time on this. @Grevil maybe AI can generate them? Would that speed things up?

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

    Now every submodule has a proper README and a help hook. Since I am not really involved with the concrete functionality of all those modules, please remind me of any important steps that would fall under the β€œConfiguration” section or add them yourself if you have the time. Thanks!

Production build 0.71.5 2024