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

Create node from port button #11836

Merged
merged 5 commits into from
Dec 18, 2024
Merged

Conversation

vitvakatu
Copy link
Contributor

Pull Request Description

Closes #11508

create-node-from-port.mp4

A few notes regarding implementation:

  • The button is drawn as SVG and embedded into the output port because it is relatively easy to position it correctly and seamlessly blend it with the surrounding output port.
  • We have a ready SVG plus icon, but the initial design suggested we want to make it transparent in the center, so I used a mask to clip the plus shape from the background. This is relatively unimportant for the implementation and can be replaced by a separate SVG if we want.
  • I fixed the positioning for “port labels.” They are only visible when multiple output ports are present, so it is not important.
  • There is a hover area extending around the actual button and its “connection”, so it is easy to click. It is a nuance for the tests, though, so I was forced to use force: true.
  • The connection is not a real connection, but has the same dimensions and color scheme. Implementing this visual part as a “fake” edge is extremely tricky, so I chose not to do that.
  • These buttons must be hidden when the component browser is connected, or they will visually conflict with the normal edge. There is no clear way to check if the component browser is connected to that port, so every button is hidden when the component browser is opened.
  • As an unrelated change, I renamed circular menucomponent menu.

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    TypeScript,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • Unit tests have been written where possible.
  • If meaningful changes were made to logic or tests affecting Enso Cloud integration in the libraries,
    or the Snowflake database integration, a run of the Extra Tests has been scheduled.
    • If applicable, it is suggested to paste a link to a successful run of the Extra Tests.

@vitvakatu vitvakatu added x-new-feature Type: new feature request -gui labels Dec 11, 2024
@vitvakatu vitvakatu self-assigned this Dec 11, 2024
Copy link

github-actions bot commented Dec 11, 2024

🧪 Storybook is successfully deployed!

📊 Dashboard:

Copy link
Contributor

@farmaazon farmaazon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vitvakatu vitvakatu added the CI: Ready to merge This PR is eligible for automatic merge label Dec 17, 2024
@mergify mergify bot merged commit 7a92d1c into develop Dec 18, 2024
50 checks passed
@mergify mergify bot deleted the wip/vitvakatu/create-node-from-port branch December 18, 2024 12:50
somebody1234 pushed a commit that referenced this pull request Dec 24, 2024
Closes #11508

https://github.com/user-attachments/assets/7943f63d-4d34-4909-ac47-bf8ea4dd3eb7

A few notes regarding implementation:

- The button is drawn as SVG and embedded into the output port because it is relatively easy to position it correctly and seamlessly blend it with the surrounding output port.
- We have a ready SVG `plus` icon, but the initial design suggested we want to make it transparent in the center, so I used a mask to clip the plus shape from the background. This is relatively unimportant for the implementation and can be replaced by a separate SVG if we want.
- I fixed the positioning for “port labels.” They are only visible when multiple output ports are present, so it is not important.
- There is a hover area extending around the actual button and its “connection”, so it is easy to click. It is a nuance for the tests, though, so I was forced to use `force: true`.
- The connection is not a real connection, but has the same dimensions and color scheme. Implementing this visual part as a “fake” edge is extremely tricky, so I chose not to do that.
- These buttons must be hidden when the component browser is connected, or they will visually conflict with the normal edge. There is no clear way to check if the component browser is connected to _that_ port, so _every_ button is hidden when the component browser is opened.
- As an unrelated change, I renamed `circular menu` → `component menu`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-gui CI: Ready to merge This PR is eligible for automatic merge x-new-feature Type: new feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make the Add Component control part of the output port
2 participants