hook_help() is not implemented

Created on 22 July 2024, 5 months ago

Problem/Motivation

Implement a Help Hook for the module

Steps to reproduce

Help link missing on extend list

Proposed resolution

none

Remaining tasks

Add help hook to module file

User interface changes

none

API changes

none

Data model changes

none

๐Ÿ“Œ Task
Status

Active

Version

1.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia amanbtr72

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

Comments & Activities

  • Issue created by @amanbtr72
  • Assigned to siddhraj
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia siddhraj Rajasthan
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia siddhraj Rajasthan

    Iโ€™ve added a hook_help() implementation for the address_suggestion module, which provides an overview of the module's features and use cases. This hook will display helpful information on the moduleโ€™s help page, detailing key functionalities such as country-specific address suggestions, integration with various fields, and auto-addition of house numbers.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia siddhraj Rajasthan
  • ๐Ÿ‡ต๐Ÿ‡ญPhilippines clarkssquared

    Hi siddhraj,

    I applied your patch #3 and I confirmed that it implements hook_help() with the module's overview, I will not upload a screenshot for issue's etiquette but this is the content of the help page:

    Address suggestion
    Add to Default shortcuts
    The Address Suggestion module is a powerful tool for automatically suggesting addresses during form input. It is an alternative to the deprecated Address Autocomplete module, offering more robust features and better integration.

    Features

    • Automatic address suggestions with country-specific precision.
    • Configurable per field widget.
    • Supports both plain text fields and address fields.
    • Supports CKEditor5 for address fields.
    • House number auto-addition.
    • Integration with Geo fields and Geolocation fields.

    The module improves address input accuracy by retrieving more precise suggestions, based on the country site by default.

  • ๐Ÿ‡จ๐Ÿ‡ฆCanada joseph.olstad

    Fixed in 1.0.x-dev branch

  • ๐Ÿ‡จ๐Ÿ‡ฆCanada joseph.olstad

    This change introduced several PHPCS errors.
    Reverting.

    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     6 | ERROR | [x] Use statements should be sorted alphabetically. The first
       |       |     wrong one is Drupal\Component\Utility\Xss.
       |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    FILE: ...suggestion/web/modules/custom/address_suggestion/address_suggestion.module
    --------------------------------------------------------------------------------
    FOUND 6 ERRORS AFFECTING 6 LINES
    --------------------------------------------------------------------------------
     17 | ERROR | String concat is not required here; use a single string instead
        |       | (Drupal.Strings.UnnecessaryStringConcat.Found)
     18 | ERROR | String concat is not required here; use a single string instead
        |       | (Drupal.Strings.UnnecessaryStringConcat.Found)
     20 | ERROR | String concat is not required here; use a single string instead
        |       | (Drupal.Strings.UnnecessaryStringConcat.Found)
     22 | ERROR | String concat is not required here; use a single string instead
        |       | (Drupal.Strings.UnnecessaryStringConcat.Found)
     23 | ERROR | String concat is not required here; use a single string instead
        |       | (Drupal.Strings.UnnecessaryStringConcat.Found)
     25 | ERROR | String concat is not required here; use a single string instead
        |       | (Drupal.Strings.UnnecessaryStringConcat.Found)
    --------------------------------------------------------------------------------
  • ๐Ÿ‡ซ๐Ÿ‡ทFrance lazzyvn paris

    @joseph.olstad There are so many bugs, why are you releasing a new version?

  • ๐Ÿ‡จ๐Ÿ‡ฆCanada joseph.olstad

    I reverted it and published a new version without it.

  • ๐Ÿ‡จ๐Ÿ‡ฆCanada joseph.olstad

    Not really actual bugs, this is just new phpstan/PHPCS added to the pipeline by the folks that manage the drupal ci/cd.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia siddhraj Rajasthan

    Hello @joseph.olstad
    i have updated hook code as per PHPCS Error's.

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance lazzyvn paris

    @siddhraj no, it's not like your patch. It should translate t('a paragraph without html');
    hook_help is not required, why bother adding it?

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia siddhraj Rajasthan

    @lazzyvn i only added patch for already raised issue by @amanbtr72.

Production build 0.71.5 2024