Skip to content

Use the shared loader component instead of the loading GIF - #138

Merged
lachiebol merged 2 commits into
6.x-devfrom
fix-dark-mode-loading-indicator
Sep 9, 2026
Merged

Use the shared loader component instead of the loading GIF#138
lachiebol merged 2 commits into
6.x-devfrom
fix-dark-mode-loading-indicator

Conversation

@chippison

@chippison chippison commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

DEV-20697

The bug

plugins/Morpheus/images/loading-blue.gif has no alpha channel — every pixel is opaque, over half of them pure white. So it draws a white block instead of a spinner: a white rectangle in dark mode, and near-invisible bars on a light background.

An <img> renders that opaque white exactly the same way a CSS background does, so every one of these call sites has the bug.

The fix

Swap the <img> for the shared loader component core already exports. Same three bars, same 16×11 size, and it takes its colour from the surrounding text so it reads in both themes.

No new markup or CSS — core already styles .loadingPiwik img and .loadingPiwik .matomo-loader identically, so the swap is visually neutral.

Pairing

This is the plugin half of matomo-org/matomo#25110, which fixes core's seven background-image rules and the .matomo-loader colours.

Nothing hard-depends on it — the loader component already exists on 6.x-dev, so this works against current core and simply looks better once #25110 lands.

One thing to know when reading CI here: plugin CI always builds against plain 6.x-dev, so this repo's run exercises the old loader. The signal that matters is core #25110's UI-plugins (<Plugin>) check, which runs both halves together.

Expect screenshots to need regenerating once #25110 merges — these loading states were previously invisible or an opaque block, and become visible bars.

Checklist

[✔] I have understood, reviewed, and tested all AI outputs before use
[✔] All AI instructions respect security, IP, and privacy rules

@chippison

Copy link
Copy Markdown
Contributor Author

The PHPstan issues will be fixed by: #140

@chippison
chippison requested a review from a team September 8, 2026 21:06

@lachiebol lachiebol left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lachiebol lachiebol left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry! Just realised, changelog and plugin.json should be bumped too

The GIF has no alpha channel, so it painted an opaque white block over
whatever was behind it - a white rectangle instead of a spinner in dark mode.
The shared loader component draws the same three bars and takes its colour from
the surrounding text.
6.0.0 is already released, so the fix needs its own version to reach users.
@chippison
chippison force-pushed the fix-dark-mode-loading-indicator branch from b0290dd to 39e488f Compare September 9, 2026 02:34
@chippison
chippison requested a review from lachiebol September 9, 2026 03:33
@chippison

Copy link
Copy Markdown
Contributor Author

Thanks for this.
I keep forgetting about the version bump and changelog in the submodules.
I've added this to memory now 👍

@snake14 snake14 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@lachiebol
lachiebol merged commit 6c40f42 into 6.x-dev Sep 9, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants