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

Fix adding nodes in collapsed functions #10009

Merged
merged 2 commits into from
May 21, 2024

Conversation

kazcw
Copy link
Contributor

@kazcw kazcw commented May 20, 2024

Pull Request Description

Insert new nodes before the block's terminal expression-statement, if present.

Fixes #9963.

Important Notes

  • Fix a bug that caused any empty lines at the beginning of a module not to be printed.
  • Remove a redundant data-property from GraphNode.

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.

Fixes #9963.

- Fix a bug printing blank lines at the beginning of a module.
- Remove a redundant data-property from `GraphNode`.
@kazcw kazcw added the CI: No changelog needed Do not require a changelog entry for this PR. label May 20, 2024
@kazcw kazcw self-assigned this May 20, 2024
@@ -48,7 +48,6 @@ const uploadingFiles = computed<[FileName, File][]>(() => {
:node="node"
:edited="id === graphStore.editedNodeInfo?.id"
:graphNodeSelections="props.graphNodeSelections"
:data-node="id"
Copy link
Contributor

Choose a reason for hiding this comment

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

It is very helpful in debugging. We could use :data-testid="node(${id})" if you want to have something standardized.

Copy link
Contributor Author

@kazcw kazcw May 21, 2024

Choose a reason for hiding this comment

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

This is a duplicate; the GraphNode component defines data-node-id with the same value.

Comment on lines +9 to +15
['node1 = 123', '*'],
['node1 = 123', '*', 'node1'],
['node1 = 123', '', '*', 'node1'],
['*', 'node1'],
['', '*', 'node1'],
['*', '## Return value', 'node1'],
['*', '## Return value', '', 'node1'],
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a case of adding a node to an empty block.

@kazcw kazcw requested a review from AdRiley as a code owner May 21, 2024 16:31
@kazcw kazcw added the CI: Ready to merge This PR is eligible for automatic merge label May 21, 2024
@mergify mergify bot merged commit 9601543 into develop May 21, 2024
37 checks passed
@mergify mergify bot deleted the wip/kw/fix-add-node-in-function branch May 21, 2024 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

Adding new node to collapsed function breaks semantics
2 participants