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

[PreviewAction] Use API instead of importing PreviewAction.js #7683

Closed
jvigliotta opened this issue Apr 11, 2024 · 1 comment
Closed

[PreviewAction] Use API instead of importing PreviewAction.js #7683

jvigliotta opened this issue Apr 11, 2024 · 1 comment
Labels
help_wanted Help the Open MCT project! type:enhancement

Comments

@jvigliotta
Copy link
Contributor

jvigliotta commented Apr 11, 2024

Is your feature request related to a problem? Please describe.

We need to be using our own API functions when possible. A current example of where this needs to be done, is using PreviewAction.js instead of our ActionsAPI.

This is a general search for where it's being misused (ignoring it's own plugin)
https://github.com/search?q=repo%3Anasa%2Fopenmct%20import%20PreviewAction&type=code

Describe the solution you'd like

Replace direct usage of the PreviewAction.js class and use the ActionsAPI version.

Describe alternatives you've considered

The alternative is what's currently being done, we need to get away from that.

Additional context

Example:
Not using API
https://github.com/nasa/openmct/blob/master/src/plugins/LADTable/components/LadRow.vue#L64
https://github.com/nasa/openmct/blob/master/src/plugins/LADTable/components/LadRow.vue#L239-L273

Using the API we can remove the import and replace this line: https://github.com/nasa/openmct/blob/master/src/plugins/LADTable/components/LadRow.vue#L239

with

this.previewAction = this.openmct.actions.getAction('preview');
@ozyx ozyx added the help_wanted Help the Open MCT project! label Apr 30, 2024
@ozyx
Copy link
Member

ozyx commented May 1, 2024

dupe of #6426

@ozyx ozyx closed this as not planned Won't fix, can't repro, duplicate, stale May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help_wanted Help the Open MCT project! type:enhancement
Projects
None yet
Development

No branches or pull requests

2 participants