Skip to content

fix(types): change page.size to 10 in JSDoc comment#11561

Merged
bluwy merged 2 commits intowithastro:mainfrom
ArmandPhilippot:fix/astro-types-page-size-comment
Jul 26, 2024
Merged

fix(types): change page.size to 10 in JSDoc comment#11561
bluwy merged 2 commits intowithastro:mainfrom
ArmandPhilippot:fix/astro-types-page-size-comment

Conversation

@ArmandPhilippot
Copy link
Member

Changes

Testing

No test needed, it's just a comment update. You can check the reproduction to see that 10 is the correct number.

Docs

An update to the Routing guide will be needed since it reuse the Page interface (and maybe also an update to API reference). This is already reported in withastro/docs#8929.

10 is the correct default pageSize and not 25.

Closes withastro#11560
@changeset-bot
Copy link

changeset-bot bot commented Jul 26, 2024

🦋 Changeset detected

Latest commit: 5768113

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

@github-actions github-actions bot added pkg: astro Related to the core `astro` package (scope) pr: docs A PR that includes documentation for review labels Jul 26, 2024
@bluwy bluwy merged commit 904f1e5 into withastro:main Jul 26, 2024
@astrobot-houston astrobot-houston mentioned this pull request Jul 26, 2024
@ArmandPhilippot ArmandPhilippot deleted the fix/astro-types-page-size-comment branch July 26, 2024 13:20
@sarah11918
Copy link
Member

Thanks @ArmandPhilippot @bluwy @ematipico for handling this! Just to weigh in:

  • we usually only use a changeset for docs when the content is corrected (as it was here) because this text occurs in the editor on hover, people might be consulting it to figure out how to use it etc. So, fixing actually WRONG information is considered helpful to ship in a patch and get people's editors updated and have a chance for the changeset to point out that the previous guidance was wrong.

  • for something like a typo that doesn't exactly correct incorrect information, I tend not to use one. (And then Chris tells me when it seems important enough to actually do have one.) 😄

For the changeset content itself, calling out that this is specifically a DOCS FIX is helpful, I think. See the last changeset I made, for example:

Fixes typo in documenting the slot="fallback" attribute for Server Islands experimental feature.`

That way, people who are scanning can CLEARLY tell this is just a docs fix. In this situation, I would have suggested something like:

Fixes an error where docs incorrectly stated the default value of page.size

(Will note for future reference that "Uses" isn't a particularly descriptive/active verb for letting people know whether e.g. something was "fixed", "added", "removed", "improved", "refactored". Used is about what YOU did. Readers need to know what this change means for THEM, and the new state of the project as it relates to their code! 😉 )

@ArmandPhilippot
Copy link
Member Author

Thanks @sarah11918 for taking the time to write this detailed explanation! 👏🏽 I better understand when to use a changeset now and your note on the wording makes perfect sense. Your suggestion is indeed much better in a changelog. I'll try to be more descriptive the next time!

ArmandPhilippot added a commit to ArmandPhilippot/astro-docs that referenced this pull request Jul 29, 2024
* Add default for `page.size` and `pageSize` (see withastro/astro#11561)
* Add missing Since for `page.url.first` and `page.url.last` (see withastro/astro#11176)
ArmandPhilippot added a commit to ArmandPhilippot/astro-docs that referenced this pull request Jul 29, 2024
* Add default for `page.size` and `pageSize` (see withastro/astro#11561)
* Add missing Since for `page.url.first` and `page.url.last` (see withastro/astro#11176)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: astro Related to the core `astro` package (scope) pr: docs A PR that includes documentation for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inaccurate JSdoc comment for page.size in astro/@types

3 participants