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

Enable customization of CatalogTable pagination #27558

Conversation

tylerd-canva
Copy link
Contributor

@tylerd-canva tylerd-canva commented Nov 8, 2024

Hey, I just made a Pull Request!

I was looking to make use of one of the server side paginated CatalogTables but realised neither of them allowed you to remove the awful (IMHO) top pagination buttons. For CursorPaginatedCatalogTable I left the ...options at the conservative spot above the other pagination options since it seemed deliberate to not allow overriding them.

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)
  • All your commits have a Signed-off-by line in the message. (more info)

Signed-off-by: Tyler Davis <tylerd@canva.com>
Signed-off-by: Tyler Davis <tylerd@canva.com>
@tylerd-canva tylerd-canva requested review from a team as code owners November 8, 2024 08:50
@github-actions github-actions bot added the area:catalog Related to the Catalog Project Area label Nov 8, 2024
@backstage-goalie
Copy link
Contributor

backstage-goalie bot commented Nov 8, 2024

Changed Packages

Package Name Package Path Changeset Bump Current Version
@backstage/plugin-catalog plugins/catalog minor v1.24.1-next.2

@@ -39,9 +39,9 @@ export function CursorPaginatedCatalogTable(props: PaginatedCatalogTableProps) {
columns={columns}
data={data}
options={{
paginationPosition: 'both',
...options,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it makes more sense to put this at the bottom of the list so that all of them can be overridden, but it seemed like it was intentional based on the comment below this line.

Copy link
Member

Choose a reason for hiding this comment

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

yep, correct. But your change makes sense to me!

Copy link
Member

@vinzscam vinzscam 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 @tylerd-canva 🙏

@@ -39,9 +39,9 @@ export function CursorPaginatedCatalogTable(props: PaginatedCatalogTableProps) {
columns={columns}
data={data}
options={{
paginationPosition: 'both',
...options,
Copy link
Member

Choose a reason for hiding this comment

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

yep, correct. But your change makes sense to me!

.changeset/serious-penguins-remain.md Outdated Show resolved Hide resolved
Co-authored-by: Vincenzo Scamporlino <vincenzos@spotify.com>
Signed-off-by: Tyler Davis <tylerd@canva.com>
Copy link
Member

@benjdlambert benjdlambert left a comment

Choose a reason for hiding this comment

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

Let's go with this! 🎉

@benjdlambert benjdlambert merged commit d5be950 into backstage:master Nov 12, 2024
24 checks passed
Copy link
Contributor

Thank you for contributing to Backstage! The changes in this pull request will be part of the 1.33.0 release, scheduled for Tue, 19 Nov 2024.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:catalog Related to the Catalog Project Area
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants