Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete a note/task from side panel #7069

Open
Tracked by #7071
Bonapara opened this issue Sep 16, 2024 · 11 comments · May be fixed by #7200
Open
Tracked by #7071

Delete a note/task from side panel #7069

Bonapara opened this issue Sep 16, 2024 · 11 comments · May be fixed by #7200

Comments

@Bonapara
Copy link
Member

Bonapara commented Sep 16, 2024

Current Behavior

You can't delete a note/task without navigating to it or accessing the Notes object list.

CleanShot.2024-09-16.at.18.27.22.mp4

Desired Behavior

Add an action button that allows deletion of the note/task directly from the side panel.

7030b76bd9750096c880648d49d6fb75b2e886ff37f1c3014753b6713f8c2056

image

@Bonapara Bonapara added good first issue Good for newcomers scope: front Issues that are affecting the frontend side only size: short type: design improvement prio: med labels Sep 16, 2024
@harshit078
Copy link
Contributor

@Bonapara, what if we allow the user to delete the notes directly from the card itself for ease of functionality ?

Screenshot 2024-09-17 at 12 56 42 AM

And for tasks we can add the delete in the side panel as mentioned

@FelixMalfait
Copy link
Member

@Bonapara we need to think of this in the context of all objects not just notes/tasks because it's the same panel. For example in your desired behavior, could you please provide additional guidance that would apply to every object? Should we remove the object type in the header for all objects?

@FelixMalfait FelixMalfait added blocked: design needed This doesn't seem right and removed good first issue Good for newcomers labels Sep 16, 2024
@Bonapara
Copy link
Member Author

We synced with Félix. For V1 this should be hardcoded on every record side panel which means:

  • When I create or edit a task from a record page
  • When I create or edit a note from a record page
  • When I create a record from a side panel:
CleanShot.2024-09-17.at.18.58.33.mp4

In V2, we will display all the actions a user can take on a record.

@ehconitin
Copy link
Contributor

@Bonapara can I work on this If no one is assigned yet?

@Bonapara
Copy link
Member Author

Sure Nitin! Thanks

@ehconitin
Copy link
Contributor

@Bonapara
How about a confirmation modal on delete?

@FelixMalfait
Copy link
Member

@ehconitin the goal here is for this side panel to be a small version of the record show page with as little duplicated code as possible but shared code instead, so we wouldn't want to introduce new behavior. Introducing a confirmation modal on the show page had been discussed in #6559 but was not prioritized by @Bonapara so far I think (we instead bet on soft delete / be able to recover records easily). Maybe @Bonapara would decide to reopen a similar issue but I think it's better to invest time here in doing things as cleanly as we can. In an ideal world, the list of actions displayed would come from a single source of truth

Restore button on show page mobile view / in sidebar:
Command bar

Actions:
Screenshot 2024-09-23 at 21 25 54

The actions that will be displayed are the same that you have with "..." on the showpage. We will just have special attributes to indicate which one is "pinned" and which one is the "cta". For the mobile/sidebar view we only display one action, the CTA in blue if there's a CTA, then the first pinned action if there isn't any (in grey like the delete button in the screenshot).

Not sure if it's clear, @Bonapara might explain it best 😅

@ehconitin
Copy link
Contributor

Oh, thanks for the insights, @FelixMalfait!
It makes sense not to introduce new behavior by adding a confirmation modal for deletions and to have an option to restore them easily. So instead of closing the right drawer on the deletion of the record, a restore banner should appear at the top right? I’ll make the changes in #7200. (@Bonapara, tagging you for confirmation.)
The actions part is still a bit unclear to me, but I’ll discuss it with Thomas to clarify things.

@Bonapara
Copy link
Member Author

Oh, thanks for the insights, @FelixMalfait! It makes sense not to introduce new behavior by adding a confirmation modal for deletions and to have an option to restore them easily. So instead of closing the right drawer on the deletion of the record, a restore banner should appear at the top right? I’ll make the changes in #7200.

💯

(@Bonapara, tagging you for confirmation.) The actions part is still a bit unclear to me, but I’ll discuss it with Thomas to clarify things.

Anytime!

@FelixMalfait
Copy link
Member

@ehconitin The restore banner should already be there, it's just the show page that's embedded into the panel already.

@ehconitin
Copy link
Contributor

@FelixMalfait Yup you are correct, but the banner does not appear till RecodShowContainer is re-rendered somehow. In the recording I am setting a new title for deleted record to forcefully re-render, which then gets recordFromStore and recordFromStore.deletedAt which is responsible for the banner. How would this work in our case?
#7146 is related to this behaviour i guess.

2024-09-24.13-05-29.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🏗 In progress
Development

Successfully merging a pull request may close this issue.

4 participants