Open thefennecdeer opened 9 months ago
Hey @thefennecdeer - I've been on holiday for 2 weeks and noticed this while I was away. This pull-request looks very exciting! I look forward to checking it out.
I'll give it a whirl soon and touch base again once I get settled into things again.
Hey @thefennecdeer - I've been on holiday for 2 weeks and noticed this while I was away. This pull-request looks very exciting! I look forward to checking it out.
I'll give it a whirl soon and touch base again once I get settled into things again.
No worries! I'd also like to pick your brain about https://github.com/museumsvictoria/nodel/issues/233#issuecomment-1326212153
I think an option is to simply have a collapsed textboxes where the context of the clipboard can be pasted. I wouldn't even both about code formatting, simply a place to dump text.
In an earlier iteration, I played with the idea of having the text editor appear in the duplicate-modal for naming the duplicate node - the idea being it copies the node to a temp folder, and then you can continue editing the temp soon-to-be node files safely, but that felt a bit like feature creep when you could just edit it after making the node.
what workflow do you imagine would feel the best?
Hey @thefennecdeer super happy to see your feature.
I was just wondering whether this feature could be implemented purely on the frontend? Essentially, just using existing utilities made available by the API to achieve the same result without providing new and explicit methods to service the feature in the backend?
@justparking, you know the API better than anyone, any ideas?
I think it's possible, through having the client reclusively read a nodes files (/REST/files
+ /REST/files/contents?path={filename}
), and them pass the contents of each file to the new node (/REST/files/save?path={filename}
).
I opted to go with backend methods as I was a bit worried about making the user's browser handle a bunch of files like that, but I'll give it a shot and see how it goes!
I've added two new ways to duplicate nodes, based on #203. Now, from any locals.xml, you can click "Add node based on existing" and select any node visible to that nodehost.
This will grab that node's files from the
node/REST/files
endpoint, and recursively downloads it to a temp folder, and renaming it to the final name upon every file completion. I cannibalized the unused "Packages.java" to make a HTTP file downloader.For quick duplication (within the same nodehost), you can go to any node and click the "duplicate" button within the 'functions' dropdown.
Also! First pull request!