WikiEducationFoundation / WikiEduDashboard

Wiki Education Foundation's Wikipedia course dashboard system
https://dashboard.wikiedu.org
MIT License
385 stars 600 forks source link

Refactor : Converted timeline_handler.jsx from class based components to Functional Components #5836

Closed Prince0906 closed 1 day ago

Prince0906 commented 1 week ago

What this PR does

Converted timeline_handler.jsx from class based to functional components

Screenshots

Before:

https://github.com/WikiEducationFoundation/WikiEduDashboard/assets/145124801/7fa51c00-d612-46e5-a75d-dc9a44cdb43e

After:

https://github.com/WikiEducationFoundation/WikiEduDashboard/assets/145124801/3bbdab01-3cbf-420e-8bb4-9f411db72b7f

Open questions and concerns

This is my first time contrubuting to Wikimedia.So,if I have done anything wrong in my PR,give feedback and I will try to rectify that.

Prince0906 commented 1 week ago

@ragesoss Can you review the changes in the code? I am also converting another file from class-based to functional components. If you find anything unclear or poorly coded, I will modify it and apply the same improvements to the other files.

ragesoss commented 1 week ago

Please include before/after screenshots of the component you've changed.

Prince0906 commented 4 days ago

@ragesoss Sir, What will be the process for merging this to main branch or is there anything wrong in the file?

ragesoss commented 1 day ago

The before/after videos you've included don't really show the functionality of the TimelineHandler component, because there is no timeline content. To test the component, you need to create a timeline. This is most easily done if you switch to wiki_education: true mode in application.yml, and then create a new course.

Prince0906 commented 1 day ago

The before/after videos you've included don't really show the functionality of the TimelineHandler component, because there is no timeline content. To test the component, you need to create a timeline. This is most easily done if you switch to wiki_education: true mode in application.yml, and then create a new course.

Ok, tested it using that, now you can check the screen recording also, has updated it.