wing icon indicating copy to clipboard operation
wing copied to clipboard

Omit connections that start from hidden nodes

Open polamoros opened this issue 7 months ago • 2 comments

Use Case

A lot of connections are added when using the bring UI.

image
bring cloud;
bring ui;

class myBucket {
  b: cloud.Bucket;
  new() {
    this.b = new cloud.Bucket();
    new ui.FileBrowser("File Browser",
      {
        put: inflight (fileName: str, fileContent:str) => {
          this.b.put(fileName, fileContent);
        },
        delete: inflight (fileName: str) => {
          this.b.delete(fileName);
        },
        get: inflight (fileName: str) => {
          return this.b.get(fileName);
        },
        list: inflight () => {return this.b.list();},
      }
    );

    new cloud.Service(
      inflight () => {
        this.b.put("hello.txt", "Hello, GET!");
        return inflight () => {
        };
      },
    );
  }
  pub inflight put(key: str, value: str) {
    this.b.put(key, value);
  }
}

let myB = new myBucket() as "MyUIComponentBucket";

Proposed Solution

Hide connections that go from the parent directly to its children.

Implementation Notes

No response

Component

No response

Community Notes

  • Please vote by adding a 👍 reaction to the issue to help us prioritize.
  • If you are interested to work on this issue, please leave a comment.
  • If this issue is labeled needs-discussion, it means the spec has not been finalized yet. Please reach out on the #dev channel in the Wing Discord.

polamoros avatar Jul 01 '24 08:07 polamoros