Circuitverse: Refactor classes into separate files

Created on 5 Mar 2019  路  9Comments  路  Source: CircuitVerse/CircuitVerse

We should refactor the code to make it easier for people to get started with the code base.
Ideally, each class should have its own file and each standalone function should be on its own file as well.

In the long term we can pack them together for a single file download with webpack (as mentioned in #110)

Example of issues:
_Originally posted by @abdullah-mohamed in https://github.com/CircuitVerse/CircuitVerse/issues/190#issuecomment-469754219_

no-issue-activity

Most helpful comment

This will be a major refactor which will require a lot of attention and will break everything that others are working on. I would want to this after GSSoC is over and after GSoC selections are over. Maybe those who are working during the GSoC period can implement these changes.

All 9 comments

This will be great! We can use React to declare the entire UI as various components. The life cycles methods will make it easier to define the routines that will be running the circuit. Then we can also explore the option of moving away from the current monolith repo to two separate repos, one for react front end and one for rails backend.

This is a great idea! I can get started with it.
Just for the purpose of knowing that I am on the right path, I will first start with the refactoring of modules.js Based on the reviews I get, I will continue further.

@fpintos Can I take up this issue?

This will be a major refactor which will require a lot of attention and will break everything that others are working on. I would want to this after GSSoC is over and after GSoC selections are over. Maybe those who are working during the GSoC period can implement these changes.

This will be great! We can use React to declare the entire UI as various components. The life cycles methods will make it easier to define the routines that will be running the circuit. Then we can also explore the option of moving away from the current monolith repo to two separate repos, one for react front end and one for rails backend.

I don't think there will be any major changes in the core circuit logic. I think the canvas is best handled by regular javascript and not react. Yes, all the UI elements will move to react and all the bugs with respect to the property menu can be fixed.

https://github.com/rails/webpacker is the best way to accomplish this within rails app

This library abstracts canvas implementations as react components. I think it's a good idea to use this for the React refactor.
https://github.com/Flipboard/react-canvas

No activity on this issue for a prolonged duration, will be closed if no further activities in next 7 days

Part of refactoring task

No activity on this issue for a prolonged duration, will be closed if no further activities in next 7 days

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Ananthavijay picture Ananthavijay  路  5Comments

ryuk156 picture ryuk156  路  9Comments

sal2701 picture sal2701  路  9Comments

satu0king picture satu0king  路  5Comments

satu0king picture satu0king  路  5Comments