Open ChadBailey opened 2 years ago
@igrigorik hope you don't mind me taking the initiative on this. If you have any concerns let me know and I can take it down until we work through them. I figured with how busy everyone is better to ask for forgiveness than permission.
Since this has a long time horizon, I'm hosting this refactoring effort here: https://github.com/ChadBailey/videospeed-refactoring
At the time of writing this, it's a 1:1 mirror of the master branch here. Feel free to get involved with reporting bugs/submitting PRs etc.
Hopefully this can go relatively fast, I created the new repo so that I can package changes up into single larger PR's here while maintaining the ability to blow away my changes and reset if needed since I am still learning the JS build tools and anticipate making some mistakes. Any changes that happen meanwhile I will manually pull into the refactoring repo. I'll archive it when we've reached a point of stability on the build toolchain
0.8.1 has been released, all initial goals have been accomplished and then some! Check it out #964
Keeping this open in the event anyone would like to comment, but feel free to respond to the new issue. I will close this once the refactoring effort is fully concluded.
Just want to comment that I also heavily refactored the code base for my fork and you might want to look at getting some of the improvements I added here too.
I will probably check some of the changes you make and see if I care about them. However, most of the stuff you're describing doesn't sound like it aligns with my goals (more/better functionality, less code) although some of it could be useful, for the most part it probably means the codebases will split completely.
The specific functionality I added was:
Nice things I did to achieve this:
You already have all the code for how I achieved this, so I don't know what more I can say. I will go check out #964 now
If you want to make the extension work with other browsers, just check out the diff from here to the firefox port by codebycicle. https://github.com/codebicycle/videospeed
As I recall, the differences were very minor and the firefox version compiles to chromium. My version, for example, also compiles to chromium.
Before you jump to conclusions about what I'm doing, I'd encourage you to take a look at the commit history here https://github.com/chadbailey/videospeed-refactoring and see what I've actually done so far. I think you'll see that our goals are aligned in that I'm trying to improve the architecture and make it easier to work on. Many times, that also means less code - just another way to frame solving the same problem.
@igrigorik Can I have you take a cursory look at this and see if you agree with the direction?
If yes, I will get a pull request prepared and open it so we can go over the details. I don't want to invest the effort into getting it into a PR until the direction is agreed upon.
@ChadBailey, apologies. My GitHub notifications are a broken mess. If you're not hearing back, nudge me over email.
Doing a quick scan over the repo, I like what you've done and would love to see it merged 👍 I'll reserve the specific questions for later (e.g. I see we're adding a bunch of imports, but are those actually necessary/used—Tailwind?), once we have a PR to review.
Could you stage a PR for us to iterate on? I understand that it'll be a monster, but there isn't a simple way to piecemeal this.
Thanks for the input on the direction @igrigorik !
No worries on the notifications - I have fallen into the same pit myself lol. Feel free to ping me via email as well if needed.
Regarding the imports, it's been a bit since I've last looked closely but best of memory some of that was experimental while I tested various things out and probably got left in.
I'll do my best to get all of that cleaned up before the PR. That's part of why I wanted some input before opening the PR because while it's not a ton of work to get it "pull ready", it's definitely not no work.
Ironically I just walked in the door of my temporary housing arrangement in Seattle so I'll get that done and open the PR once I get more settled in. I'm hoping to repair the reputation I've earned of leaving you hanging so I will try to be quick about it this time around lol. I'll use email if you don't see the PR.
You can track my progress by looking at the issues and git repo of the refactoring project (it will be archived once merged)
Quick update... I plan to take make some progress on this by this weekend (2/26).
@ChadBailey could we get this over the finish line? Been using your branch for a while, looks stable — let's get it merged?
Video Speed Controller Refactoring
Call to action
Please read as much or as little of this as you like then reply with your honest feedback and recommendations.
You may view the refactoring progress here: https://github.com/ChadBailey/videospeed-refactoring - please feel free to open your ideas up as new issues on this project.
Intro
This is being posted as an issue for visibility purposes.
This is an invitation to be involved in the dialog around refactoring. I want to make decisions on if we should do it at all, to what depth, how to execute on it logistically, what tooling to target, and what benefits/value we expect or are targeting with the effort, etc.
This is the initial plan, which will evolve based on your feedback. Once we feel the plan is good enough to be 1.0 I'll enter the next phase of execution based on that plan. Any changes from that point will need to be pushed into the next phase.
Rationale
Sometimes when refactoring is being proposed, people will jump to the defense of the software as if the person doing the proposal is saying the software sucks. They have the right to be concerned as they may have spent a lot of effort to learn the code base as is, and in some cases grown fond of it along with its flaws.
For that reason, I think it's important to point out this is all a positive thing. VSC has grown leaps and bounds over the years, and so too has its need for a quality code base. This quality code base I'm referring to is what empowers users to get in, make a change, and send it through to the end users with minimal fuss and protection against regressions. The easier VSC is to contribute to, the more growth we can expect as a result.
Background/Extra Context
Probably like most of you, I decided to get involved with VSC because I greatly appreciate the value it brings to my life. Originally, my plan was to offer up my professional experience to VSC as I perform an unusual role - I am a Software Quality Lead (depending on who you ask, maybe I'm a Test Architect, or I'm "the test guy"). Unfortunately, that never happened because I had to take an unexpected extended break from VSC for personal reasons.
My time away has finally come to a close and I'm able to refocus on this effort. It probably works out for the better in the end because I am better equipped to take it on now.
Refactoring Execution Plan
1.0 Goals:
1.1 Goals:
1.2 Goals:
Long-Term Aspirations:
Long-Term Tech Stack Goals: