Closed (fixed)
Project:
Reading Progress Bar
Version:
2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
18 Feb 2026 at 09:43 UTC
Updated:
4 Mar 2026 at 13:35 UTC
Jump to comment: Most recent
It's all in the title.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
mably commentedComment #5
mably commentedOOP hooks conversion
Converted procedural hook implementations to OOP format:
src/Hook/ReadingProgressBarHooks.phpwith#[Hook('help')]and#[Hook('theme')]attributesreading_progress_bar.moduleto delegate to the hook class via#[LegacyHook]for Drupal 10.6 backward compatibilityreading_progress_bar.services.ymlTest coverage
Added two test files covering the block plugin and rendered output:
Kernel test — ReadingProgressBarBlockTest (4 tests)
Tests the block plugin in isolation via
plugin.manager.block:ReadingProgressBarConstants#types (textfield, color, checkbox, number),#default_values, and#statesvisibility rule on the background_color fieldFormState, callsblockSubmit(), assertsgetConfiguration()reflects submitted values#theme,#attachedlibrary,Attributeobject with classes (reading-progress-bar,hidden),aria-hidden, data attributes, and inline CSS withtransparentbackgroundFunctional test — ReadingProgressBarTest (3 tests)
Full browser tests for block rendering and configuration:
<progress>element with correct CSS classes,aria-hidden,value="0", data attributes, and inline CSS variables in sibling<style>tagNo overlap between the two files — kernel tests cover the plugin API/render array level, functional tests cover the browser/HTML rendering level.