Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide Icinga to ipl/web behaviors #5238

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sukhwinder33445
Copy link
Contributor

No description provided.

@sukhwinder33445 sukhwinder33445 force-pushed the provide-icinga-to-ipl-behaviors branch from 6cbb1ee to 80eb42d Compare August 5, 2024 14:34
@@ -86,6 +86,8 @@
return false;
}

define('Icinga', [], () => Icinga);
Copy link
Member

Choose a reason for hiding this comment

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

I struggle to find a suitable location when to define Icinga. This is too early. At the end, it's too late. Right before the behavior initialization, it's somewhat arbitrary...

So, looking at this from another angle, I'd propose to solve this differently:

The linked PR in ipl-web only requires this because it needs Icinga.EventListener. So why don't we define just this class? In eventlistener.js, at the end of the factory: define("icinga/legacy-app/EventListener", [], () => EventListener)

Why icinga/legacy-app/? icinga/ is the global namespace. legacy-app/ is the library name. The reason for legacy- is that I don't want to use up just app/ at this time.

@@ -238,7 +238,7 @@ public static function optimizeDefine($js, $filePath, $basePath, $packageName)
try {
$dependencies = $match[2] ? Json::decode($match[2]) : [];
foreach ($dependencies as &$dependencyName) {
if ($dependencyName === 'exports') {
if ($dependencyName === 'exports' || $dependencyName === 'Icinga') {
Copy link
Member

Choose a reason for hiding this comment

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

just check whether the name already begins with icinga/legacy-app/.

@nilmerg nilmerg added this to the 2.13 milestone Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants