[FR] Make behavior of deleting currently-viewed page consistent
Description
When the currently-viewed page is deleted, there are two possible behaviors. For documents, a banner appears at the top of the page indicating that the document has been moved to the trash. For database-related views, (i.e. table-view and kanban board), the current page closes and replaced by last previously opened page. It would be better if we chose one and roll with it for all views.
Impact
All users
Additional Context
No response
v0.1 will integrate database views into the editor so let's check the consistency once it's released
@annieappflowy The behaviour is inconsistent even in v1.0.0.
Btw what's the expected behaviour here? Do we expect the same dialog like in the Document to appear for Grid and Board as well?
Recording
https://user-images.githubusercontent.com/13991373/226326205-565ab6b3-ae10-4e05-a998-90993e1b054e.mov
Thanks!
Expected behavior: After deleting a document, the current page closes and is replaced by last previously opened page
@annieappflowy Does this behaviour apply to all page types ? Or for Grid and Board only (?), since Document already has the dialog implemented.
Sorry for missing your comment. Would you like to continue to work on it? Expected: after the deletion, a banner shows up at the top for a few seconds then the deleted page should be replaced by last previously opened page. This applies to all types (Grid, Board, and Document)
Hey there, I would love to fix this issue!
Hi @mak2002 , thanks for the help! You can ask @richardshiue or @Xazin for help
Hey there @Xazin , I am a new contributor in AppFlowy 😄
As of now after we delete a document, it loads the last document instead of previously opened page. We are emitting an event for this here: deletion event. I'm curious if we store the ID of the previously opened page somewhere in our code. Could you provide some pointers on how to address this issue?
Thank you!