plone / volto

React-based frontend for the Plone Content Management System
https://demo.plone.org/
MIT License
268 stars 275 forks source link

Refactor class components to functional components #4460

Open sneridagh opened 3 months ago

sneridagh commented 3 months ago

PLIP (Plone Improvement Proposal)

Responsible Persons

Proposer: Víctor Fernández de Alba (@sneridagh)

Seconder:

Abstract

Refactor all the possible components in Volto that still are class-based components. Convert them to functional components, whenever possible.

Motivation

Volto still have a number of core components that are React class-based components. This prevents the use of hooks in them, and newest DX on them.

The idea is also while moving to them, use hooks to abstract the functionality present in Redux and in data fetching so in a near future we can easily switch using the hooks to use other props provider.

Assumptions

No assumptions.

Proposal & Implementation

Refactor should be done carefully and providing Cypress (acceptance) tests where they do not exist. The lifecycle of the components should be preserved while watching out for edge cases and UX problems.

Deliverables

It should be delivered all at once, as a major breaking change. Ideally, we won't change the contract of any of the components, so no new props passed down, no return anything to the tree that we were not returning before, unless it's justified.

If the contract has to be broken, then it must be properly documented and exposed in the upgrade guide.

The refactored components. Here there is a preliminary list, subject to change:

Risks

The lifecycle of a component could easily be changed if the refactor is not done carefully and giving attention to details, that's why we should provide acceptance tests and heavy QA should be done while doing it.

Participants

Víctor Fernández de Alba (@sneridagh) Anyone who would like to help and take over, will be appreciated.

sudhanshu1309 commented 3 months ago

Hey! @sneridagh, I'm interested in this project. Can I get it assigned?

sneridagh commented 3 months ago

To all GSOC aspirants: https://community.plone.org/t/recommendations-for-gsoc-aspirants/16301/3

/cc @sudhanshu1309

lord2anil commented 3 months ago

Sir i want to take this project.

Ciggzy1312 commented 3 months ago

I would like to work on this for the GSOC period

Pranshu1902 commented 2 months ago

@sneridagh I would like to work on this issue under GSOC

Vanshika432 commented 2 months ago

I want to resolve this issue sir.

KGoutham7214 commented 2 months ago

@sneridagh I would love to work on this issue. I already do have experience in converting class components to functional components in my personal E-commerce using React project. I would come up with a good proposal as soon as applications are open looking forward to work with this issue

pupsb commented 2 months ago

@sneridagh I have experience working with functional components in React, as well as a good understanding of React's architecture and performance optimization techniques. I am familiar with modern JavaScript syntax and best practices, and have experience working with Git and GitHub for version control and collaboration. I am also comfortable writing technical documentation and reports.

If given the opportunity to participate in Google Summer of Code, I am committed to dedicating the time and effort necessary to complete this project to the best of my abilities. I am excited about the possibility of working with your team and contributing to the React community.

Thank you for your consideration, and I look forward to hearing from you soon.

YOKESHCR commented 2 months ago

Hi @sneridagh I would like to contribute in resolving this. I have been using React for the front end for the past one year and have been practicing by creating app clones.

If given an opportunity I would give my best in resolving the requirement within the stipulated time period.

Thank you

rajvinder-kaur commented 2 months ago

hello @sneridagh i am a frontend dev with a experience in working with reactjs , i am looking forward for working with you on this project with all my enthusiasm

SHOORS commented 2 months ago

@sneridagh I'd like to introduce myself, I'm a recent graduate from BrainStation's web development bootcamp where I acquired skills in React (as well as HTML, CSS/SaSS. and backend skills with MySQL, Node.js and Express servers), and would be very interested in this project. I'm currently going through all Plone training docs, and look forward to submitting a quality proposal that addresses implementation, deliverables, and risks.

Thanks for the consideration, and I look forward to hearing from you once you have my Plone Contributor Agreement and proposal.

Src0p commented 2 months ago

I was going through the code base , I have some experience with react class components , and know how to develop websites with function components in react. Can someone guide me how to start working on it.

geekyasif commented 2 months ago

Hi there! I'm interested in contributing to this project and noticed that this issue is still open. Is it still available for contribution? If so, I'd be happy to take a look and work on it. I am a skilled React developer with experience in functional components and am interested in contributing to the project.

avijitsaha2997 commented 2 months ago

@sneridagh I'm from Bangladesh. I can refactor all of these components. I'm currently working on React. So, I have a lot of knowledge about these things. If you think I'm a perfect person for this issue then I wish you will assign me this issue sir.

stevepiercy commented 2 months ago

@Src0p @geekyasif @avijitsaha2997 before doing any work, please read contributing guidelines and follow their instructions:

manju121212 commented 2 months ago

Hii Mentor I would like to Contribute on your project , Can you please suggest Some resources so that i can learn new technology that you have used in your project

stevepiercy commented 2 months ago

@amit429 from https://plone.org/community/gsoc/2023:

As a GSoC applicant, please direct your questions to the community forum (https://community.plone.org/tag/gsoc). Do not use any other contact method, as doing so may harm your chances of acceptance into the program by demonstrating your unwillingness to follow instructions.

snip

If you want to apply and you have questions, please use exclusively the community forum (https://community.plone.org/tag/gsoc). DO NOT USE:

  • direct emails to mentors
  • GitHub issue tracker
sneridagh commented 2 months ago

@nilootpal @onlykingKD I saw you edited the main PLIP text, could you please leave it as it was? Thanks.

onlykingKD commented 2 months ago

@nilootpal @onlykingKD I saw you edited the main PLIP text, could you please leave it as it was? Thanks.

Hi @sneridagh , actually the Convert to issue button in Deliverables sections got clicked by mistake. Sorry about that,

stevepiercy commented 2 months ago

@sneridagh it appears that several people were editing the PLIP text. Are we OK with this?

Screen Shot 2023-03-22 at 1 32 07 PM

IMO, only the issue Author and Volto Team members should be allowed to make corrections to the issue description in Volto. Newbies definitely should not be allowed to do this.

BhuvaneshPatil commented 2 months ago

@sneridagh it appears that several people were editing the PLIP text. Are we OK with this?

Screen Shot 2023-03-22 at 1 32 07 PM

IMO, only the issue Author and Volto Team members should be allowed to make corrections to the issue description in Volto. Newbies definitely should not be allowed to do this.

I totally agree with this. This may create misunderstanding and affect the productivity.

Pathholder1806 commented 2 months ago

Hey @sneridagh I would like to contribute to this issue under this year's GSoC program. So shall I submit a proposal for this through the GSoC Portal ?

SaiRev0 commented 2 months ago

Hey @sneridagh I would like to contribute to this issue under this year's GSoC program. So shall I submit a proposal for this through the GSoC Portal ?

Yes that is the only way

Pathholder1806 commented 2 months ago

Thanks @SaiRev0 for the quick response!

stupiddint commented 2 months ago

Should I also present a demo project for this in my proposal. If yes like what should I be presenting? @SaiRev0

danielperaza commented 2 months ago

I'm interested in collaborating, how can I contribute? I know React quite well.

stevepiercy commented 2 months ago

@stupiddint @warmachine028 @danielperaza please see Volto and general contributing guidelines.

We do not discuss GSoC proposals until they are submitted. You may update a submitted proposal as many times as you like until the deadline on Apr 4.

Additional comments that do not directly address the issue topic will be hidden or deleted. Thank you for your focus on the issue, not general contributing or GSoC questions.