Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Conversation

@sethetter
Copy link
Contributor

Description

This PR adds links to the JSON version of API doc pages by mirroring the EditLink component visually and using the title and version to build a link to the JSON docs hosted on nodejs.org.

Related Issues

#2894

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run npm run lint:js -- --fix and/or npm run lint:md -- --fix for my JavaScript and/or Markdown changes.
    • This is important as most of the cases your code changes might not be correctly linted
  • I have run npm run test to check if all tests are passing, and/or npm run test -- -u to update snapshots if I created and/or updated React Components.
  • I have checked that the build works locally and that npm run build work fine.
  • I've covered new added functionality with unit tests if necessary.

@sethetter sethetter changed the title JSON doc links feat(api): add link to json docs Oct 11, 2022
@sethetter sethetter force-pushed the 2894-json-docs-link branch from cb2a525 to a733ef7 Compare October 11, 2022 03:08
@sethetter sethetter force-pushed the 2894-json-docs-link branch from a733ef7 to d3fb740 Compare October 11, 2022 03:11
@ovflowd ovflowd added the create-preview Generate preview on staging.nodejs.dev label Oct 11, 2022
@github-actions github-actions bot removed the create-preview Generate preview on staging.nodejs.dev label Oct 11, 2022
@ovflowd ovflowd added the create-preview Generate preview on staging.nodejs.dev label Oct 11, 2022
@ovflowd ovflowd temporarily deployed to firebase-staging October 11, 2022 10:16 Inactive
@github-actions github-actions bot removed the create-preview Generate preview on staging.nodejs.dev label Oct 11, 2022
@github-actions
Copy link

Please find a preview at: https://staging.nodejs.dev/2911/

@sethetter
Copy link
Contributor Author

@ovflowd let me know if there's anything to address here! Also if you don't mind throwing the hacktoberfest-accepted label on this (if it meets standards of course) I'd greatly appreciate it :)

@codecov-commenter
Copy link

codecov-commenter commented Oct 12, 2022

Codecov Report

Base: 66.02% // Head: 67.05% // Increases project coverage by +1.03% 🎉

Coverage data is based on head (b78cddb) compared to base (fd57b87).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2911      +/-   ##
==========================================
+ Coverage   66.02%   67.05%   +1.03%     
==========================================
  Files         118      137      +19     
  Lines        1351     1536     +185     
  Branches      342      359      +17     
==========================================
+ Hits          892     1030     +138     
- Misses        422      464      +42     
- Partials       37       42       +5     
Impacted Files Coverage Δ
src/__fixtures__/hooks.tsx 100.00% <ø> (ø)
src/__fixtures__/page.tsx 94.11% <ø> (-5.89%) ⬇️
...components/ApiComponents/Components/ApiHeading.tsx 100.00% <ø> (+100.00%) ⬆️
...rc/components/ApiComponents/Components/ApiLink.tsx 100.00% <ø> (+100.00%) ⬆️
...onents/ApiComponents/Components/JsonLink/index.tsx 100.00% <ø> (ø)
...ents/ApiComponents/Components/SourceLink/index.tsx 50.00% <ø> (+50.00%) ⬆️
...ApiComponents/Components/VersionSelector/index.tsx 100.00% <ø> (+100.00%) ⬆️
src/components/ApiComponents/index.tsx 100.00% <ø> (+100.00%) ⬆️
src/components/ArticleComponents/Alert/index.tsx 100.00% <ø> (ø)
...ents/ArticleComponents/AuthorList/Author/index.tsx 88.88% <ø> (ø)
... and 172 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ovflowd
Copy link
Member

ovflowd commented Oct 12, 2022

Hey @sethetter I haven't had time to review this PR yet and to check the preview. Will do asap 🙃

Copy link
Member

@benhalverson benhalverson left a comment

Choose a reason for hiding this comment

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

Dog LGTM Keyboard

@benhalverson benhalverson added the hacktoberfest-accepted Used to label PR's label Oct 13, 2022
@benhalverson
Copy link
Member

Just need to resolve the conflict. Thanks for working on this issue 👍🏻

Copy link
Member

@AugustinMauroy AugustinMauroy left a comment

Choose a reason for hiding this comment

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

LGTM 💯

Copy link
Member

@ovflowd ovflowd left a comment

Choose a reason for hiding this comment

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

Needs a rebase 😅 (Probably needs to be added to src/components/ApiComponents/Components

And do the changes I mentioned before 🙏

@sethetter
Copy link
Contributor Author

sethetter commented Oct 18, 2022

@ovflowd @benhalverson alright I think everything is addressed and ready to merge!

Thanks everyone for the feedback and review :)

@ovflowd ovflowd added the create-preview Generate preview on staging.nodejs.dev label Oct 18, 2022
@github-actions github-actions bot removed the create-preview Generate preview on staging.nodejs.dev label Oct 18, 2022
@ovflowd
Copy link
Member

ovflowd commented Oct 18, 2022

@sethetter I believe you still forgot to move the component to the src/components/ApiComponents/Components folder 👀 and export it on src/components/ApiComponents/Components/index.ts

@github-actions
Copy link

Please find a preview at: https://staging.nodejs.dev/2911/

@sethetter
Copy link
Contributor Author

@ovflowd alright, feedback addressed!

Copy link
Member

@ovflowd ovflowd left a comment

Choose a reason for hiding this comment

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

There are still a few things to be done 😅

Copy link
Member

@ovflowd ovflowd left a comment

Choose a reason for hiding this comment

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

Amazing! Thank you so much for this contribution! Everything looks great ;D

@ovflowd ovflowd merged commit 04d4f13 into nodejs:main Oct 19, 2022
@sethetter sethetter deleted the 2894-json-docs-link branch October 19, 2022 11:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

hacktoberfest-accepted Used to label PR's

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants