Install plugins button looks empty when :active
Haven't had a chance to debug but leaving this in case anyone else sees it or has a fix.

What browser and OS were you using when this issue occurred, I cannot reproduce this in Firefox?
Hmm I was wondering if it was gremlins in my system. I’m Mac/Chrome. Honestly haven’t tested anything else.
Pretty sure it's from:
.merlin__button--loading .merlin__button--loading__text {
opacity: 0;
FWIW this happens when the plugin are already installed but not active, then I hit this step, click and it disappears.
Works fine for me, I see the spinner inside the button fine. I tested it on both Chrome (Win and Mac). Here's a screenshot:
I've not tampered with any of the core Merlin CSS, so if you have might be a good place to start checking.
It also doesn't matter if the button is active meaning has the blue border around it or not, the spinner always shows for me while the plugins are being installed/updated/activated.
Hmmm, did you test with all the plugins already installed? Now that I see your screenshot I realize the issue is that i'm missing the spinner. I wonder if having the plugins installed makes it happen so fast the spinner never shows up.
Add a heavy plugin like WooCommerce to the list of plugins to install this way it will have enough time to show itself. Yes, I did test it with all plugins installed but not activated.
This happens when Merlin is installed inside of a plugin because it uses get_template_part to get the SVG here https://github.com/richtabor/MerlinWP/blob/master/class-merlin.php#L686
The only workaround I could find is to extend the Merlin class and override the loading_spinner method.
It would be better if there was a filter which allowed plugins to return an SVG in a string instead of using get_template_part. E.g:
/**
* Loading merlin-spinner.
*/
public function loading_spinner() {
// Define the spinner file.
$spinner = $this->directory . '/assets/images/spinner';
// Retrieve the spinner.
return apply_filters( 'merlin_loading_spinner_svg', get_template_part( apply_filters( 'merlin_loading_spinner', $spinner ) ) );
}
Obviously not pretty but you get the idea.
Ah yes, that would do it. Good find Lee. If Rich was interested in a PR and a new release, this would be a nice fix for me. No users really complained, but my button is empty every time they use our importer.
I think it's a good idea @JiveDig 👍
sends smoke signals to my buddy @seothemes so I don't have to do it 😜
Found another solution using the dynamic get_template_part_{$slug} hook. No need for another filter:
add_action('get_template_part_merlin-wp/assets/images/spinner', function() {
require_once 'path/to/merlin-wp/assets/images/spinner.php';
});
@richtabor this one can probably be closed.
@seothemes you got it to work with an action hook? That's wild, hooked into that template part and loaded it via the plugin? Great idea, never would have thought about doing that.