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

Update typedoc-plugin-markdown to 4.0.0 #4870

Merged
merged 2 commits into from
May 7, 2024
Merged

Conversation

NevilleS
Copy link
Contributor

@NevilleS NevilleS commented May 7, 2024

Description Of Changes

This updates typedoc-plugin-markdown to the latest release and follows the v4 migration guide to tweak a couple of the formatting features 👍

This improves the format of the generated .md files in a couple ways which I like, including removing the inline table of contents that was OK but more confusing than helpful in our docs.

NOTE: I originally did this hoping to find a way to add some additional pages to document features that aren't strictly part of the types (e.g. guides) but looks like we'll need to wait until this plugin supports the typedoc beta: TypeStrong/typedoc#2567

Code Changes

  • Update typedoc-plugin-markdown dependency
  • Tweak package.json's typedocOptions configuration to be 🤌 just right 🤌

Steps to Confirm

  • Run turbo build in the clients/fides-js project and check the docs/ output

Pre-Merge Checklist

Copy link

vercel bot commented May 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
fides-plus-nightly ⬜️ Ignored (Inspect) Visit Preview May 7, 2024 9:33pm

Copy link
Contributor Author

@NevilleS NevilleS left a comment

Choose a reason for hiding this comment

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

Some notes

@@ -26,9 +26,7 @@ Google Tag Manager, IAB TCF, etc.
See [Fides](interfaces/Fides.md) for how to use the `window.Fides` JavaScript API, [FidesOptions](interfaces/FidesOptions.md) for supported options to customize it's behavior, and [FidesEvent](interfaces/FidesEvent.md) for how to use `window.addEventListener(...)` to subscribe to
custom Fides events for real-time updates.

## Table of contents
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Table of contents are removed: https://typedoc-plugin-markdown.org/docs/migration-guide#-breaking-changes

I'm OK with that.

@@ -32,24 +32,11 @@ existence of Fides *or* subscribe to the global `FidesInitialized` event (see
</body>
```

## Table of contents
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This TOC was helpful, but I think it's OK. When we package these up and host on our docs site, the sidebar generates a new TOC from the headings anyways: https://ethyca.com/docs/dev-docs/js/reference/interfaces/Fides
image

Copy link
Contributor

Choose a reason for hiding this comment

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

The inline TOC was annoying me for that reason. I think it's a good move. I like the sidebar much better.


### getModalLinkLabel
### getModalLinkLabel()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

🤌 excellent little hint showing () for a function, thank you maintainers

@@ -226,19 +209,15 @@ function myCustomShowModalFunction() {
}
```

#### Type declaration
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wasn't helpful, now it's gone. Bonus!

@@ -70,8 +70,9 @@
"rollup-plugin-postcss": "^4.0.2",
"rollup-plugin-visualizer": "^5.12.0",
"ts-jest": "^29.1.0",
"typedoc": "^0.25.13",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I should have included this previously! It was getting pulled in as a peer dependency.

@NevilleS NevilleS changed the title Update typedoc-plugin-markdown to 4.0.0 release Update typedoc-plugin-markdown to 4.0.0 May 7, 2024
Copy link

cypress bot commented May 7, 2024

Passing run #7626 ↗︎

0 4 0 0 Flakiness 0

Details:

Merge 113790f into 32600db...
Project: fides Commit: 0bc5fa5a05 ℹ️
Status: Passed Duration: 00:33 💡
Started: May 7, 2024 9:44 PM Ended: May 7, 2024 9:45 PM

Review all test suite changes for PR #4870 ↗︎

@gilluminate gilluminate self-requested a review May 7, 2024 22:09
Copy link
Contributor

@gilluminate gilluminate left a comment

Choose a reason for hiding this comment

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

I'm a fan of these updates. Better markup, better accessibility, fewer redundancies. What's not to love?

@@ -32,24 +32,11 @@ existence of Fides *or* subscribe to the global `FidesInitialized` event (see
</body>
```

## Table of contents
Copy link
Contributor

Choose a reason for hiding this comment

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

The inline TOC was annoying me for that reason. I think it's a good move. I like the sidebar much better.

@@ -65,7 +52,7 @@ The specific keys provided in the `Fides.consent` property are determined
based on your Fides configuration, and are provided to the browser based on
the user's location, property ID, etc.

**`Example`**
#### Example
Copy link
Contributor

Choose a reason for hiding this comment

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

better for a11y!

@NevilleS NevilleS merged commit 0e27b21 into main May 7, 2024
13 checks passed
@NevilleS NevilleS deleted the ns-update-typedoc-4-0-0 branch May 7, 2024 22:16
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.

2 participants