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

Write down docs styleguide #726

Closed
martriay opened this issue Sep 11, 2023 · 16 comments
Closed

Write down docs styleguide #726

martriay opened this issue Sep 11, 2023 · 16 comments

Comments

@martriay
Copy link
Contributor

No description provided.

@martriay
Copy link
Contributor Author

  • avoid talking about "us", or the writer as much as possible
  • don’t capitalize Account unless it’s a specific contract/impl

@martriay martriay mentioned this issue Sep 12, 2023
3 tasks
@ericnordelo
Copy link
Member

  • Don't include argument types in the header sections for Utilities, Functions, and Events, in the API Reference.

@andrew-fleming
Copy link
Collaborator

  • Write the casing name in the casing style e.g. camelCase, snake_case, PascalCase, etc

@andrew-fleming
Copy link
Collaborator

  • Write all non-H1 headings in sentence case (only capitalize the first word and proper nouns)

    • For the record, I disagree with this approach. I instead vote for title case in all doc headings because:
      1. Titles of sections are, well, titles and titles should be capitalized IMO.
      2. Consistency with OZ Solidity docs.

@martriay
Copy link
Contributor Author

martriay commented Sep 14, 2023

Use "panics" instead of "reverts" or "throws" since it's the appropriate term in Starknet.

@martriay
Copy link
Contributor Author

Add / at the end of directory names to highlight it's a directory. e.g.: my_folder/ instead of my_folder

@ericnordelo
Copy link
Member

Always scope IDs by the module name in API Reference. Under the ERC20 module section, the name() function should have the ID: ERC20-name

@ericnordelo
Copy link
Member

Words in html IDs (adoc pages) must be separated by dashes: ERC20-name instead of ERC20::name

@martriay
Copy link
Contributor Author

martriay commented Sep 15, 2023

Write all non-H1 headings in sentence case (only capitalize the first word and proper nouns)

  • For the record, I disagree with this approach. I instead vote for title case in all doc headings because:

    1. Titles of sections are, well, titles and titles should be capitalized IMO.
    2. Consistency with OZ Solidity docs.

where does this rule come from, if you disagree with it?

Always scope IDs by the module name in API Reference. Under the ERC20 module section, the name() function should have the ID: ERC20-name

what do you mean by scope IDs? is this an ascii doc thing?

@andrew-fleming
Copy link
Collaborator

Write all non-H1 headings in sentence case (only capitalize the first word and proper nouns)

  • For the record, I disagree with this approach. I instead vote for title case in all doc headings because:
  • Titles of sections are, well, titles and titles should be capitalized IMO.
  • Consistency with OZ Solidity docs.

where does this rule come from, if you disagree with it?

It's just how the old and forthcoming docs are currently written. There's no rule that I'm aware of

@ericnordelo
Copy link
Member

what do you mean by scope IDs? is this an ascii doc thing?

The ID of the HTML section generated from the adoc file, should be scoped by the module name: have this #Account-supports_interface, instead of just #supports_interface.

[.contract-item]
[[Account-supports_interface]]
...

@ericnordelo
Copy link
Member

ericnordelo commented Sep 18, 2023

Put SRC5 ID block as a section (similar to Functions and Events) on top at the Interfaces where the ID is usually exposed.

@martriay
Copy link
Contributor Author

@martriay
Copy link
Contributor Author

Opened the "Consider documenting asserts/guards" discussion separately in its own thread: #745

@martriay martriay moved this to 📋 Backlog in Contracts for Cairo Oct 18, 2023
@martriay martriay mentioned this issue Nov 10, 2023
3 tasks
@martriay martriay added this to the later milestone Nov 24, 2023
@martriay martriay modified the milestones: later, after Dec 10, 2023
@martriay martriay modified the milestones: after, next Jan 26, 2024
@martriay martriay mentioned this issue Mar 1, 2024
@martriay
Copy link
Contributor Author

martriay commented Mar 1, 2024

to do: decide what to do regarding duplicating function definitions between interface, component, and function definitions in API docs: see discussions #1, #2, and #3

@martriay martriay modified the milestones: next, current, after Mar 4, 2024
@martriay martriay modified the milestones: 2. after, 3. later, 4 Mar 21, 2024
@andrew-fleming andrew-fleming modified the milestones: 4. later, 3. after Apr 30, 2024
@andrew-fleming andrew-fleming modified the milestones: 2. next, 1. current Jun 15, 2024
@andrew-fleming
Copy link
Collaborator

Closing this issue as this is done internally.

@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Resolved in Contracts for Cairo Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants