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

fix(docs): Fix docs generation for method return values #3064

Merged
merged 5 commits into from
Oct 1, 2021

Conversation

tricki
Copy link
Contributor

@tricki tricki commented Sep 16, 2021

The @returns tags were ignored and instead @return was used, but the tag object wasn't properly converted to a string resulting in the output [object Object].

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Build (npm run build) was run locally and any changes were pushed
  • Unit tests (npm test) were run locally and passed
  • E2E Tests (npm run test.karma.prod) were run locally and passed
  • Prettier (npm run prettier) was run locally and passed

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

@returns was ignored and @return wasn't serialized, rendering it unusable.

GitHub Issue Number: N/A

What is the new behavior?

@returns is properly output.

Does this introduce a breaking change?

  • Yes
  • No

Technically, you could say it's a breaking change but from a buggy state so it's very unlikely anyone has used @return before.

Testing

Other information

Before:
image

After:
image

The `@returns` tags were ignored and instead `@return` was used, but the tag object wasn't properly converted to a string resulting in the output `[object Object]`.
@tricki tricki requested a review from a team September 16, 2021 13:28
@splitinfinities splitinfinities added the Resolution: Refine This PR is marked for Jira refinement. We're not working on it - we're talking it through. label Sep 16, 2021
@tricki tricki changed the title fix(docs): Fix method return docs. fix(docs): Fix docs generation for method return values Sep 17, 2021
Copy link
Member

@rwaskiewicz rwaskiewicz left a comment

Choose a reason for hiding this comment

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

Thanks @tricki! I took your PR for a spin, and things are looking good. I had one small ask regarding backwards compatibility. Let me know what you think!

src/compiler/docs/generate-doc-data.ts Outdated Show resolved Hide resolved
@rwaskiewicz rwaskiewicz added the Awaiting Reply This PR or Issue needs a reply from the original reporter. label Sep 29, 2021
tricki and others added 2 commits October 1, 2021 16:16
Co-authored-by: Ryan Waskiewicz <ryanwaskiewicz@gmail.com>
Copy link
Member

@rwaskiewicz rwaskiewicz left a comment

Choose a reason for hiding this comment

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

Note to future me/team/community members. This is technically a breaking change to the output, but is simultaneously a nice bug fix for doc generation. Since the output was previously unusable (it output [Object object]), I am erring on the side of this being added to the next minor release of Stencil

@rwaskiewicz rwaskiewicz merged commit dc2f6fb into ionic-team:master Oct 1, 2021
@tricki tricki deleted the patch-4 branch October 1, 2021 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Reply This PR or Issue needs a reply from the original reporter. Resolution: Refine This PR is marked for Jira refinement. We're not working on it - we're talking it through.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants