Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

UI Components: Documentation of exports, imports, links, and listens Needed #844

@astorm

Description

@astorm

The UI Component guide has sections for the base uiClass object/class, and the base uiElement object/class. This is good.

However, the documentation provided doesn't go far enough. In particular are these two sections.

Also it declares communications between components if needed.

The initLinks() method implements component communication by using links.js. initLinks() introduces processing of the exports, imports, links and listens properties.

are all there is w/r/t to the import and export features of these objects, and this import/export system seems super important.

Based on some of my own poking around the system, the imports and exports properties appear to be a system that allows programmers to

  1. Specify their object exports certain data, which will allow
  2. Other objects to automatically import data properties from other objects.

However -- how this system works is still pretty unclear, and without a clear guide on how it works, developers will be left making wild guesses at how Magento's core objects behave, and aren't likely to adopt these constructs into their own code.

I would assume the links and listens properties have similar, "object wide" implications. These need to be documented.

Similarly, the defaults concept needs fleshing out as well -- it's not clear from the existing guide that setting defaults on a class object will automatically populate data properties of new objects instantiated from that class.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions