Skip to content
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

Draft
wants to merge 30 commits into
base: main
Choose a base branch
from
Draft

Refactoring Suggestion #1582

wants to merge 30 commits into from

Conversation

SvMak
Copy link

@SvMak SvMak commented Nov 16, 2024

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.

  • Used normal font weight, as using thin font is not a good practice, it is hard to read;
  • Moved page sections into separate components;
  • Minor UI/UX improvements;
  • Added prettier plugins to improve code formatting.

@SvMak SvMak marked this pull request as draft November 16, 2024 20:31
@SvMak SvMak marked this pull request as ready for review November 16, 2024 22:02
@thilobillerbeck
Copy link
Collaborator

This definitely contains some good changes overall, I hope I can spare some time soon to review this

@thilobillerbeck
Copy link
Collaborator

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

Copy link
Contributor

@crertel crertel left a 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.)

@SvMak
Copy link
Author

SvMak commented Nov 20, 2024

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

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.

@SvMak
Copy link
Author

SvMak commented Nov 21, 2024

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.

@thilobillerbeck
Copy link
Collaborator

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. :)

@crertel
Copy link
Contributor

crertel commented Nov 21, 2024

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.

@SvMak
Copy link
Author

SvMak commented Nov 21, 2024

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.

@SvMak SvMak marked this pull request as draft November 21, 2024 03:43
@crertel
Copy link
Contributor

crertel commented Nov 21, 2024

For this project at this stage, I completely agree with you, so additional argumentation is unnecessary.

Sorry, sorry--was just trying to explain my position for posterity! No harm intended.

Thank you very much for your contributions!

@SvMak
Copy link
Author

SvMak commented Nov 21, 2024

For this project at this stage, I completely agree with you, so additional argumentation is unnecessary.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants