Skip to content

Add Drag/Drop for opening .mmd files #332

@udlose

Description

@udlose

We should allow for drag/drop of .mmd files to open them.

Important

Please create your branch from the latest develop branch, not main
When ready, create your Pull Request against develop branch, not main

When a .mmd file is dragged over the TextEditor, the .mmd file should:

  1. Open the file if no file is opened
  2. If a file is currently open but IsDirty = false, then the .mmd file should be opened
  3. If a file is currently open and IsDirty = true, the user should be prompted if they want to save the current document before proceeding. There is already functionality that does this so you can just re-use what is there:
    a. An example of where this is being used is in MainWindowViewModel.PromptSaveIfDirtyAsync - see PromptSaveIfDirtyAsync
    b. the ConfirmationDialog should contain 3 buttons: Yes, No, and Cancel
    c. the ConfirmationDialog prompt text should be similar to, if not the same as, what is used in MainWindowViewModel.PromptSaveIfDirtyAsync - see PromptSaveIfDirtyAsync
    d. if the user clicks Yes , the open file should be saved first, then closed, then open the file path of the dragged file
    e. if the user clicks No, the open file should not be saved but instead closed, then open the file path of the dragged file
    f. if the user clicks Cancel, the ConfirmationDialog should be closed and no action takes place.

Metadata

Metadata

Assignees

Labels

backendCovers changes, bug fixes, and improvements to the backend implementation.enhancementNew feature or requestgood first issueGood for newcomers

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions