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

feat: defineIntegration #8056

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

florian-lefebvre
Copy link
Member

@florian-lefebvre florian-lefebvre commented Apr 30, 2024

Description (required)

  • Replaces occurences of AstroIntegration by defineIntegration
  • Add a section documenting usage of defineIntegration
  • Updates Astro DB integration docs
  • TODO: show how to use a custom type using z.custom<MyType>()

Related issues & labels (optional)

  • Suggested label: add new content, minor release

For Astro version: 4.8. See astro PR #10892.

Copy link

vercel bot commented Apr 30, 2024

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

Name Status Preview Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview Apr 30, 2024 5:23pm
1 Ignored Deployment
Name Status Preview Updated (UTC)
docs-i18n ⬜️ Ignored (Inspect) Apr 30, 2024 5:23pm

@astrobot-houston
Copy link
Contributor

astrobot-houston commented Apr 30, 2024

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

Locale File Note
en guides/astro-db.mdx Source changed, localizations will be marked as outdated.
en recipes/making-toolbar-apps.mdx Source changed, localizations will be marked as outdated.
en reference/dev-toolbar-app-reference.mdx Source changed, localizations will be marked as outdated.
en reference/integrations-reference.mdx Source changed, localizations will be marked as outdated.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

@florian-lefebvre florian-lefebvre marked this pull request as ready for review April 30, 2024 17:13
@sarah11918 sarah11918 added add new content Document something that is not in docs. May require testing, confirmation, or affect other pages. merge-on-release Don't merge this before the feature is released! (MQ=approved but WAIT for feature release!) labels Apr 30, 2024
@sarah11918 sarah11918 added this to the 4.8 milestone Apr 30, 2024
@florian-lefebvre florian-lefebvre marked this pull request as draft May 1, 2024 06:48
@@ -611,6 +622,129 @@ A list of all generated pages. It is an object with one property.

- `pathname` - the finalized path of the page.

## Helpers
Copy link
Member

Choose a reason for hiding this comment

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

Just getting ahead of this a bit, not full review:

This says "helpers" (plural), but then only seems to define defineIntegration(). Also, since this is an API reference page, thinking about what's scannable in the TOC, I think it might make more sense to have the actual code options visible vs descriptive headings. (People may often be using these pages to look things up, and seeing the various helpers/arguments etc. in the TOC makes that very easy to do.)

Would a structure like this make sense?

## `defineIntegration()`
<p><Since v="4.8.0" /></p>

### `optionsSchema`
<p><Since v="4.8.0" /></p>

### `setup`
<p><Since v="4.8.0" /></p>

Copy link
Member Author

Choose a reason for hiding this comment

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

I have been thinking about this and my thinking was that, since we have a new entrypoint (astro/integration), more things could be exported in the future. So I decided to create a section for all the things that may end up in there. Let me know what you think! But I don't think it's worth reviewing just yet because we need to go through all the rfc stages

@florian-lefebvre florian-lefebvre removed this from the 4.8 milestone May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add new content Document something that is not in docs. May require testing, confirmation, or affect other pages. merge-on-release Don't merge this before the feature is released! (MQ=approved but WAIT for feature release!)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants