lila icon indicating copy to clipboard operation
lila copied to clipboard

Create an option to duplicate chapters in studies

Open adityaraute opened this issue 9 months ago • 7 comments

I was creating a study for an opening and was frustrated at the fact that we cannot simply duplicate chapters in the same study. I am expected to export PGN then create a new chapter and import the PGN. It will be much more smoother for our User Experience to simply add an option to duplicate the chapter. Simple but effective addition to the Study tool.

adityaraute avatar May 08 '24 10:05 adityaraute

This already exists. When creating a new chapter from PGN, you get the option to import from the currently viewed chapter in bright blue letters.

allanjoseph98 avatar May 08 '24 10:05 allanjoseph98

randompearl-stack avatar May 08 '24 10:05 randompearl-stack

Thanks @allanjoseph98 and @randompearl-stack , I apologise for the oversight here.

However, I have a few qualms about this.

  1. I feel it doesn't need to be under PGN. Why can't it be on the first page of the menu, outside of the Empty-Editor-etc menu?
  2. I can only import from the current selected chapter. Instead a dropdown may be useful? Or even more intuitive would be to simply add the 'Duplicate Chapter' option in the settings menu of an existing chapter. Makes sense?

adityaraute avatar May 08 '24 12:05 adityaraute

Adding it to the Edit Chapter menu comes with its own challenge. Namely, how does the duplicate operation interact with existing form controls (such as Name), which might be in a dirty state.

Maybe worth exploring:

  • Change gear behavior to display a popup menu with Delete, Duplicate, Edit items. Delete would just launch a confirmation dialog and Duplicate will either launch a "choose name" dialog or the Edit chapter dialog with a generated name (Chapter 1 Copy 6), which ostensibly they will change and then click Save. And of course choosing the edit item would be just like clicking the gear was previously.

  • Leave gear alone but create a right-click/long-press context menu on the chapter list with the same items as above. This preserves existing gear behavior and simplifies duplicate/delete at the cost of discoverability (who knew there's a context menu)

schlawg avatar May 08 '24 15:05 schlawg

Adding it to the Edit Chapter menu comes with its own challenge. Namely, how does the duplicate operation interact with existing form controls (such as Name), which might be in a dirty state.

If Name is the only field that is a problem, it can be simply suffixed by '- Copy' which the user can later rename as necessary. No other field in my opinion needs to be verified as the other field behaviour will be the exact same as for the current chapter.

adityaraute avatar May 08 '24 16:05 adityaraute

What if it has already been changed by the user, but not saved?

schlawg avatar May 08 '24 16:05 schlawg

Fair point

adityaraute avatar May 09 '24 10:05 adityaraute