material-extensions / material-icons-browser-extension

Browser Addon that enhances file browsers of version controls with material icons.
MIT License
524 stars 39 forks source link

How do you feel to convert to OOP #105

Closed mikeydevelops closed 2 months ago

mikeydevelops commented 2 months ago

Hey, I had the genius idea to convert the code to OOP. I have began refactoring on my fork but I vastly underestimated the amount of work needed. At first I thought it will be easy I will be done in like a day, it will take me much more time than that. So in the spirit of me not wasting my time to refactor and it being rejected, I thought to cut my losses and ask if you would entertain OOP. Currently the code is spaghetti, it is typed but I don't know, I don't feel it. Do you think it will be easier to maintain it if it is OOP? Should I continue or just give up?

PKief commented 2 months ago

Yes, that sounds like a lot of effort. In my opinion, it is very opinionated. You can produce spaghetti code with functional code as well as with OOP, one does not exclude the other. And since it would be a big effort to convert everything to OOP, I would rather leave it as it is. Are there a few places that we can improve so that it no longer looks like spaghetti code, but still corresponds to functional code?

mikeydevelops commented 2 months ago

Okay! I'm glad I asked before I was in too deep.

csandman commented 1 month ago

Wow, I didn't even realize the codebase was migrated to TypeScript, love to see it @PKief! Sorry I haven't been able to help out more with this transition, I've been absolutely slammed with work for the past couple weeks. But the TypeScript conversion is actually something I had been planning to propose anyway, so I'm glad you pushed that through! After working with TypeScript for a while it's hard to jump back into vanilla JS haha.