Skip to content

feat: Ask user to save the file before they close the tab #280#289

Merged
tomlin7 merged 5 commits intotomlin7:mainfrom
vyshnav-vinod:feat/ask-save-before-close
Apr 13, 2024
Merged

feat: Ask user to save the file before they close the tab #280#289
tomlin7 merged 5 commits intotomlin7:mainfrom
vyshnav-vinod:feat/ask-save-before-close

Conversation

@vyshnav-vinod
Copy link
Copy Markdown
Contributor

@vyshnav-vinod vyshnav-vinod commented Apr 12, 2024

fix #280

In your comment, you also mentioned the idea of making a whole app destroy event. I have not implemented it in here, but i guess when the whole app is closed/destroyed, we can get the list of active editors and then just manually close them? I guess closing them will trigger the close_tab() function of the tabs and it should trigger the save dialog??

Remove unnecessary comments
@vyshnav-vinod vyshnav-vinod changed the title feat: #280 feat: #280 , Ask user to save the file before they close the tab Apr 12, 2024
@vyshnav-vinod vyshnav-vinod changed the title feat: #280 , Ask user to save the file before they close the tab feat: Ask user to save the file before they close the tab #280 Apr 12, 2024
@tomlin7
Copy link
Copy Markdown
Owner

tomlin7 commented Apr 13, 2024

@vyshnav-vinod the code is all good really nice, but we can move that to the components part from the layout part.

I have also included a save_as option when the opened file doesn't exist

@tomlin7
Copy link
Copy Markdown
Owner

tomlin7 commented Apr 13, 2024

@vyshnav-vinod this now also handles app destroyed event, and checks for unsaved changes

@tomlin7 tomlin7 merged commit cff8f22 into tomlin7:main Apr 13, 2024
@tomlin7
Copy link
Copy Markdown
Owner

tomlin7 commented Apr 13, 2024

once again, @vyshnav-vinod thanks for the contribution! ❤️

@vyshnav-vinod vyshnav-vinod deleted the feat/ask-save-before-close branch April 13, 2024 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ask to save the file before closing the tab

2 participants