Skip to content

Allow to import/export puzzles

Antoine Belvire requested to merge feature/6_import_export_puzzle/main into master

Context

Completes #6 (closed). This adds import/export functions to Croiseur.

Here's how GUI now looks:

Screencast Import/Export

(Note: The typos in the "back to puzzle selection" button tooltip, visible on the screencast, have been fixed, see this comment).

What has changed?

Main Changes

common

  • Added PuzzleCodecDetails: Metadata of an encoder/decoder

spi

  • Added spi-puzzle-codec
  • Added new presentation methods from import/export

core

  • Added functions to list codecs
  • Added functions to import/export puzzles

puzzle-xd-codec-plugin

  • Created plugin adapting puzzle-xd-codec to spi-puzzle-codec.

cli

  • Implemented the commands corresponding to the functions added to core

gui

  • Implemented the view and controller corresponding to the functions added to core. In particular:
    • Added an Import button in welcome screen puzzle selector, which opens a file chooser to import a puzzle to the puzzle repository
    • Added an Export button in editor view puzzle pane, which opens a file chooser to export the last puzzle save to the puzzle repository

Side Effects

core

  • Split the PuzzleService into PuzzlePersistenceService, PuzzleImportService and PuzzleExportService to reduce complexity.

Others

gui-tests

  • Created the module, for end-to-end testing from GUI.

Reviewers

Code has already been reviewed through several smaller MRs (see #6 (closed) for the complete list). This last big MR gives the whole picture and is the occasion to see if everything fits. Hopefully, no big issue will be raised here.

Edited by Antoine Belvire

Merge request reports