-
-
Notifications
You must be signed in to change notification settings - Fork 321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactoring Suggestion #1582
base: main
Are you sure you want to change the base?
Refactoring Suggestion #1582
Conversation
This definitely contains some good changes overall, I hope I can spare some time soon to review this |
It'd be great btw. to split those changes into smaller PRs since this PR now breaks with every subtle change made due to it touching a lot of moving parts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that, as other folks pointed out, smaller refactors here would help--and let's break out the easy-to-go-with stuff first.
A couple of relatively low-hanging fruit that would be good to extract out first:
- The additional prettier plugins
- Maybe the
tsconfig.json
tweaks - The
Link
util component
I'm not really a fan of the refactors to chop up the pages into smaller components; for what it's worth, when I started working on this not long ago I found it to be incredibly helpful to be able to copy over a single file and tweak it--I don't believe there's much extra utility, for example, in breaking up a single document like the values page or what have you into lots of single-use components.
(And of course, thank you for taking the time to try out an idea! There's some good changes in there that definitely are just sound housekeeping and we should try to adopt.)
I would be happy to get some feedback to understand your vision for the project as a whole. We can use this PR as a set of changes, you can choose the ones you would like to see in the main branch and I'll make new PR/PR's. |
Of course, the component approach is not necessary to use, it is useful for simplifying work with large pages and implementing/replacing sections on the page. I can make a separate PR with changes without splitting the pages into components or even more granular changes. Let me know what would be preferable. |
I guess granular changes would be perfect, because they are easier to review and do not conflict with other changes as much as larger ones. :) |
My biggest argument against the component approach, based on the various React and LiveView apps I've maintained, is that if the components are not reusable (contrast the proposed subdivision of the values page for example with the proposed link utility) then it only adds another level of indirection. At some point, especially for this, each page really is mostly just a document, and breaking it into smaller pieces obscures that fact. Being able to trivially add a new page by copying an existing one and editing it to-taste in basically one spot I found tremendously helpful as a new contributor. |
Sorry, but I'm not trying to 'sell' you a component approach to pages)) I'm here to improve the code base and solve issues. I have developed and supported dozens of projects written in various languages and frameworks, and for me any approach is a compromise. For this project at this stage, I completely agree with you, so additional argumentation is unnecessary. I hope to be able to make several PR based on the approved improvements in the near future. |
Sorry, sorry--was just trying to explain my position for posterity! No harm intended. Thank you very much for your contributions! |
I respect your position. |
Attention! This is just my vision of what this project could look like. These are not final improvements, but a stage along the way.
The goal is to improve the code base to further resolve existing issues and trying to make the UI more consistent.