WikiEducationFoundation / WikiEduDashboard

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

Component refactor for React class components #5393

Open Aminehassou opened 1 year ago

Aminehassou commented 1 year ago

NOTE TO NEW CONTRIBUTORS

Please only convert one component; choose a different issue after you've completed one. These are low-priority refactoring tasks, but they still require code review and careful checking for regressions and errors. In your PR, describe the manual testing you did to ensure that the component is still working the same way after the refactor, and include before/after screenshots of that show the component as it is used in the app. If the component is used many places, screenshots of multiple different uses is helpful.

Current Behavior:

At the moment, the React side of the codebase still uses around 163 class components. 134 of those class components use the legacy createReactClass method while the other 29 class components use the newer class definitions. The 29 class components should be the main focus for the refactor. Once those are done, we can move on to the more legacy classes

Desired Behavior:

Preferably, we want to only use functional components. Thus, converting the remaining class components into functional components would be a nice code quality improvement.

Checklist for newer classes to be converted:

Checklist for legacy classes to be converted:

adityagarg06 commented 1 year ago

hi @Aminehassou Can I contribute to the task if it doesn't affect your GSOC?

Aminehassou commented 1 year ago

@adityagarg06 Go for it! My GSOC is already over.

amjido-01 commented 1 year ago

hi, I came across this open source project issue for react components migration and I wanted to contribute also, but am using windows and it seems like setting up the project locally to start contributing is basically not for windows user and. Need help

Aminehassou commented 1 year ago

@amjido-01 I'd recommend following this guide: https://github.com/WikiEducationFoundation/WikiEduDashboard/blob/master/docs/setup.md You can setup the project on Windows using WSL2

amjido-01 commented 1 year ago

Thanks for your quick response Amine Hassan, I have went through the Readme file for using the WLS2 and I will try to get it up and running as soon as possible and if I get stuck, please I will let you know so you can help me out. Thank you.

On Mon, Sep 25, 2023, 12:53 PM Amine Hassou @.***> wrote:

@amjido-01 https://github.com/amjido-01 I'd recommend following this guide:

https://github.com/WikiEducationFoundation/WikiEduDashboard/blob/master/docs/setup.md You can setup the project on Windows using WSL2

— Reply to this email directly, view it on GitHub https://github.com/WikiEducationFoundation/WikiEduDashboard/issues/5393#issuecomment-1733513959, or unsubscribe https://github.com/notifications/unsubscribe-auth/AW4RYGNBEEVOI4B6RETOLODX4FWCTANCNFSM6AAAAAAYCO6CH4 . You are receiving this because you were mentioned.Message ID: @.*** com>

justiceotuya commented 1 year ago

i will be working on some of the conversion

justiceotuya commented 1 year ago

@Aminehassou can you send me a slack invite?

Aminehassou commented 1 year ago

@Aminehassou can you send me a slack invite?

Sure, I'll contact Sage to get you an invite. @ragesoss

justiceotuya commented 1 year ago

currently working on ArticleFinder

PrathamNaveen commented 1 year ago

Hello there, I am new to gsoc and open source. I feel like this project is a good way to start my open source journey, I am thinking of starting with converting the class based components to functional based components at first then plan on improving the ticket system search... Can I please get a slack invite?

ragesoss commented 1 year ago

@PrathamNaveen please send me your email so that I can invite you.

amjido-01 commented 1 year ago

I always want to start my contribution, please someone should add to the slack

On Mon, Oct 23, 2023, 7:35 PM Sage Ross @.***> wrote:

@PrathamNaveen https://github.com/PrathamNaveen please send me your email so that I can invite you.

— Reply to this email directly, view it on GitHub https://github.com/WikiEducationFoundation/WikiEduDashboard/issues/5393#issuecomment-1775787929, or unsubscribe https://github.com/notifications/unsubscribe-auth/AW4RYGI62JY2FKVSFEYBD23YA22I3AVCNFSM6AAAAAAYCO6CH6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZVG44DOOJSHE . You are receiving this because you were mentioned.Message ID: @.*** com>

ragesoss commented 1 year ago

@amjido-01 I'll need your email address.

yellowHatpro commented 1 year ago

@ragesoss could you also share the slack invite with me? My email is: yellowhatpro3119@gmail.com. Thanks!

PrathamNaveen commented 1 year ago

@ragesoss My email is: prathamnaveen.m@gmail.com

amjido-01 commented 1 year ago

Here is my email: @.***

On Tue, Oct 24, 2023, 3:59 AM PrathamNaveen @.***> wrote:

@ragesoss https://github.com/ragesoss My email is: @.***

— Reply to this email directly, view it on GitHub https://github.com/WikiEducationFoundation/WikiEduDashboard/issues/5393#issuecomment-1776422054, or unsubscribe https://github.com/notifications/unsubscribe-auth/AW4RYGNCY6DQ6CA5CJII35TYA4VH5AVCNFSM6AAAAAAYCO6CH6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZWGQZDEMBVGQ . You are receiving this because you were mentioned.Message ID: @.*** com>

ragesoss commented 1 year ago

@amjido-01 that didn't work

amjido-01 commented 1 year ago

what do you mean, sir. do you mean that the email did not work

ragesoss commented 1 year ago

what do you mean, sir. do you mean that the email did not work

No email address came through. Looks like it got censored.

amjido-01 commented 1 year ago

Ok, I actually don't know where the problem arise, but how do you think I should send the email to you. Thank you sir

On Tue, Oct 24, 2023, 3:36 PM Sage Ross @.***> wrote:

what do you mean, sir. do you mean that the email did not work

No email address came through. Looks like it got censored.

— Reply to this email directly, view it on GitHub https://github.com/WikiEducationFoundation/WikiEduDashboard/issues/5393#issuecomment-1777360110, or unsubscribe https://github.com/notifications/unsubscribe-auth/AW4RYGNTINHYLVHGSEQJQNTYA7G7XAVCNFSM6AAAAAAYCO6CH6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZXGM3DAMJRGA . You are receiving this because you were mentioned.Message ID: @.*** com>

ragesoss commented 1 year ago

You can email me directly. See the CONTRIBUTING doc.

amjido-01 commented 1 year ago

Thanks, I will send it now.

On Tue, Oct 24, 2023 at 4:13 PM Sage Ross @.***> wrote:

You can email me directly. See the CONTRIBUTING doc.

— Reply to this email directly, view it on GitHub https://github.com/WikiEducationFoundation/WikiEduDashboard/issues/5393#issuecomment-1777453717, or unsubscribe https://github.com/notifications/unsubscribe-auth/AW4RYGMTRMY7N6WWINEJJJ3YA7LKTAVCNFSM6AAAAAAYCO6CH6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZXGQ2TGNZRG4 . You are receiving this because you were mentioned.Message ID: @.*** com>

amjido-01 commented 1 year ago

i have been trying to set up the project up and running and i have followed all the necessary guides from here https://github.com/WikiEducationFoundation/WikiEduDashboard/blob/master/docs/setup.md. but when i try to run "yarn build" get back this annoying error "Usage Error: Couldn't find the node_modules state file - running an install might help (findPackageLocation)

$ yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] ..." please any help will be appreciated

ragesoss commented 1 year ago

i have been trying to set up the project up and running and i have followed all the necessary guides from here https://github.com/WikiEducationFoundation/WikiEduDashboard/blob/master/docs/setup.md. but when i try to run "yarn build" get back this annoying error "Usage Error: Couldn't find the node_modules state file - running an install might help (findPackageLocation)

$ yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] ..." please any help will be appreciated

You must run yarn first to install the dependencies. That should populate the node modules for you.

amjido-01 commented 1 year ago

@ragesoss even when I run yarn run command then run yarn build I still encounter the same error wki

amjido-01 commented 1 year ago

I literally don't know what is happening along the way

ragesoss commented 1 year ago

'yarn' is different from 'yarn run', I think.

On Fri, Nov 3, 2023, 6:12 AM amjido_01 @.***> wrote:

I literally don't know what is happening along the way

— Reply to this email directly, view it on GitHub https://github.com/WikiEducationFoundation/WikiEduDashboard/issues/5393#issuecomment-1792414789, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGPEY3KHK5HYUXQRNOYL5LYCTUS7AVCNFSM6AAAAAAYCO6CH6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJSGQYTINZYHE . You are receiving this because you were mentioned.Message ID: @.*** com>

justiceotuya commented 1 year ago

have you ran a yarn install or npm install

amjido-01 commented 1 year ago

'yarn' is different from 'yarn run', I think. On Fri, Nov 3, 2023, 6:12 AM amjido_01 @.> wrote: I literally don't know what is happening along the way — Reply to this email directly, view it on GitHub <#5393 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGPEY3KHK5HYUXQRNOYL5LYCTUS7AVCNFSM6AAAAAAYCO6CH6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJSGQYTINZYHE . You are receiving this because you were mentioned.Message ID: @. com>

so, which one I'm to run. "yarn" or "yarn run" please help don't mind me because i may asked so silly questions as I'm new to open source contribution.

amjido-01 commented 1 year ago

@justiceotuya this is what am trying to do, but it seems like to take a lot of time installing the yarn

amjido-01 commented 1 year ago

have you ran a yarn install or npm install

this is what happen after installing yarn, does this means everything is fine? yarninstall

justiceotuya commented 1 year ago

Now run yarn start

On Fri, 3 Nov 2023, 3:21 pm amjido_01, @.***> wrote:

have you ran a yarn install or npm install

this is what happen after installing yarn, does this means everything is fine? [image: yarninstall] https://user-images.githubusercontent.com/96017433/280306766-32b26d02-8503-4039-b970-8cc940d002f0.jpg

— Reply to this email directly, view it on GitHub https://github.com/WikiEducationFoundation/WikiEduDashboard/issues/5393#issuecomment-1792524840, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEG4BACPGJCVXQUNPWNCPWLYCT4V5AVCNFSM6AAAAAAYCO6CH6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJSGUZDIOBUGA . You are receiving this because you were mentioned.Message ID: @.*** com>

amjido-01 commented 1 year ago

Now run yarn start On Fri, 3 Nov 2023, 3:21 pm amjido_01, @.> wrote: have you ran a yarn install or npm install this is what happen after installing yarn, does this means everything is fine? [image: yarninstall] https://user-images.githubusercontent.com/96017433/280306766-32b26d02-8503-4039-b970-8cc940d002f0.jpg — Reply to this email directly, view it on GitHub <#5393 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEG4BACPGJCVXQUNPWNCPWLYCT4V5AVCNFSM6AAAAAAYCO6CH6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJSGUZDIOBUGA . You are receiving this because you were mentioned.Message ID: @. com>

after running yarn start, this is what i got yarnstart

amjido-01 commented 1 year ago

@justiceotuya is everything fine?

amjido-01 commented 1 year ago

ystart after running yarn start. @ragesoss @justiceotuya

justiceotuya commented 1 year ago

if you are using windows, follow this step

https://github.com/WikiEducationFoundation/WikiEduDashboard/blob/master/docs/ubuntu_wsl_setup.md

On Fri, Nov 3, 2023 at 2:12 PM amjido_01 @.***> wrote:

I literally don't know what is happening along the way

— Reply to this email directly, view it on GitHub https://github.com/WikiEducationFoundation/WikiEduDashboard/issues/5393#issuecomment-1792414789, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEG4BAHXSNQ6253EIAIXDM3YCTUS7AVCNFSM6AAAAAAYCO6CH6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJSGQYTINZYHE . You are receiving this because you commented.Message ID: @.*** com>

amjido-01 commented 1 year ago

if you are using windows, follow this step https://github.com/WikiEducationFoundation/WikiEduDashboard/blob/master/docs/ubuntu_wsl_setup.md On Fri, Nov 3, 2023 at 2:12 PM amjido_01 @.> wrote: I literally don't know what is happening along the way — Reply to this email directly, view it on GitHub <#5393 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEG4BAHXSNQ6253EIAIXDM3YCTUS7AVCNFSM6AAAAAAYCO6CH6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJSGQYTINZYHE . You are receiving this because you commented.Message ID: @. com>

yep that is exactly what i followed, and everything seems good except the last step that ask to run the command of "yarn build" then i get that error that i show

amjido-01 commented 1 year ago

@ragesoss @justiceotuya I mean the second to the last step that said to run "yarn build" is what is giving me error settings

justiceotuya commented 1 year ago

ok run bundle install

amjido-01 commented 1 year ago

@justiceotuya ok sir, let me give it a try

amjido-01 commented 1 year ago

@justiceotuya done with the bundle installation, what next sir

amjido-01 commented 1 year ago

@justiceotuya this is what i get after installing bundler. bundler

justiceotuya commented 1 year ago

Try the yarn run or yarn start

On Fri, 3 Nov 2023, 4:24 pm amjido_01, @.***> wrote:

@justiceotuya https://github.com/justiceotuya this is what i get after installing bundler. [image: bundler] https://user-images.githubusercontent.com/96017433/280329856-823a7a4a-fd00-482c-83e5-b1ef11073a38.jpg

— Reply to this email directly, view it on GitHub https://github.com/WikiEducationFoundation/WikiEduDashboard/issues/5393#issuecomment-1792642222, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEG4BAETCN72Y7YYMPJY5GTYCUECLAVCNFSM6AAAAAAYCO6CH6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJSGY2DEMRSGI . You are receiving this because you were mentioned.Message ID: @.*** com>

amjido-01 commented 1 year ago

@justiceotuya then after installing the bundler, I then try running "yarn build" as stated in the setup.md. then this happen. build

amjido-01 commented 1 year ago

@ragesoss @justiceotuya cannot load database configuration: when i run "yarn start"

justiceotuya commented 1 year ago

Please follow the documentation on how to setup your database

On Fri, 3 Nov 2023, 4:26 pm amjido_01, @.***> wrote:

@justiceotuya https://github.com/justiceotuya then after installing the bundler, I then try running "yarn build" as stated in the setup.md. then this happen. [image: build] https://user-images.githubusercontent.com/96017433/280330371-8d8e4fda-ddda-476d-a1e3-108d9c51b11a.jpg

— Reply to this email directly, view it on GitHub https://github.com/WikiEducationFoundation/WikiEduDashboard/issues/5393#issuecomment-1792646059, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEG4BADOVH7TLQJQRCB7V5TYCUEIZAVCNFSM6AAAAAAYCO6CH6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJSGY2DMMBVHE . You are receiving this because you were mentioned.Message ID: @.*** com>

amjido-01 commented 1 year ago

Please follow the documentation on how to setup your database On Fri, 3 Nov 2023, 4:26 pm amjido_01, @.> wrote: @justiceotuya https://github.com/justiceotuya then after installing the bundler, I then try running "yarn build" as stated in the setup.md. then this happen. [image: build] https://user-images.githubusercontent.com/96017433/280330371-8d8e4fda-ddda-476d-a1e3-108d9c51b11a.jpg — Reply to this email directly, view it on GitHub <#5393 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEG4BADOVH7TLQJQRCB7V5TYCUEIZAVCNFSM6AAAAAAYCO6CH6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJSGY2DMMBVHE . You are receiving this because you were mentioned.Message ID: @. com>

ok sir, thank you

sandygudie commented 11 months ago

Hello @ragesoss I am interested in contributing. Please add me to the Slack group. Email is goodnewssandy@gmail.com Thanks

amjido-01 commented 10 months ago

hi @ragesoss I have set up the project locally just recently for the first time, but when I close the project and then later on try to run it again, I keep getting some weird issues, like "500 Internal Server Error If you are the administrator of this website, then please read this web application's log file and/or the web server's log file to find out what went wrong." please can you help me out.

ragesoss commented 10 months ago

This is not the right place for setup issues @amjido-01 . Check the troubleshooting docs, and then post on the dedicated setup problems issue if you're still stuck.