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

Clear artboard #2015

Closed
wants to merge 4 commits into from
Closed

Conversation

moOsama76
Copy link
Contributor

No description provided.

@moOsama76
Copy link
Contributor Author

Note that merge nodes are named "Artboard" as I reserve the name

@Keavon
Copy link
Member

Keavon commented Oct 14, 2024

!build

Copy link

📦 Build Complete for ac49479
https://5993b57e.graphite.pages.dev

@Keavon Keavon requested a review from adamgerhant October 14, 2024 07:39
@adamgerhant
Copy link
Collaborator

adamgerhant commented Oct 14, 2024

I would like to see the artboards name/position/downstream connnector/upstream connectors being saved, then the artboard is deleted, a layer node is created, its name/position are set, then it is reconnecting. All using the same messages as if the user was to do it.

Also, make sure to start and end a transaction at the start and end of the message. Its also important that no mutable network interface functions are called in a message that has a start/end transaction.

Optionally, it would also be nice if the artboards position is then used to set the transform of the new layer, so that the contents stay at the same place. This would require using a monitor node to access the artboard data, where the translation is stored. This could also be used to improve #2028. This would probably be outside the scope of the PR, so you could leave a TODO.

@Keavon
Copy link
Member

Keavon commented Oct 15, 2024

I'll mark this as a draft until those comments are addressed. Thanks for taking the time to review this, @adamgerhant.

@Keavon Keavon marked this pull request as draft October 15, 2024 05:14
@moOsama76
Copy link
Contributor Author

I would like to see the artboards name/position/downstream connnector/upstream connectors being saved, then the artboard is deleted, a layer node is created, its name/position are set, then it is reconnecting. All using the same messages as if the user was to do it.

You want to reduce loops by this right?

@adamgerhant
Copy link
Collaborator

You can use however many loops are necessary to achieve the correct behavior

@Keavon
Copy link
Member

Keavon commented Nov 12, 2024

Just checking in on the status of this @moOsama76.

@moOsama76
Copy link
Contributor Author

Just checking in on the status of this @moOsama76.

I was taking a break, will do it this week

@Keavon
Copy link
Member

Keavon commented Dec 23, 2024

I'll close this PR for now, but please feel free to reopen it once you've addressed the code review feedback from Adam.

@Keavon Keavon closed this Dec 23, 2024
@moOsama76
Copy link
Contributor Author

I'll close this PR for now, but please feel free to reopen it once you've addressed the code review feedback from Adam.

No problem I am getting back soon I promise :)

moOsama76 added a commit to moOsama76/Graphite that referenced this pull request Jan 4, 2025
Keavon pushed a commit to moOsama76/Graphite that referenced this pull request Jan 10, 2025
Keavon added a commit that referenced this pull request Jan 30, 2025
…se (#2177)

* Clear Artboards, Closes #2015

* Memory optmization

* - Fix transactions
- Fix node positions
- Optimize nodes' deletion

* no message

* Fix layers shift to wrong positions

* fix bugs

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
@moOsama76 moOsama76 deleted the Clear_artboard branch February 6, 2025 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants