Continuation of #60: Fix Text Overlay configuration using Dependency Injection#62
Conversation
…ay checkbox in the mirador settings not affecting the presence of the text overlay
|
Hi @joecorall, I am a co-op student at the University of Toronto currently working on this issue. I have opened this PR which includes Dibya's original work from the #60 plus the requested Dependency Injection fixes. Please let me know if any further changes need to be made to successfully merge this. Thank you! |
There was a problem hiding this comment.
@Aryan-R-Patel LGTM after the lint errors are fixed https://github.com/Islandora/islandora_mirador/actions/runs/21763625130/job/62799641005#step:4:105
|
They should be fixed now! |
|
@Aryan-R-Patel there's a few more |
|
I have pushed the new changes. Hopefully this covers everything! |
|
Hi @joecorall, I have implemented these changes. However, the tests still fail since with the old logic everyone had the plugins always enabled. Would you like me to update the test case? |
There was a problem hiding this comment.
The issue is the config form saves mirador_enabled_plugins as key/value. So the suggested code changes below along with will get the tests to pass
diff --git a/tests/src/Kernel/IslandoraMiradorPluginManagerTest.php b/tests/src/Kernel/IslandoraMiradorPluginManagerTest.php
index 0d6d497..46b72bf 100644
--- a/tests/src/Kernel/IslandoraMiradorPluginManagerTest.php
+++ b/tests/src/Kernel/IslandoraMiradorPluginManagerTest.php
@@ -31,6 +31,9 @@ class IslandoraMiradorPluginManagerTest extends KernelTestBase {
*/
protected function setUp(): void {
parent::setUp();
+
+ $this->installConfig(['islandora_mirador']);
+
$this->pluginManager = $this->container->get('plugin.manager.islandora_mirador');
}…r image tools plugin & minor fixes
Closes Issue #59
Closes and builds on top of PR #60
What does this Pull Request do?
This PR is a continuation of the work started by @DibyaGoswami in PR #60 to resolve Issue #59.
What's new?
Original Logic: Retains Dibya's fix to ensure the "Text Overlay" checkbox correctly affects the Mirador viewer.
Changed Logic: Utilizes Dependency Injection by replacing the
\Drupal::service('config.factory')calls in TextOverlay.php and MiradorImageTools.php as requested by @joecorall in the previous PR review.