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

Structural changes to the DocCDocumentation Catalog #742

Merged

Conversation

sofiaromorales
Copy link
Contributor

@sofiaromorales sofiaromorales commented Oct 18, 2023

Bug/issue #, if applicable: rdar://109449796

Summary

This PR introduces a series of changes to the DocC documentation catalog that aim to bring about a better and easier-to-read structure.

Some of these changes include:

  • Added a new section Documentation Content.
  • Arranged content from Formatting Your Documentation Content into Formatting Your Documentation Content Other Formatting Options Adding Images to Your Content and Link to Symbols and Other Content.
  • Added minor comments about conceptual documentation.
  • Capitalized third-level titles.
  • Minor changes to titles and summaries around the catalog content.
  • Updated the year in the files footers.

Dependencies

N/A

Testing

Steps:

  1. Run docc preview DocCDocumentation.docc
  2. Compare the preview with the content available at https://www.swift.org/documentation/docc.

Related file:
DocCDocumentation.doccarchive.zip

Checklist

Make sure you check off the following items. If they cannot be completed, provide a reason.

  • Added tests (N/A)
  • Ran the ./bin/test script and it succeeded
  • Updated documentation if necessary (N/A)

- Added a new section `Documentation Content`.
- Arranged content from `Formatting Your Documentation Content`into `Formatting Your Documentation Content``Other Formatting Options` `Adding Images to Your Content` and `Link to Symbols and Other Content`.
- Added minor comments about conceptual documentation.
- Capitalized third-level titles.
- Minor changes to titles and summaries around the catalog content.
- Updated the year in the files footers.
sofiaromorales added a commit to sofiaromorales/swift-docc that referenced this pull request Oct 19, 2023
- Implemented a fix to assign the correct role for Technology Root articles that are part of single-article-only catalogs or article-only catalogs without any manual curation at the top-level article.
- Implemented unit tests to validate the correct assignment of roles for this type of case.
- Resolved rdar://117019142 rdar://116419389
- Added `Conceptual Documentation` to the documentation types section.
Copy link
Contributor

@patshaughnessy patshaughnessy left a comment

Choose a reason for hiding this comment

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

Looks good Sofia - thanks for reorganizing and updating these pages. I have a couple thoughts and suggestions.

@@ -1,10 +1,10 @@
# API Documentation
# API and Conceptual Documentation
Copy link
Contributor

Choose a reason for hiding this comment

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

Reading this edit, I wonder if we should have two separate pages, one for API Documentation and one for Conceptual Documentation? Certainly we want to explain and encourage developers to write articles and add them to their API Documentation. So your edits here look good.

What I mean is maybe we need a new page pointing out that developers can write a series of articles which are neither API Documentation nor a tutorial. A series of standalone markdown articles. In this case if you add a new page for that, then you could just keep the original API Documentation title here and avoid the longer title.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That was my original idea, but the content would be pretty much the same since the directives that apply to 'API Documentation' are the same as those that can be used for 'Conceptual Documentation,' so it would be like repeating the same curation for both pages.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with @patshaughnessy. Primarily, Swift-DocC provides a means for people to create API reference documentation from in-source comments. As an added feature, Swift-DocC provides a means for you to author additional, supporting content, such as articles, tutorials, etc. Not all of the supporting content is "conceptual," so I feel like that's a bit of a misnomer. When I think of "conceptual" content, I think of theory and background information, and the documentation you can produce with Swift-DocC can be much more than theory.

Recommend retitling this page.

Copy link
Contributor Author

@sofiaromorales sofiaromorales Oct 27, 2023

Choose a reason for hiding this comment

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

@chuckdude What do you think about 'API and Custom Documentation`? any other title suggestion?

The idea here is to highlight that DocC can be used not only for API reference but also as a standalone tool for authoring and creating content, similar to TSPL, for example.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What I mean is maybe we need a new page pointing out that developers can write a series of articles which are neither API Documentation nor a tutorial.

I'm concerned that adding 'Conceptual Documentation' as a new documentation type may be too much of a change. Any thoughts, @patshaughnessy @krilnon @chuckdude?

Copy link
Contributor

Choose a reason for hiding this comment

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

I still concur with @patshaughnessy's original comment that there should be two separate pages or articles to address content. On one hand, you have API reference material that's a doctype of its own. Next, you have the ability to write articles or tutorials. When it comes to articles, those can be task-based, conceptual, or a combination of both, depending on what you need to support people who will use your framework.

So, the three document types are:

  • API reference
  • Articles
  • Tutorials

The page on Articles should address that they can be purely conceptual, strictly task-based, or a combination of the two. The purpose of an article is to teach developers how to use the API, or to show how to do something (task-based) in a practical sense.

I don't think we should try to wedge API reference and Articles (or Tutorials) into the same article.

@krilnon
Copy link
Contributor

krilnon commented Oct 23, 2023

Mirroring my comments from the docs workgroup meeting:

  • I think our current guidance is to use sentence case for article titles and headings. A fair amount of the DocC docs predate that guidance, though, so I can see how you're going for consistency first.
  • Most articles should start with gerunds, so the 'Link to symbols' title should be 'Linking to symbols', etc.

- Changed 'Link' to 'Linking' to use preferred gerund form
Copy link
Contributor

@chuckdude chuckdude left a comment

Choose a reason for hiding this comment

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

