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

Re-implement Create and EditProperties actions and dialogs in new API #3787

Closed
akhenry opened this issue Apr 5, 2021 · 2 comments · Fixed by #3816 or #4478
Closed

Re-implement Create and EditProperties actions and dialogs in new API #3787

akhenry opened this issue Apr 5, 2021 · 2 comments · Fixed by #3816 or #4478
Assignees
Milestone

Comments

@akhenry
Copy link
Contributor

akhenry commented Apr 5, 2021

We are still using the old actions, dialogs, and forms APIs for the Create and Properties actions. We need to re-implement these two actions using the new Actions and Overlays APIs respectively, as well as adding some new API for registering form controls.

This requires re-implementing our legacy form-generation code, which is currently implemented in Angular. This took the properties of an object and auto-generated a form based on them, which was rendered into the popup dialog that shows when the user initiates the Create or Properties actions.

Additionally, developers can provide optional metadata about how each property should be rendered in a form by referencing a control, and providing some control-specific options when an object type is registered. This metadata, if provided, is used to render the appropriate form controls for each object property

Here are some examples of types that provide additional form rendering metadata about their properties.

Although our new Types API supports this form control metadata when types are registered, the controls themselves are defined in Angular JS. We will need to re-implement all of the form controls as Vue components.

We will also need some new API to allow developers (including us) to register form controls. This could be something like:

openmct.forms.addControl('colorPicker', {
    show(element) {
        // A render function
    },
    destroy() {
        // A destroy function
    }
});

It will probably also need events for when values change, etc.

Testing instructions:

  1. create all objects using create menu and verify all fields in create form work as expected.
  2. Update values for each creatable object from tree using 'Edit Properties' and verify all fields in create form work as expected.
  3. Create display layout add text and image objects (verify form works while creating those) and also update values for those items (verify form also works in update case)
@unlikelyzero
Copy link
Contributor

Assigning to @unlikelyzero to expand the testing notes

@jvigliotta
Copy link
Contributor

Verified Fixed - Testathon 1/24/22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants