GSoC 2022 contribution / recycle bin idea

Hello everyone,
I am Anusha Khalil BSSE last year student.
Since I am new to open source, I would appreciate if any of mentors guide me towards a project. My expertise is in Python, and I have worked with different libraries in Python. Like (panda, NumPy). I am an enthusiast and always worked on dynamic programming technique, I enjoy it the most on making things flexible dynamically. I have also worked on some django projects. I am pretty interested in your proposed project “Recycle bin” for GSoC 2022.
What I understood about the project is providing with user the recycle bin. My one project was the same as your project recycle bin, provided with user extra features to view the deleted data, and restore them according to it. I have pretty much knowledge related to this in python.
Can any of the mentor to the project guide me further with this?
@tkimnguyen @mikemets

1 Like

Hi @Anushakhalil and welcome :slight_smile: Yes, the idea for the recycle bin is something that we would love to have in Plone.

CastleCMS is built using Plone and it includes a recycle bin function that I think works well. You can look at the code in GitHub - castlecms/castle.cms: A product of Wildcard Corp. https://wildcardcorp.com, specifically some starting points at Search · recycle · GitHub I think CastleCMS took the approach of marking an item as deleted and then modified all the views so that they would not show anything that was marked as deleted.

A similar way that trash / recycle bins have been implemented is as an additional workflow state, so they would do something like this: take the default workflow (Simple Publication) and add a state called "deleted" and associated transitions. All default views in Plone would have to look for items in this state and not show them.

There are other approaches that have been taken over the years, implemented as add-ons, such as these:

To understand this more, it would be good if you familiarized yourself with Plone. Install it, run through the user documentation, look at the code, try the Mastering Plone training for the most up to date developer docs.

You should look at a view like folder_contents and see how it finds things to display.

You should also look at the workflows Plone comes with and see how they work.

I'm happy to guide your exploration!

The Plone improvement proposal (PLIP) for the recycle bin idea is at PLIP: implement deletion to a recycle bin that allows users to restore items · Issue #2966 · plone/Products.CMFPlone · GitHub

The other thing we need to consider in the modern era of Volto and separate front ends for Plone: we need to create endpoints for the REST API, and we need to implement UI in Volto for deleting items, for viewing the recycle bin, and for restoring items from the recycle bin.

@Anushakhalil is there code or working examples we could take a look at? I'm curious what you created.

I am not able to share the links here. @tkimnguyen
Plus I am on understanding the workflow of Plone. I am pretty excited for this project.

1 Like

Please try now

Hi @Anushakhalil, please stay tuned. Do you have questions?

3 posts were split to a new topic: GSoC 2022 recycle bin idea

Below is the CLI implementations for the Trash Bin, We have also worked for the GUI.
For this project we have used the windows recycle bin using python.
For your project I think main thing is to save the track of directory for the files or folders when deleting. So that the restore can be implemented.

Which I have done in this project. Have a look in this CLI.