-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Deprecate drafts feature #8099
Deprecate drafts feature #8099
Conversation
🦋 Changeset detectedLatest commit: 4435deb The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
packages/astro/src/@types/astro.ts
Outdated
@@ -1017,6 +1017,7 @@ export interface AstroUserConfig { | |||
* @name markdown.drafts | |||
* @type {boolean} | |||
* @default `false` | |||
* @deprecated since version 3.0. Use content collections instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@delucis - Is there any special formatting we need to adhere to for the deprecated
entry here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don’t actually display @deprecated
comments in docs yet, so now’s our chance to decide a format if we want!
I can imagine generating something like this? Where the contents of the comments follow the leading Deprecated:
.
Or even something like this depending on how highlighted we want it:
So given that, I guess it depends if you think specific wording would be clearest there @sarah11918?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah OK, yes, we could implement a similar pattern in the config reference if we like how the error generation script does this.
In this example I don’t love how basically a full sentence is split across heading and paragraph, so if we like the chunkier aside rendering, I would probably argue we should end up with something that looks more like:
⚠️ Deprecated
Deprecated since version 2.6. Use content collections instead.
In which case, best for that to be reflected in the JSDoc comment too:
* @deprecated since version 3.0. Use content collections instead. | |
* @deprecated Deprecated since version 2.6. Use content collections instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed a commit to update the @deprecated
tag to be a proper sentence instead 👍
Co-authored-by: Sarah Rainsberger <[email protected]>
Thanks for the review! I've also updated the RSS readme (missed that). Marked the |
Just noting that for v3.0, we will actually be using this here: #8158 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating the @deprecated
tags @bluwy! LGTM!
Changes
Deprecate drafts feature in favour of content collections
Testing
Tested manually that the warning is logged in dev and build.
Docs
Added a changeset. The migration path is a bit bigger since it involves migrating to content collections first, then filtering
draft
. I linked to the related parts in docs instead.I'm also not sure if we need more documentation in the added
@deprecated
jsdoc. If we have more info in the published migration guide later, those fields could point to it instead?/cc @withastro/maintainers-docs for feedback!