mkoskim / mawejs

Mawe (Mawe Advanced Writer's Editor) with ElectronJS, React and NodeJS. Third generation of the editors I have written for my own use.
MIT License
6 stars 4 forks source link

Import: Dialog close = Cancel #254

Open mkoskim opened 1 week ago

mkoskim commented 1 week ago

Get rid of "Cancel" button. Instead:

  1. Add dialog close button (and make it cancel)
  2. Also, ESC closes dialog (and cancels the operation)
  3. Move "Import" button to the bottom of options, just like in Export view. Or at least, it does not have to be in the toolbar.

This should not be very hard to do. The dialog is MUI Dialog. We could move that part to the View component itself to ease the implementation:

https://github.com/mkoskim/mawejs/blob/master/src/gui/app/app.js#L246

That is:

  1. Move Dialog part to import/import.js. Make it a ImportDialog component.
  2. Render it in RenderDialogs.

That way you should have full control of the implementation.

NinaVincova commented 1 week ago

Hello :) It is possible to work on this issue? Can it be assigned?

mkoskim commented 1 week ago

Absolutely! Here we go.

If you have any questions, feel free to ask. For developing, it is probably easier to use "Import from Clipboard", so you don't have to find a file every time. It will be even faster, if you temporarily bind a hotkey for it.

EDIT: I added import test file to ease development. You can uncomment the line that imports a file when starting up:

https://github.com/mkoskim/mawejs/blob/master/src/gui/app/app.js#L142

NinaVincova commented 1 day ago

Hi, I think I have it done. Are there any rights which I have to gain in order to push it on git?

mkoskim commented 1 day ago

Hi!

Hi, I think I have it done. Are there any rights which I have to gain in order to push it on git?

You should be able to make a Pull Request (PR), which I can then merge to the repo :) You can make e.g. a fork from repo, and then make a PR to merge it back.