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

docs(type): Provides an initial documentation document for the Type component #462

Merged
merged 1 commit into from
Apr 17, 2024

Conversation

veewee
Copy link
Collaborator

@veewee veewee commented Apr 5, 2024

The README is based on the structure in php-standard-library/php-standard-library.github.io so that it can be displayed on the website. We concluded to add documentation in this repo, so I am providing it here already.

Currently it's an initial draft aiming on explaining what the component can be used for.
It now covers:

  • Introduction
  • Converted type
  • Shape type

I am focussing on providing very detailed types and ideas on how to use them so that we maybe don't need to explain every single type in this package. (like int, float, ...)

@veewee veewee added Priority: Medium This issue may be useful, and needs some attention. Status: In Progress This issue is being worked on, and has someone assigned. Type: Documentation Updating documentation labels Apr 5, 2024
@veewee veewee added this to the 3.0.0 milestone Apr 5, 2024
@veewee veewee marked this pull request as draft April 5, 2024 13:44
@azjezz
Copy link
Owner

azjezz commented Apr 5, 2024

great start! could you remove this from docs/documentor.php and add it in the readme template like the other ones: https://github.com/azjezz/psl/blob/next/docs/templates/README.template.md#components ? thanks!

@coveralls
Copy link

coveralls commented Apr 5, 2024

Pull Request Test Coverage Report for Build 8716607211

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 98.781%

Totals Coverage Status
Change from base Build 8709891691: 0.0%
Covered Lines: 4377
Relevant Lines: 4431

💛 - Coveralls

@azjezz
Copy link
Owner

azjezz commented Apr 5, 2024

The README is based on the structure in php-standard-library/php-standard-library.github.io so that it can be displayed on the website.

Not sure if we want to keep the same format, as people would most likely read this on GitHub and locally, so maybe we can come up with a better format/style for documentation?

@veewee
Copy link
Collaborator Author

veewee commented Apr 5, 2024

Not sure if we want to keep the same format, as people would most likely read this on GitHub and locally, so maybe we can come up with a better format/style for documentation?

I can base it on the format in https://github.com/azjezz/psl/blob/next/src/Psl/Async/README.md ?

@veewee veewee force-pushed the types-docs branch 6 times, most recently from 2e1d3cb to 67533ec Compare April 5, 2024 14:28
@azjezz
Copy link
Owner

azjezz commented Apr 5, 2024

maybe? i don't know really. up to you :D

@veewee veewee force-pushed the types-docs branch 7 times, most recently from 739c499 to a543534 Compare April 9, 2024 14:05
@veewee
Copy link
Collaborator Author

veewee commented Apr 9, 2024

maybe? i don't know really. up to you :D

@azjezz

What do you think about current structure?
It's how I do it on my projects and it has some advantages:

  • No usage of lists, making it easier to maintain
  • Function names (and classes, ...) are level 4 headers that make it possible to link directly to that section of the page.
  • These titles can be used as anchors to the code so that you can easily look at it yourself
  • Separation is done with a --- gives you a clear indication where docs for that function stop.
  • It's pretty standard, making it relatively easy to style in the docs website;

I'm also trying to give it a consistent structure:

  • title
  • type information (somewhat using @ as a replacement for dockblocks to make it shorter)
  • What does assert / coerce act like
  • Optional example (if its worth adding)

I tried visualizing this in the documentation website, but can't seem to find a way to visualize it locally. What are you using to display it before pushing it to github?

@veewee veewee force-pushed the types-docs branch 4 times, most recently from 6f1a203 to b6f95eb Compare April 12, 2024 09:05
@veewee veewee force-pushed the types-docs branch 5 times, most recently from c442732 to 0e82b30 Compare April 15, 2024 06:50
@veewee veewee changed the title [WIP] docs(type): Provides an initial documentation document for the Type component docs(type): Provides an initial documentation document for the Type component Apr 15, 2024
@veewee veewee marked this pull request as ready for review April 15, 2024 06:57
@veewee veewee requested a review from azjezz April 15, 2024 06:57
Copy link
Owner

@azjezz azjezz left a comment

Choose a reason for hiding this comment

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

This looks good overall.

I am still not sure about the format, but, we can keep it as is for now, and if we later decide on a different format, we can change it ( along with the other documentation files ).

src/Psl/Type/README.md Outdated Show resolved Hide resolved
src/Psl/Type/README.md Outdated Show resolved Hide resolved
src/Psl/Type/README.md Outdated Show resolved Hide resolved
src/Psl/Type/README.md Outdated Show resolved Hide resolved
@veewee
Copy link
Collaborator Author

veewee commented Apr 17, 2024

I am still not sure about the format,...

Let me know if there is something specific you don't like, I can always change the format..

@veewee veewee requested a review from azjezz April 17, 2024 05:08
@azjezz azjezz merged commit 9762298 into azjezz:next Apr 17, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Medium This issue may be useful, and needs some attention. Status: In Progress This issue is being worked on, and has someone assigned. Type: Documentation Updating documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants