AppFlowy icon indicating copy to clipboard operation
AppFlowy copied to clipboard

[FR] Make behavior of deleting currently-viewed page consistent

Open richardshiue opened this issue 3 years ago • 8 comments

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

richardshiue avatar Jan 07 '23 06:01 richardshiue

v0.1 will integrate database views into the editor so let's check the consistency once it's released

annieappflowy avatar Jan 08 '23 04:01 annieappflowy

@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!

bijaykumarpun avatar Mar 20 '23 11:03 bijaykumarpun

Expected behavior: After deleting a document, the current page closes and is replaced by last previously opened page

annieappflowy avatar Mar 20 '23 12:03 annieappflowy

@annieappflowy Does this behaviour apply to all page types ? Or for Grid and Board only (?), since Document already has the dialog implemented.

bijaykumarpun avatar Mar 20 '23 12:03 bijaykumarpun

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)

annieappflowy avatar Jul 11 '23 13:07 annieappflowy

Hey there, I would love to fix this issue!

mak2002 avatar Dec 09 '23 09:12 mak2002

Hi @mak2002 , thanks for the help! You can ask @richardshiue or @Xazin for help

annieappflowy avatar Dec 16 '23 03:12 annieappflowy

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!

mak2002 avatar Dec 24 '23 16:12 mak2002