[1.2.x] Timeline Block

Created on 6 June 2025, about 1 month ago

Timeline Block is a flexible Drupal module that helps site administrators to create and display timelines directly from the block configuration interface. Ideal for showcasing events, milestones, or phased activities, it includes 10 predefined layouts and supports manual sorting using weight fields.

The module is fully customizable, allowing developers to override the default Twig template to implement custom HTML structures, apply personalized CSS for styling, or integrate JavaScript for advanced interactive features such as sliders or animations. Timeline Block supports essential fields including time, title, and description, making it suitable for presenting time-ordered information in a structured and visually engaging format. It is well-suited for displaying historical events, project milestones, or process timelines, and can be adapted to match any design and functional requirements.

Project link

https://www.drupal.org/project/timeline_block

📌 Task
Status

Active

Component

module

Created by

🇳🇵Nepal sujan shrestha Kathmandu🇳🇵, Nepal

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

Comments & Activities

  • Issue created by @sujan shrestha
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    Thank you for applying!

    Please read Review process for security advisory coverage: What to expect for more details and Security advisory coverage application checklist to understand what reviewers look for. Tips for ensuring a smooth review gives some hints for a smoother review.

    The important notes are the following.

    • If you have not done it yet, enable GitLab CI for the project, and fix what reported from the phpcs job. This help to fix most of what reviewers would report.
    • For the time this application is open, only your commits are allowed. No other people, including other maintainers/co-maintainers can make commits.
    • The purpose of this application is giving you a new drupal.org role that allows you to opt projects into security advisory coverage, either projects you already created, or projects you will create. The project status won't be changed by this application.
    • Nobody else will get the permission to opt projects into security advisory policy. If there are other maintainers/co-maintainers who will to get that permission, they need to apply with a different module.
    • We only accept an application per user. If you change your mind about the project to use for this application, or it is necessary to use a different project for the application, please update the issue summary with the link to the correct project and the issue title with the project name and the branch to review.

    To the reviewers

    Please read How to review security advisory coverage applications , Application workflow , What to cover in an application review , and Tools to use for reviews .

    The important notes are the following.

    • It is preferable to wait for a Code Review Administrator before commenting on newly created applications. Code Review Administrators will do some preliminary checks that are necessary before any change on the project files is suggested.
    • Reviewers should show the output of a CLI tool only once per application. The configuration used for these tools needs to be the same configuration used by GitLab CI, stored in the GitLab Templates repository.
    • It may be best to have the applicant fix things before further review.

    For new reviewers, I would also suggest to first read In which way the issue queue for coverage applications is different from other project queues .

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    Remember to change status, when the project is ready for review, as in this queue Active means Don't review yet the project I am using for this application.

  • 🇳🇵Nepal sujan shrestha Kathmandu🇳🇵, Nepal

    Hi @avpaderno, thanks for the update. The project is ready for review and i have updated the status accordingly.

  • 🇮🇳India vishal.kadam Mumbai

    1. FILE: timeline_block.libraries.yml

    version: VERSION

    VERSION is only used by Drupal core modules. Contributed modules should use a literal string that does not change with the Drupal core version a site is using.

    2. FILE: timeline_block.module

    /**
     * @file
     * Contains timeline.module.
     */

    The usual description for a .module file is “Hook implementations for the [module name] module”, where [module name] is the module name given in the .info.yml file.

    3. FILE: src/Plugin/Block/TimelineBlock.php

      /**
       * Creates a Timeline Block instance.
       *
       * This constructor is used to initialize a Timeline Block plugin. It takes
       * the configuration array, plugin ID, plugin definition, and the entity
       * storage service as arguments to set up the plugin instance.
       *
       * @param array $configuration
       *   A configuration array containing information about the plugin instance.
       *   This includes settings or any other data necessary for configuring the
       *   specific instance of the plugin, such as its state or user preferences.
       * @param string $plugin_id
       *   The plugin ID for the plugin instance.
       *   The unique identifier for the plugin instance, used to distinguish
       *   between different plugin types.
       * @param mixed $plugin_definition
       *   The plugin implementation definition.
       *   This contains the full configuration or metadata that defines the
       *   behavior of the plugin. It might include properties like the
       *   plugin's label, its settings, or other specialized configurations.
       * @param \Drupal\Core\Entity\EntityStorageInterface $entity_storage
       *   The entity storage service.
       *   This service allows interaction with the storage of entities, such
       *   as loading, saving, or deleting entities. It is injected into the
       *   constructor to enable operations on entities, which might be used
       *   in the context of the Timeline Block.
       * @param \Drupal\Core\Render\RendererInterface $renderer
       *   The renderer service.
       */
      public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityStorageInterface $entity_storage, RendererInterface $renderer) {

    The documentation comment for constructors is not mandatory anymore, If it is given, the description must be “Constructs a new [class name] object”, where [class name] includes the class namespace.

  • 🇳🇵Nepal sujan shrestha Kathmandu🇳🇵, Nepal

    Thank you for providing the detailed guidelines. I have made the necessary adjustments based on your feedback:

    1. FILE: timeline_block.libraries.yml Updated the version field as per your suggestion.

    2. FILE: timeline_block.module Updated the description to match the standard format for .module files.

    3. FILE: src/Plugin/Block/TimelineBlock.php Simplified the constructor to match the recommended format.

    I’ve made the changes, and the code is now ready for review.

  • 🇮🇳India vishal.kadam Mumbai

    Rest looks fine to me.

    Let’s wait for a Code Review Administrator to take a look and if everything goes fine, you will get the role.

  • 🇳🇵Nepal sujan shrestha Kathmandu🇳🇵, Nepal

    Hi @vishal.kadam, Thank you for the update.

Production build 0.71.5 2024