Skip to content

Conversation

ChristianBusshoff
Copy link
Contributor

Relates to #1714

  • added InlinePagination

  • added tests

  • didn't implement Keyboard-control via left, right cause of aria-pattern

@ChristianBusshoff ChristianBusshoff requested a review from a team as a code owner October 21, 2025 11:06
Copy link

changeset-bot bot commented Oct 21, 2025

🦋 Changeset detected

Latest commit: 2f21374

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
sit-onyx Minor
@sit-onyx/chartjs-plugin Major
@sit-onyx/nuxt Major
@sit-onyx/vitepress-theme Major

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 bot and others added 2 commits October 21, 2025 13:31
This is an auto-generated pull request. All Playwright screenshots have
been updated.

Co-authored-by: ChristianBusshoff <[email protected]>
Copy link
Collaborator

@larsrickert larsrickert left a comment

Choose a reason for hiding this comment

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

Well done 👍

Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice to have: Currently the skeleton is defined to have a fixed with in Figma. Imo it would be nice if the skeleton has the same width as the "default" variant here in the screenshot (considering density) so the layout does not jump around. Should we clarify this with UX?

Comment on lines +21 to +25
/**
* The display mode of the pagination
* @default select
*/
mode?: OnyxPaginationModes;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
/**
* The display mode of the pagination
* @default select
*/
mode?: OnyxPaginationModes;
/**
* The display mode of the pagination
* @default select
*/
type?: PaginationType;

Would prefer naming it "type" here :) It think thats more aligned with other components + Figma

"previous": "vorherige Seite",
"next": "nächste Seite",
"buttonLabel": "Seite {page}",
"ellipsis": "Weitere Seiten",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
"ellipsis": "Weitere Seiten",
"morePages": "Weitere Seiten",

Would prefer to name the key after what it describes, not how its displayed visually in the component :)

<template>
<OnyxInlinePagination
v-if="props.mode === 'inline'"
v-bind="selectPaginationProps"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
v-bind="selectPaginationProps"
v-bind="paginationProps"

We no longer use it only for the select now ;)

Copy link
Collaborator

Choose a reason for hiding this comment

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

(optional) It might be cleaner to define separate screenshot tests for select and inline so we don't need to use several conditions to use either one setup or the other :)
Also it might be easier this way if we add the "compact" pagination in the future

>
<OnyxIcon :icon="iconChevronLeftSmall" />
</button>
<template v-for="pageNumber in displayPagesNumbers" :key="`page-${pageNumber}`">
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
<template v-for="pageNumber in displayPagesNumbers" :key="`page-${pageNumber}`">
<template v-for="pageNumber in displayPagesNumbers" :key="pageNumber">

Is there a reason for the custom key?

:class="['onyx-pagination__inline__ellipsis']"
:aria-label="t('pagination.ellipsis')"
>
<span aria-hidden="true">&hellip;</span>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
<span aria-hidden="true">&hellip;</span>
<span aria-hidden="true">...</span>

Why don't we use regular dots?

:aria-label="t('pagination.ellipsis')"
>
<span aria-hidden="true">&hellip;</span>
<OnyxVisuallyHidden>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice 👍

Comment on lines +158 to +163
border-radius: var(--onyx-radius-sm) 0 0 var(--onyx-radius-sm);
border-left: var(--onyx-pagination-border-size) solid
var(--onyx-color-component-border-neutral);
}
&:last-of-type {
border-radius: 0 var(--onyx-radius-sm) var(--onyx-radius-sm) 0;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
border-radius: var(--onyx-radius-sm) 0 0 var(--onyx-radius-sm);
border-left: var(--onyx-pagination-border-size) solid
var(--onyx-color-component-border-neutral);
}
&:last-of-type {
border-radius: 0 var(--onyx-radius-sm) var(--onyx-radius-sm) 0;
border-radius: var(--onyx-pagination-border-radius) 0 0 var(--onyx-pagination-border-radius);
border-left: var(--onyx-pagination-border-size) solid
var(--onyx-color-component-border-neutral);
}
&:last-of-type {
border-radius: 0 var(--onyx-pagination-border-radius) var(--onyx-pagination-border-radius) 0;

Since we use the border radius more than 1 time, I'd prefer to add a new CSS variable for this so its easier to adjust the value in the future

mode?: OnyxPaginationModes;
};

export type OnyxPaginationModes = "select" | "inline";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Imo we should talk with UX about aligning the property values with Figma. I'd prefer using select and inline instead of modern and classic so we name the types after what they are, not how they might be used. Also thats less opinionated about the usage

Image

@larsrickert larsrickert self-assigned this Oct 22, 2025
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.

2 participants