Provided edits and comments throughout. Please let me know if you have any questions, or would like to discuss the edits and suggestions.

Sources/docc/DocCDocumentation.docc/DocC Documentation.md Outdated Show resolved Hide resolved
@@ -1,10 +1,10 @@
# API Documentation
# API and Conceptual Documentation
Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with @patshaughnessy. Primarily, Swift-DocC provides a means for people to create API reference documentation from in-source comments. As an added feature, Swift-DocC provides a means for you to author additional, supporting content, such as articles, tutorials, etc. Not all of the supporting content is "conceptual," so I feel like that's a bit of a misnomer. When I think of "conceptual" content, I think of theory and background information, and the documentation you can produce with Swift-DocC can be much more than theory.

Recommend retitling this page.


## Overview

Use documentation markup, a custom variant of Markdown, to add in-source documentation to your APIs. Then, use DocC to build your documentation and share it with developers.
Use documentation markup, a custom variant of Markdown, to add in-source documentation to your APIs and author conceptual documentation articles. Then, use DocC to build your documentation and share it with developers.
Copy link
Contributor

Choose a reason for hiding this comment

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

Again, this isn't just about authoring conceptual articles. Recommend going with something like:

...to add in-source documentation for your API, and provide supporting learning materials — such as articles and tutorials — to help people learn more about your API.

@sofiaromorales
Copy link
Contributor Author

Thanks for the review, @chuckdude! I've addressed most of the comments. Do you think the requested Copyright change is a blocker for this PR?

Copy link
Contributor

@chuckdude chuckdude left a comment

Choose a reason for hiding this comment

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

Please see my notes, throughout, including:

  • "All rights reserved." capitalization in the page footers
  • Comment on the title and content for the article, "API and Conceptual Documentation"

@@ -1,10 +1,10 @@
# API Documentation
# API and Conceptual Documentation
Copy link
Contributor

Choose a reason for hiding this comment

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

I still concur with @patshaughnessy's original comment that there should be two separate pages or articles to address content. On one hand, you have API reference material that's a doctype of its own. Next, you have the ability to write articles or tutorials. When it comes to articles, those can be task-based, conceptual, or a combination of both, depending on what you need to support people who will use your framework.

So, the three document types are:

  • API reference
  • Articles
  • Tutorials

The page on Articles should address that they can be purely conceptual, strictly task-based, or a combination of the two. The purpose of an article is to teach developers how to use the API, or to show how to do something (task-based) in a practical sense.

I don't think we should try to wedge API reference and Articles (or Tutorials) into the same article.

Sources/docc/DocCDocumentation.docc/adding-images.md Outdated Show resolved Hide resolved
@franklinsch
Copy link
Contributor

franklinsch commented Nov 7, 2023

@chuckdude Thanks for your review! Regarding the "All rights reserved" capitalization—I just wanted to chime in to clarify that the copyright footer in which it appears doesn't appear in the produced documentation, it's only used for copyright purposes in the original Markdown source. It follows the template used across open-source Swift repositories in the Swift organization (e.g., https://github.com/apple/swift/blob/main/CODE_OF_CONDUCT.md?plain=1#L5). Changing that template would be a broader discussion.

@sofiaromorales sofiaromorales changed the title Content changes to the DocCDocumentation Catalog Structural changes to the DocCDocumentation Catalog Nov 27, 2023
Copy link
Contributor

@chuckdude chuckdude left a comment

Choose a reason for hiding this comment

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

Approved. Thank you for making these changes, Sofia. :)

@sofiaromorales
Copy link
Contributor Author

@swift-ci please test

@sofiaromorales
Copy link
Contributor Author

@swift-ci please test

@sofiaromorales sofiaromorales merged commit 2084946 into swiftlang:main Nov 28, 2023
2 checks passed
sofiaromorales added a commit to sofiaromorales/swift-docc that referenced this pull request Nov 28, 2023
 Made content changes to the DocCDocumentation Catalog.

- Added a new section `Documentation Content`.
- Arranged content from `Formatting Your Documentation Content`into `Formatting Your Documentation Content``Other Formatting Options` `Adding Images to Your Content` and `Link to Symbols and Other Content`.
- Added minor comments about conceptual documentation.
- Capitalized third-level titles.
- Minor changes to titles and summaries around the catalog content.
- Updated the year in the files footers.
- Changed 'Link' to 'Linking' to use preferred gerund form
- Supported image extensions added.
- Added documentation about support of hex and html codes.

---------

Co-authored-by: Chuck Toporek <76215+chuckdude@users.noreply.github.com>
sofiaromorales added a commit that referenced this pull request Nov 30, 2023
Made content changes to the DocCDocumentation Catalog.

rdar://117262993

- Added a new section `Documentation Content`.
- Arranged content from `Formatting Your Documentation Content`into `Formatting Your Documentation Content``Other Formatting Options` `Adding Images to Your Content` and `Link to Symbols and Other Content`.
- Added minor comments about conceptual documentation.
- Capitalized third-level titles.
- Minor changes to titles and summaries around the catalog content.
- Updated the year in the files footers.
- Changed 'Link' to 'Linking' to use preferred gerund form
- Supported image extensions added.
- Added documentation about support of hex and html codes.

---------

Co-authored-by: Chuck Toporek <76215+chuckdude@users.noreply.github.com>
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.

None yet

6 participants