Altered Naming Convention for Duplicates#640
Altered Naming Convention for Duplicates#640Ammelll wants to merge 10 commits intomjansen4857:mainfrom
Conversation
|
I concur that something that appends a suffix would be preferred over something the prepends a prefix, as it would result in less scrolling when creating new paths or autos by duplicating something that exists and then modifying it. |
|
Just checking in on the status of this as it still has failing tests and needs to be formatted. You can format by running |
|
The only test this was failing was test's for duplicate auto and duplicate path names (expected). How do you suggest I make these tests pass given I'm changing their function? |
|
It looks like the tests are failing because the actual naming logic is not working as expected. For example, when duplicating |
| String source = pathName.substring(pathName.length - 3); | ||
| while (pathNames.contains(pathName)) { | ||
| pathName = 'Copy of $pathName'; | ||
| if (exp.hasMatch(source)) { |
There was a problem hiding this comment.
I'm assuming tests are failing because you're matching the regex against the substring with the (x) removed. I think this should be changed to match against the entire path name and then only do the substring if it has a match. Same thing for the autos.
EDIT: nvm I read this wrong, i thought the substring removed the (x) but it only contains that
There was a problem hiding this comment.
When fixing this, could you also add on to the duplication tests to duplicate them a third time. i.e. check for Example Path (3) just to be extra sure the increment works.
|
@mjansen4857 anything holding this up? |
|
@mjansen4857 bump |
In my experience the current naming convention of "Copy of {AutoName}" is very inconvenient, primarily when sorting the Path/Auto names alphabetically as duplicating an auto will send it to a random place in the stack instead of right next to the Path/Auto being duplicated. I believe the changes I've proposed would address this.