Skip to content

Contributing and Debugging/PR-Guidelines.md : Added guidelines for documentation and comments.#1279

Open
TheKnightSky wants to merge 2 commits intohyprwm:mainfrom
TheKnightSky:main
Open

Contributing and Debugging/PR-Guidelines.md : Added guidelines for documentation and comments.#1279
TheKnightSky wants to merge 2 commits intohyprwm:mainfrom
TheKnightSky:main

Conversation

@TheKnightSky
Copy link

There was no documentation about documentation and comments, I added them.

@fufexan fufexan requested a review from vaxerski November 14, 2025 09:19

Most users expect the documentation to be under README.md or CONTRIBUTING.md.
A large number of issues created on Hypr projects are because of not reading the documentation.
It is better to include a line in every README.md, declaring that [wiki.hypr.land](https://wiki.hypr.land/) is the official documentation for all Hypr projects, and to read the documentation before making an issue.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this refer to?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this refer to?

Take the example of hyprlauncher, the about section of the repo has linked to the wiki page specific to hyprlauncher, whereas repos like hyprutils, xdph, hyprpicker etc, which do have wiki specific pages, don't have it linked in the about page, neither in the readme.md.

People viewing a specific project without knowing about the hypr ecosystem, would have no idea that the wiki exists. This lead to some, including me, either getting confused or creating issues.

I would say that in the about page we could provide the link to the specific part of the repo to the wiki and in the readme.md, we generally could say wiki.hypr.land is the official documentation site.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's always a link tho?
image

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Take the example of hyprlauncher, the about section of the repo has linked to the wiki page specific to hyprlauncher, whereas repos like hyprutils, xdph, hyprpicker etc, which do have wiki specific pages, don't have it linked in the about page, neither in the readme.md.

No. I said hyprlauncher does have it. But repos like hyprutils, xdph, hyprpicker don't have it. Please check them out. Sorry was away for a few days.


It is best practice to include comments for code.
Good documentation and comments is as important as good code.
You can still contribute to the development of open source projects even without development skills, by helping out with documentations and non-technical work.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too positive of comments. I, for once, disagree. I believe your code should be as clean as possible, and comments should only be used when it's necessary for code to not be self-descriptive

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand your view, looking at clean optimized code without codes is indeed pleasing. But comments are necessary for any relevant information as well, not just specific to the code.

comments should only be used when it's necessary for code to not be self-descriptive

Fair enough,Explain what the code does, rather than how it does it; avoid explaining how, unless the logic is non-obviousseems a bit much then. I would change it to something along the lines of "Use comments to describe or explain the code when its not self-descriptive" and remove stuff like "Prefer adding comments to functions and classes" and tone down/remove the relevant examples.

I do still stand on the following:

- Comments are for _others_ to understand code, not as logs for what has been done to the code
 - Clarify why certain decisions were made for the code, if it is relevant on a technical standpoint
 - Use terms like NOTE or TODO, to communicate current limitations and/or future plans.
 - Follow the style of existing comments

I'll make the edits once you let me know.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would change it to something along the lines of "Use comments to describe or explain the code when its not self-descriptive" and remove stuff like "Prefer adding comments to functions and classes" and tone down/remove the relevant examples.

yup thats ok

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.

2 participants