Skip to content

Add loader reference to the beta docs#9374

Merged
ascorbic merged 15 commits into5.0.0-betafrom
loader-api
Sep 11, 2024
Merged

Add loader reference to the beta docs#9374
ascorbic merged 15 commits into5.0.0-betafrom
loader-api

Conversation

@ascorbic
Copy link
Copy Markdown
Contributor

Description (required)

Adds a loader API reference page

Related issues & labels (optional)

  • Closes PLT-2514

@netlify
Copy link
Copy Markdown

netlify bot commented Sep 10, 2024

Deploy Preview for astro-docs-2 ready!

Name Link
🔨 Latest commit b48758e
🔍 Latest deploy log https://app.netlify.com/sites/astro-docs-2/deploys/66e1aea642fe180008a067d1
😎 Deploy Preview https://deploy-preview-9374--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 site configuration.

Copy link
Copy Markdown
Member

@ArmandPhilippot ArmandPhilippot left a comment

Choose a reason for hiding this comment

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

Ok so at first reading, I didn't dare quibble about the formatting (since apart from api-reference we hadn't reworked the other files) but since Sarah asked me to take a look... 😀

Overall it's really just reformatting around Type:. (the surrounding p tag is mainly there to encourage future people who edit the document to place Default: or Since if needed in the same p tag and the empty line is here to prevent a possible bug due to Markdown being embed in HTML tags)
Just be careful from DataStore (sorry the suggestions are not necessarily in order, I forgot to add some comments): I might have made mistakes when changing the types! Maybe I looked at the wrong files or the types exposed to the public are a little different.
On the other hand, if I didn't make any mistakes, is the difference invisible to the user between DataStore and MutableDataStore? If it is visible, maybe these properties should be differentiated in the documentation...

I also left a suggestion regarding DataEntry as it seems that several properties use this type.

ascorbic and others added 2 commits September 11, 2024 09:23
Co-authored-by: Luiz Ferraz <luiz@lferraz.com>
Co-authored-by: Armand Philippot <git@armand.philippot.eu>
Co-authored-by: Armand Philippot <git@armand.philippot.eu>
@ascorbic
Copy link
Copy Markdown
Contributor Author

@ArmandPhilippot Thanks for the detailed review! Addressing the point about the DataStore types, it seems you're looking at the wrong branch. In the 5.0 branch DataStore is the type previously called ScopedDataStore. See withastro/astro#11914

@ArmandPhilippot
Copy link
Copy Markdown
Member

ArmandPhilippot commented Sep 11, 2024

@ArmandPhilippot it seems you're looking at the wrong branch

Oh sorry! I was sure I had selected the next branch... I must have gotten confused at some point. 😓 It's clearer when looking at the right source... Thanks!

So I have another question: is addModuleImport also an internal method? (I don't see @internal in the JSDoc comment, so maybe it should be added here)

@ascorbic
Copy link
Copy Markdown
Contributor Author

I've extracted the DataEntry type into another section, instead of documenting it inside the get and set methods.

Copy link
Copy Markdown
Member

@ArmandPhilippot ArmandPhilippot left a comment

Choose a reason for hiding this comment

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

A few more quibbles related to formatting and one about an abbreviation.

After this (and my question about addModuleImport), I will have nothing more to say! I'll let others speak. 😄

Thanks @ascorbic for your edits (and your patience with my error 😓 ). Everything looks good to me (including the new DataEntry section)!

Co-authored-by: Armand Philippot <git@armand.philippot.eu>
@ascorbic
Copy link
Copy Markdown
Contributor Author

@ArmandPhilippot thanks! And yes, you're right the addModuleImport JSDoc does need updating. The actual text is wrong too. I'll handle that in the repo.

Copy link
Copy Markdown
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.

Whew! Great work everyone. I'm so happy with everyone's care and attention to detail in making our newest API page a model for going forward!

I've made a bunch of tiny changes here, like simply breaking up longer paragraphs, that I will commit directly to reduce noise.

In the case of ones where I'd like people to take a look, I'll leave those open and unresolved. But this is super close to being ready to go, and again, thanks for both the initial great content to work with, and the fabulous reviews to make this shine!

Copy link
Copy Markdown
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.

Whew! Great work everyone. I'm so happy with everyone's care and attention to detail in making our newest API page a model for going forward!

I've made a bunch of tiny changes here, like simply breaking up longer paragraphs, that I will commit directly to reduce noise.

In the case of ones where I'd like people to take a look, I'll leave those open and unresolved. But this is super close to being ready to go, and again, thanks for both the initial great content to work with, and the fabulous reviews to make this shine!

@sarah11918
Copy link
Copy Markdown
Member

@ascorbic I am happy with this PR now! Once you're happy, fix anything I might have messed up etc., it's good to merge!

@ascorbic ascorbic merged commit d3d0575 into 5.0.0-beta Sep 11, 2024
@ascorbic ascorbic deleted the loader-api branch September 11, 2024 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants