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: add first and last to the Page interface #11176

Merged
merged 3 commits into from
Jul 17, 2024

Conversation

tsawada
Copy link
Contributor

@tsawada tsawada commented Jun 2, 2024

Changes

Add page.url.first, page.url.last to the Page interface.
Closes withastro/roadmap#862

Testing

I couldn't find relevant tests for page.url. Let me know if there is one already.

Docs

This needs to be updated
https://github.com/withastro/docs/blob/main/src/content/docs/en/guides/routing.mdx#complete-api-reference

/cc @withastro/maintainers-docs for feedback!

Copy link

changeset-bot bot commented Jun 2, 2024

🦋 Changeset detected

Latest commit: b5b8554

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) docs pr A PR that includes documentation for review semver: major Change triggers a `major` release labels Jun 2, 2024
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This PR is blocked because it contains a major changeset. A reviewer will merge this at the next release if approved.

@bluwy bluwy added semver: minor Change triggers a `minor` release and removed semver: major Change triggers a `major` release labels Jun 21, 2024
@bluwy bluwy added this to the 4.12.0 milestone Jun 21, 2024
@bluwy
Copy link
Member

bluwy commented Jun 21, 2024

Looks like we forgot to followup on this PR. I queued this up for the next minor in 4.12.0

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.

Just placeholding for docs here! When I get a docs PR, then I'll be able to review!

'astro': minor
---

feat: Add urls to the first and the last page in the Page interface
Copy link
Member

Choose a reason for hiding this comment

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

This will need updating, will wait to see what the docs PR is to know what to suggest.

@matthewp
Copy link
Contributor

matthewp commented Jul 3, 2024

Will need docs for this. @tsawada will you be able to write them?

@sarah11918
Copy link
Member

Added a docs PR with my suggestion here, since this appears to be similar to other existing items. Please read carefully for accuracy, as I inferred e.g. when the value is undefined based on the previous and next entries!

withastro/docs#8751

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.

Thank you for this very handy addition to the page prop, @tsawada ! I think people will make very good use of this! 🙌

I've gone ahead and drafted a Docs PR to accompany this, but I will need you to review and make sure it's accurate, as well as my suggestion here for the message that will show up in the CHANGELOG.

So, docs aren't ready to go but I've tried to move them along with a suggestion. Once you've approved or corrected them, then Docs is happy!

.changeset/twenty-maps-glow.md Outdated Show resolved Hide resolved
@sarah11918 sarah11918 dismissed their stale review July 8, 2024 11:41

no longer blocked by lack of docs

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.

Approving for docs!

@matthewp matthewp merged commit a751458 into withastro:main Jul 17, 2024
14 checks passed
@astrobot-houston astrobot-houston mentioned this pull request Jul 17, 2024
ematipico pushed a commit that referenced this pull request Jul 18, 2024
* feat: add first and last to the Page interface

* Update .changeset/twenty-maps-glow.md

* Update .changeset/twenty-maps-glow.md

Co-authored-by: Sarah Rainsberger <[email protected]>

---------

Co-authored-by: Bjorn Lu <[email protected]>
Co-authored-by: Matthew Phillips <[email protected]>
Co-authored-by: Sarah Rainsberger <[email protected]>
@astrobot-houston astrobot-houston mentioned this pull request Jul 18, 2024
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
docs pr A PR that includes documentation for review pkg: astro Related to the core `astro` package (scope) semver: minor Change triggers a `minor` release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants