Skip to content

Right Panel fixes #13557

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

Merged
merged 6 commits into from
Jul 18, 2025
Merged

Right Panel fixes #13557

merged 6 commits into from
Jul 18, 2025

Conversation

farmaazon
Copy link
Contributor

Pull Request Description

Closes #13539
Part of #13222

  1. The buttons in Graph are aligned to those in Description/Documentation editor.
image
  1. The graph editor "anchor" point is now left-top corner instead of center: this makes nodes not move when opening/resizing right and bottom panel.
Screencast.From.2025-07-18.11-04-33.mp4

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,
    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.

isFinite(): boolean {
return Number.isFinite(this.x) && Number.isFinite(this.y)
}

/** TODO: Add docs */
/** Change Inf values in vector to 0. */
Copy link
Contributor

Choose a reason for hiding this comment

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

NaN is also non-finite

Copy link
Contributor

Choose a reason for hiding this comment

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

This method intentionally coerces NaN to 0 as well. I think it's just a matter of adjusting docs.

Suggested change
/** Change Inf values in vector to 0. */
/** Change any infinite or non-numeric (e.g. `Infinity` or `NaN`) vector values to `0`. */

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes

Comment on lines +273 to +278
const w = viewportElem.value.clientWidth / targetScale.value
const h = viewportElem.value.clientHeight / targetScale.value
targetLeftTop.value = rect
.center()
.finiteOrZero()
.sub(new Vec2(w / 2, h / 2))
Copy link
Contributor

Choose a reason for hiding this comment

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

I've got a little confused for a bit and was about to propose to just use rect.pos instead here, but I see that this wouldn't be correct. Let's drop a comment here explaining that rect might have different aspect ratio than viewport, so we still want to move viewport center to rect center explicitly.

@farmaazon farmaazon added the CI: Ready to merge This PR is eligible for automatic merge label Jul 18, 2025
@mergify mergify bot merged commit e1d1df1 into develop Jul 18, 2025
58 checks passed
@mergify mergify bot deleted the wip/farmaazon/rp-fixes branch July 18, 2025 14:28
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Doc panel menu needs to align with graph editor menu
3 participants