Skip to content

Conversation

ArmandPhilippot
Copy link
Member

Description (required)

  • Updates the integrations guide to add or format the API reference blocks.
  • Updates slightly two descriptions in integrations-guide/db to remove the inline types and to make the description more accurate based on the types.

This looks like a big update but it's not (each block is ~4-7 added lines) that's why I've updated all the integrations guides in one PR.

What you might want to double check is foreignKeys in db, recmaPlugins in mdx and the options in partytown (see the details for why). I think the choices are reasonable but you might have another opinion!

Show details

For each integration API, I added a link so you can easily check there is no errors. I've added some comments for some to explain my choice.

I haven't updated the other integrations guide because the API references were already there!

Related issues & labels (optional)

  • Suggested label: consistency/formatting, improve or update documentation

@ArmandPhilippot ArmandPhilippot added improve or update documentation Enhance / update existing documentation (e.g. add example, improve description, update for changes) consistency/formatting Standardizing without changing docs content e.g. indenting, lists etc. labels Sep 15, 2025
Copy link

netlify bot commented Sep 15, 2025

Deploy Preview for astro-docs-2 ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit fb2357d
🔍 Latest deploy log https://app.netlify.com/projects/astro-docs-2/deploys/68d2d04cf3942a0008debead
😎 Deploy Preview https://deploy-preview-12319--astro-docs-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@astrobot-houston
Copy link
Contributor

astrobot-houston commented Sep 15, 2025

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

File Note
en/guides/integrations-guide/alpinejs.mdx Source changed, localizations will be marked as outdated.
en/guides/integrations-guide/db.mdx Source changed, localizations will be marked as outdated.
en/guides/integrations-guide/markdoc.mdx Source changed, localizations will be marked as outdated.
en/guides/integrations-guide/mdx.mdx Source changed, localizations will be marked as outdated.
en/guides/integrations-guide/partytown.mdx Source changed, localizations will be marked as outdated.
en/guides/integrations-guide/preact.mdx Source changed, localizations will be marked as outdated.
en/guides/integrations-guide/solid-js.mdx Source changed, localizations will be marked as outdated.
en/guides/integrations-guide/vercel.mdx Source changed, localizations will be marked as outdated.
en/guides/integrations-guide/vue.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.

@ArmandPhilippot ArmandPhilippot changed the title fix(integrations-guide): add/format the API references block fix(integrations-guide): add/format API references blocks Sep 15, 2025
Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

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

This looks great, @ArmandPhilippot ! I've reviewed for syntax, and left thoughts about Partytown.

It would be great if someone had thoughts on the db and mdx (recmaPlugins) types, since that's out of my comfort zone!

Co-authored-by: Sarah Rainsberger <[email protected]>
@ArmandPhilippot
Copy link
Member Author

Thanks Sarah! I've answered for partytown. Now, for mdx and db, I'm not sure.

Maybe @Adammatthiesen (if you have time to look at it) would have an idea for the foreignKeys type since he's working on db.

For Adam, to avoid you reading all the details: In the description, we had Column to describe the return type of foreignKeys but the type doesn't exist. I don't have a better idea so I reused what we had. Do you know if there is a more explicit type here we could use? Or do you think it's fine even if the type doesn't exist? Any ideas are welcome!

But for mdx I don't know who we could ask... I hesitated to use unified.PluggableList, but I wasn't sure this would be more explicit for people.


<p>

**Type:** `PluggableList`<br />
Copy link
Member

Choose a reason for hiding this comment

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

But for mdx I don't know who we could ask... I hesitated to use unified.PluggableList, but I wasn't sure this would be more explicit for people.

Let's ask @delucis !

(Armand's concern is regarding the entry for recmaPlugins: "PluggableList is not an Astro type but a unified one and I don't think we reexport it, but I don't have a better idea to describe the type.)

@Adammatthiesen
Copy link
Member

Thanks Sarah! I've answered for partytown. Now, for mdx and db, I'm not sure.

Maybe @Adammatthiesen (if you have time to look at it) would have an idea for the foreignKeys type since he's working on db.

For Adam, to avoid you reading all the details: In the description, we had Column to describe the return type of foreignKeys but the type doesn't exist. I don't have a better idea so I reused what we had. Do you know if there is a more explicit type here we could use? Or do you think it's fine even if the type doesn't exist? Any ideas are welcome!

But for mdx I don't know who we could ask... I hesitated to use unified.PluggableList, but I wasn't sure this would be more explicit for people.

Yeah, im not sure where the original docs writer got that type from 😅 But the new description looks correct, since there really is no proper external type for that. (as currently ALL of the astro:db types are virtual only and cannot be directly referenced. I also plan to change this when i do my rebuild of DB... because it annoy's me 😅 )

@ArmandPhilippot
Copy link
Member Author

Thanks @Adammatthiesen

Yeah, im not sure where the original docs writer got that type from

I think the idea was to illustrate a single column configured inside columns in the absence of an actual type to use. And to be clear, I removed it from the description... but I'm reusing it inside Type: because we don't have an exported type for that and so I'm not sure what we could show here.

ALL of the astro:db types are virtual only and cannot be directly referenced

Well, I was able to import ColumnsConfig from @astrojs/db/types while checking the types to use! 😄 (I'm using it for indexes). But, yeah, I wasn't able to find a meaningful type for foreignKeys...
So I guess the question would be should we use:

Type: { columns: string | string[]; references: () => Column | Column[]; }[]

even if Column doesn't exist. Or should we remove that type (while waiting for you to finish the DB rebuild 😀 ) because it's not really accurate? Do you think it's confusing/harmful to use that?

@Adammatthiesen
Copy link
Member

Well, I was able to import ColumnsConfig from @astrojs/db/types while checking the types to use! 😄 (I'm using it for indexes). But, yeah, I wasn't able to find a meaningful type for foreignKeys... So I guess the question would be should we use:

Type: { columns: string | string[]; references: () => Column | Column[]; }[]

even if Column doesn't exist. Or should we remove that type (while waiting for you to finish the DB rebuild 😀 ) because it's not really accurate? Do you think it's confusing/harmful to use that?

yeah... there is a few very specific types available, but the primary table/column types are not at the moment.

For now probably fine to just keep the Mock Column type as long as we are explaining that the user is using a existing table's column (as shown in the code snippet example)

@sarah11918
Copy link
Member

@ArmandPhilippot Shall we NWTWWHB this one and get it merged? I know there was one outstanding question, but maybe we merge as-is then change if we find it's not helpful or have a better idea?

Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

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

I'll give an explicit approval that I'm happy with what I reviewed!

@ArmandPhilippot
Copy link
Member Author

@sarah11918 If someone is using a recmaPlugin (which is less known than remark/rehype), I assume they are already familiar with the unified ecosystem (and PluggableList should talk to them). So, I don't think the recmaPlugin question is really a blocker.
At worth, if someone find this confusing I'm sure we'll see a post about it on Discord or here and so we can find a better solution later if necessary.

So yes, I think we can merge this one! 🫡

@ArmandPhilippot ArmandPhilippot merged commit a725c78 into withastro:main Sep 23, 2025
10 checks passed
@ArmandPhilippot ArmandPhilippot deleted the fix/integrations-guide/add-api-references-block branch September 23, 2025 17:00
ArmandPhilippot added a commit to ArmandPhilippot/astro-docs that referenced this pull request Sep 23, 2025
ArmandPhilippot added a commit to ArmandPhilippot/astro-docs that referenced this pull request Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consistency/formatting Standardizing without changing docs content e.g. indenting, lists etc. improve or update documentation Enhance / update existing documentation (e.g. add example, improve description, update for changes)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants