-
Notifications
You must be signed in to change notification settings - Fork 134
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
Altered Naming Convention for Duplicates #640
base: main
Are you sure you want to change the base?
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 |
while (pathNames.contains(pathName)) { | ||
pathName = 'Copy of $pathName'; | ||
if (exp.hasMatch(source)) { |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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.