-
Notifications
You must be signed in to change notification settings - Fork 4
Fix Node Copy + Paste #1114
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
base: 10-10-refactor_handleconnection
Are you sure you want to change the base?
Fix Node Copy + Paste #1114
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
aff054f to
5134306
Compare
5134306 to
d874723
Compare
3d8a4ff to
802180e
Compare
fe2444d to
f31471f
Compare
ab05c72 to
79c1b16
Compare
f961a3a to
d903794
Compare
43187fe to
58e539d
Compare
d903794 to
1d1d22b
Compare
| existingNames: Set<string>, | ||
| ): string => { | ||
| let finalName = name; | ||
| const baseName = name.replace(/ \(\d+\)$/, ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will remove instances where we end up with task, task 2, task 2 2, task 2 2 2 and so on. Currently this happens for input & output nodes duplicated via the toolbar.
Now the sequence will always be task, task (2), task (3) and so on. The brackets were added to minimize the chance of matching the regex to a non-duplicate task id with numbers in it.
c6a42f8 to
c3fb0e6
Compare
443bb5b to
cc62eb1
Compare
c3fb0e6 to
402b148
Compare
cc62eb1 to
c596d45
Compare
cf466ba to
62ddca4
Compare
c596d45 to
32dac7f
Compare
62ddca4 to
b72a03b
Compare
32dac7f to
616fff2
Compare
b72a03b to
61f09a9
Compare
616fff2 to
2a075fd
Compare
61f09a9 to
410d058
Compare
4bb4dca to
8b691b0
Compare
410d058 to
18d7353
Compare
8b691b0 to
6cfe339
Compare
2c65cbf to
70314be
Compare
6cfe339 to
174009d
Compare
174009d to
ed65518
Compare
70314be to
80ac27b
Compare
ed65518 to
c82efe1
Compare
80ac27b to
28dbb2b
Compare
28dbb2b to
ff591fa
Compare
c82efe1 to
b2503ef
Compare

Description
Fixes a couple of issues relating to copy + paste nodes & node duplication. These issues were pre-existing to this PR stack (but made easier to solve using the new Node Manager).
Fixes:
KNOWN ISSUE: copy + paste output nodes between Oasis instances does not copy over the connection to that node. This is because in the new instance we do not have access to the original graphSpec.outputValues data (from the old instance) which tells us what it is connected to. This is a complex issue which will be addressed separately. For now users will need to manually remake that connection. For more info see https://github.com/Shopify/oasis-frontend/issues/314
Related Issue and Pull requests
Closes https://github.com/Shopify/oasis-frontend/issues/250
Closes https://github.com/Shopify/oasis-frontend/issues/302
Type of Change
Checklist
Screenshots (if applicable)
Test Instructions
Note: output nodes copied across tabs will not be connected due to technical limitations in our architecture
Additional Comments
NOT FOR THIS PR - but
duplicateNodesmethod desperately needs a refactor.