p5.js-web-editor icon indicating copy to clipboard operation
p5.js-web-editor copied to clipboard

Converting Editor/index.js into a functional component

Open Keshav-0907 opened this issue 1 year ago • 11 comments

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

Keshav-0907 avatar Feb 21 '24 02:02 Keshav-0907

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.

lindapaiste avatar Feb 21 '24 20:02 lindapaiste

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

mr07s avatar Mar 11 '24 15:03 mr07s

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

Pratyush-Dehury avatar Mar 11 '24 16:03 Pratyush-Dehury

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

Aseem22 avatar May 21 '24 20:05 Aseem22

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.

raclim avatar May 21 '24 23:05 raclim

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

PiyushChandra17 avatar May 22 '24 08:05 PiyushChandra17

@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 avatar May 22 '24 12:05 raclim

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

PiyushChandra17 avatar May 22 '24 14:05 PiyushChandra17

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

Aseem22 avatar May 22 '24 18:05 Aseem22

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

raclim avatar May 22 '24 18:05 raclim

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

Thanks!!

Aseem22 avatar May 22 '24 18:05 Aseem22