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

Improve MACs v2 loading #542

Merged
merged 1 commit into from
Jun 5, 2024
Merged

Conversation

oxixes
Copy link
Contributor

@oxixes oxixes commented May 28, 2024

Proposed changes

Improves the way of loading v2 widgets and operators.
Changes:

  • Now entrypoint is optional.
  • There are 2 new functions available to widgets and operators: Wirecloud.registerWidgetClass(script, class) and Wirecloud.registerOperatorClass(script, class). Both receive the current script element of the DOM, accessible by document.currentScript, and the class entrypoint of the widget (the one that receives the MashupPlatform).

With these changes, the window object does not have to be polluted with widgets and operators defining their class in it, which also helps to prevent conflicts between them. The other way of loading them, with the entrypoint configuration, still works.

Along with this PR, more will be done in the grunt-init and config-parser repositories.

Types of changes

What types of changes does your code introduce to the project: Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of
them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before
merging your code.

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in downstream modules

Further comments

None

@coveralls
Copy link

Coverage Status

coverage: 88.261%. first build
when pulling d33c7e9 on oxixes:mac-v2-improved
into 247b900 on Wirecloud:develop.

@aarranz aarranz merged commit 2e3ccd9 into Wirecloud:develop Jun 5, 2024
36 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jun 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants