lichess-org / lila

♞ lichess.org: the forever free, adless and open source chess server ♞
https://lichess.org
GNU Affero General Public License v3.0
14.84k stars 2.2k forks source link

Create an option to duplicate chapters in studies #15256

Open adityaraute opened 2 months ago

adityaraute commented 2 months ago

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.

allanjoseph98 commented 2 months ago

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.

randompearl-stack commented 2 months ago
adityaraute commented 2 months ago

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?
schlawg commented 2 months ago

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:

adityaraute commented 2 months ago

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.

schlawg commented 2 months ago

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

adityaraute commented 2 months ago

Fair point