Skip to content

cleanup: Remove "inline" pagination #2458

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

Merged
merged 3 commits into from
Sep 19, 2024
Merged

Conversation

david-crespo
Copy link
Collaborator

While looking at #2457 I could not find a place where inline pagination is actually used. It's also all wonky, with some components defaulting to inline and some components defaulting to page. Will comment inline because there's some weirdness, but the goal here is to change nothing about any actually existing usages.

Copy link

vercel bot commented Sep 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
console ✅ Ready (Inspect) Visit Preview Sep 19, 2024 7:09pm

export function Pagination({ inline = false, ...props }: PaginationProps) {
if (inline) return <UIPagination {...props} />

export function Pagination(props: UIPaginationProps) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

inline was never true here. The only callsite is in QueryTable, which defaults to page and was never overridden.

@@ -115,7 +112,6 @@ const makeQueryTable = <Item extends Record<string, unknown>>(
<>
<Table table={table} rowHeight={rowHeight} />
<Pagination
inline={pagination === 'inline'}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was always false because pagination defaults to "page" and we never set the prop explicitly.

@@ -50,7 +48,6 @@ export const Pagination = ({
<>
<div
className={cn(
type === 'page' && 'py-5',
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the weird bit. In all the calling code above this, we were always page, never inline, but because this defaults to inline, we take this bit out.

@david-crespo david-crespo changed the base branch from main to fix-pagination-z-index September 19, 2024 17:41
@david-crespo david-crespo force-pushed the remove-inline-pagination branch from 219ee31 to bfe00fd Compare September 19, 2024 19:09
Base automatically changed from fix-pagination-z-index to main September 19, 2024 19:19
@david-crespo david-crespo merged commit 1625d02 into main Sep 19, 2024
8 checks passed
@david-crespo david-crespo deleted the remove-inline-pagination branch September 19, 2024 19:26
david-crespo added a commit to oxidecomputer/omicron that referenced this pull request Oct 3, 2024
oxidecomputer/console@5561f28...073471c

* [073471c4](oxidecomputer/console@073471c4) mock api: disks are created straight into detached state
* [612ec90c](oxidecomputer/console@612ec90c) oxidecomputer/console#2485
* [614f1bb5](oxidecomputer/console@614f1bb5) oxidecomputer/console#2466
* [df2dc14c](oxidecomputer/console@df2dc14c) bump vite related deps for a weird vuln
* [a030b9e0](oxidecomputer/console@a030b9e0) oxidecomputer/console#2464
* [dec48497](oxidecomputer/console@dec48497) oxidecomputer/console#2461
* [e46216aa](oxidecomputer/console@e46216aa) oxidecomputer/console#2482
* [0d897efe](oxidecomputer/console@0d897efe) oxidecomputer/console#2479
* [f88790db](oxidecomputer/console@f88790db) oxidecomputer/console#2478
* [d634c8f0](oxidecomputer/console@d634c8f0) oxidecomputer/console#2477
* [eeaa14c3](oxidecomputer/console@eeaa14c3) oxidecomputer/console#2475
* [5ece6e18](oxidecomputer/console@5ece6e18) oxidecomputer/console#2467
* [4b699e01](oxidecomputer/console@4b699e01) oxidecomputer/console#2448
* [9c9dc149](oxidecomputer/console@9c9dc149) oxidecomputer/console#2465
* [1aa0fc9b](oxidecomputer/console@1aa0fc9b) oxidecomputer/console#2463
* [57db4054](oxidecomputer/console@57db4054) oxidecomputer/console#2462
* [da7fe328](oxidecomputer/console@da7fe328) oxidecomputer/console#2460
* [e0d52efd](oxidecomputer/console@e0d52efd) oxidecomputer/console#2437
* [1625d02a](oxidecomputer/console@1625d02a) oxidecomputer/console#2458
* [fd82458e](oxidecomputer/console@fd82458e) oxidecomputer/console#2457
* [7daaa337](oxidecomputer/console@7daaa337) oxidecomputer/console#2453
david-crespo added a commit to oxidecomputer/omicron that referenced this pull request Oct 3, 2024
oxidecomputer/console@5561f28...073471c

* [073471c4](oxidecomputer/console@073471c4)
mock api: disks are created straight into detached state
* [612ec90c](oxidecomputer/console@612ec90c)
oxidecomputer/console#2485
* [614f1bb5](oxidecomputer/console@614f1bb5)
oxidecomputer/console#2466
* [df2dc14c](oxidecomputer/console@df2dc14c)
bump vite related deps for a weird vuln
* [a030b9e0](oxidecomputer/console@a030b9e0)
oxidecomputer/console#2464
* [dec48497](oxidecomputer/console@dec48497)
oxidecomputer/console#2461
* [e46216aa](oxidecomputer/console@e46216aa)
oxidecomputer/console#2482
* [0d897efe](oxidecomputer/console@0d897efe)
oxidecomputer/console#2479
* [f88790db](oxidecomputer/console@f88790db)
oxidecomputer/console#2478
* [d634c8f0](oxidecomputer/console@d634c8f0)
oxidecomputer/console#2477
* [eeaa14c3](oxidecomputer/console@eeaa14c3)
oxidecomputer/console#2475
* [5ece6e18](oxidecomputer/console@5ece6e18)
oxidecomputer/console#2467
* [4b699e01](oxidecomputer/console@4b699e01)
oxidecomputer/console#2448
* [9c9dc149](oxidecomputer/console@9c9dc149)
oxidecomputer/console#2465
* [1aa0fc9b](oxidecomputer/console@1aa0fc9b)
oxidecomputer/console#2463
* [57db4054](oxidecomputer/console@57db4054)
oxidecomputer/console#2462
* [da7fe328](oxidecomputer/console@da7fe328)
oxidecomputer/console#2460
* [e0d52efd](oxidecomputer/console@e0d52efd)
oxidecomputer/console#2437
* [1625d02a](oxidecomputer/console@1625d02a)
oxidecomputer/console#2458
* [fd82458e](oxidecomputer/console@fd82458e)
oxidecomputer/console#2457
* [7daaa337](oxidecomputer/console@7daaa337)
oxidecomputer/console#2453
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant