Skip to content

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

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

Closed
Keshav-0907 opened this issue Feb 21, 2024 · 11 comments
Closed

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

Keshav-0907 opened this issue Feb 21, 2024 · 11 comments
Labels
Enhancement Improvement to an existing feature

Comments

@Keshav-0907
Copy link
Contributor

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.

class Editor extends React.Component {
constructor(props) {
super(props);
this.tidyCode = this.tidyCode.bind(this);
this.updateLintingMessageAccessibility = debounce((annotations) => {
this.props.clearLintMessage();
annotations.forEach((x) => {

@Keshav-0907 Keshav-0907 added the Enhancement Improvement to an existing feature label Feb 21, 2024
@lindapaiste
Copy link
Collaborator

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.

@raclim raclim added this to the MINOR Release 2.14.0 milestone Mar 8, 2024
@mr07s
Copy link

mr07s commented Mar 11, 2024

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

@Pratyush-Dehury
Copy link

Pratyush-Dehury commented Mar 11, 2024

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
Copy link
Contributor

Aseem22 commented May 21, 2024

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
Copy link
Collaborator

raclim commented May 21, 2024

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
Copy link
Contributor

PiyushChandra17 commented May 22, 2024

@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
Copy link
Collaborator

raclim commented May 22, 2024

@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
Copy link
Contributor

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

@Aseem22
Copy link
Contributor

Aseem22 commented May 22, 2024

@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
Copy link
Collaborator

raclim commented May 22, 2024

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

@Aseem22
Copy link
Contributor

Aseem22 commented May 22, 2024

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

Thanks!!

@rj-Anurag rj-Anurag mentioned this issue Jul 5, 2024
4 tasks
@raclim raclim closed this as not planned Won't fix, can't repro, duplicate, stale Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improvement to an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants