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

Select node on any edit #9536

Merged
merged 9 commits into from
Mar 26, 2024
Merged

Select node on any edit #9536

merged 9 commits into from
Mar 26, 2024

Conversation

farmaazon
Copy link
Contributor

Pull Request Description

Fixes #7478

Screencast.from.2024-03-25.15-44-50.webm

Important Notes

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,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • All code has been tested:
    • Unit tests have been written where possible.
    • If GUI codebase was changed, the GUI was tested when built using ./run ide build.

@farmaazon farmaazon added CI: No changelog needed Do not require a changelog entry for this PR. -gui labels Mar 25, 2024
@farmaazon farmaazon self-assigned this Mar 25, 2024
Copy link
Contributor

@Frizi Frizi left a comment

Choose a reason for hiding this comment

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

The general solution seems fine, but I think the zIndex being optional has potential to cause serious issues later, so let's address that before merging.

@@ -517,7 +521,9 @@ export interface NodeDataFromMetadata {
vis: Opt<VisualizationMetadata>
}

export interface Node extends NodeDataFromAst, NodeDataFromMetadata {}
export interface Node extends NodeDataFromAst, NodeDataFromMetadata {
zIndex?: number
Copy link
Contributor

@Frizi Frizi Mar 25, 2024

Choose a reason for hiding this comment

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

I assume that right now the default state here is undefined (or rather, as missing field). I think it will cause less issues down the line if we make this field required and explicitly set the zIndex for each created node. That way newly added nodes will always be rendered on top, instead of being under all nodes that happened to have zIndex set to some value.

@farmaazon farmaazon requested a review from Frizi March 25, 2024 15:59
@farmaazon farmaazon force-pushed the wip/farmaazon/select-node-on-edit branch from 20a0713 to 6ea43ac Compare March 26, 2024 09:59
@farmaazon farmaazon added the CI: Ready to merge This PR is eligible for automatic merge label Mar 26, 2024
@mergify mergify bot merged commit 09a6ab7 into develop Mar 26, 2024
41 checks passed
@mergify mergify bot deleted the wip/farmaazon/select-node-on-edit branch March 26, 2024 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-gui CI: No changelog needed Do not require a changelog entry for this PR. CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clicking on a Dropdown should focus on the parent node.
2 participants