processing / p5.js-web-editor

The p5.js Editor is a website for creating p5.js sketches, with a focus on making coding accessible and inclusive for artists, designers, educators, beginners, and anyone else! You can create, share, or remix p5.js sketches without needing to download or configure anything.
https://editor.p5js.org
GNU Lesser General Public License v2.1
1.3k stars 1.26k forks source link

Converting Editor/index.js into a functional component #3041

Open Keshav-0907 opened 4 months ago

Keshav-0907 commented 4 months ago

Increasing Access

Functional components are simpler, shorter, and more performant. Additionally, with the introduction of Hooks, they can effectively manage state and side effects

Feature enhancement details

We should convert the Editor/index.js class component to a functional component as it is recommended for improved simplicity, brevity, and performance.

https://github.com/processing/p5.js-web-editor/blob/96c54703f4c00c6fa60266f71a9c69a26991dacd/client/modules/IDE/components/Editor/index.jsx#L84-L91

lindapaiste commented 4 months ago

This has been brought up before but it's really difficult to get the CodeMirror parts right due to how CodeMirror manages state. There is an open PR for it but I'm very scared about breaking things. See #2710 and #2688.

mr07s commented 3 months ago

I want to work on this @Keshav-0907 can you assign me this error?

Pratyush-Dehury commented 3 months ago

I want to work on this issue. @Keshav-0907 can you assign me? Below is the preview of changes that can be made. sample

Aseem22 commented 1 month ago

If this issue is still relevant and important, I would like to work on it. Could you please assign it to me? @Keshav-0907 @raclim @lindapaiste

raclim commented 1 month ago

Thanks for showing interest in this issue @Aseem22! I think we might hold off on this for now until the summer, which is when we're hoping to revisit this.

PiyushChandra17 commented 1 month ago

@raclim I think this issue is related to upgrading CodeMirror to v6, as one of the expected outcome is Converting Class based Editor Component into Functional component. I would like to work on this issue knowing the fact that how complex it is and probably requires a lot more effort. When you say we might hold off on this as of now until summer, you mean starting 1st of July right?

raclim commented 1 month ago

@PiyushChandra17 Yes! As this issue is a part of that project, it ideally would be handled altogether by the fellow who would be working on it over the summer. However, feel free to suggest ideas or raise any concerns that you foresee with tackling this!

PiyushChandra17 commented 1 month ago

@raclim Sure, that was very informative! I would try .. :)

Aseem22 commented 1 month ago

@PiyushChandra17 Yes! As this issue is a part of that project, it ideally would be handled altogether by the fellow who would be working on it over the summer. However, feel free to suggest ideas or raise any concerns that you foresee with tackling this!

@raclim @PiyushChandra17, Is a candidate with around 8-9 months of experience in open source considered eligible or suitable for acceptance as a fellow? I would love to contribute in this project as a fellow.

raclim commented 1 month ago

@Aseem22 Here is a full description of the fellowship and its eligibility requirements! The application portal will be open until May 31st.

Aseem22 commented 1 month ago

@Aseem22 Here is a full description of the fellowship and its eligibility requirements! The application portal will be open until May 31st.

Thanks!!