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(pagination): sync with @carbon/react v11 #10420

Merged

Conversation

IgnacioBecerra
Copy link
Contributor

@IgnacioBecerra IgnacioBecerra commented May 4, 2023

Related Ticket(s)

#10114

Description

This PR syncs the Pagination component to Carbon React v11. It now has built in cds-select functionality instead of forcing the adopter to introduce their own select component plus the custom select component. This also introduced the cds-button replacement for the pagination buttons, which also have tooltip features

Changelog

New

  • Buttons can now be used as tooltips

Changed

  • refactor the pagination component to make it easier to use for adopters
  • fixed a button tooltip where the tooltip didnt go away after mouseout

@IgnacioBecerra IgnacioBecerra marked this pull request as ready for review May 6, 2023 02:21
@IgnacioBecerra IgnacioBecerra requested a review from a team as a code owner May 6, 2023 02:21
@IgnacioBecerra IgnacioBecerra added package: web components Work necessary for the IBM.com Library web components package v2: prep preparation items for Carbon for IBM.com V2 package: carbon web components dev Needs some dev work and removed package: web components Work necessary for the IBM.com Library web components package labels May 6, 2023
@IgnacioBecerra IgnacioBecerra changed the title feat(pagination): syncing pagination feat(pagination): sync with @carbon/react v11 May 6, 2023
@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented May 8, 2023

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented May 8, 2023

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented May 8, 2023

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented May 8, 2023

@oliviaflory
Copy link
Contributor

@IgnacioBecerra overall this looks really good!

I caught a few style things, in all the screen shots below I posted our CWC first and React example second.

onClick & focus state of select

The select is changing background color to white in CWC on focus and onClick, but Carbon React doesn't seem to
Screenshot 2023-05-09 at 11 33 11 AM
Screenshot 2023-05-09 at 11 33 21 AM

Focus state of previous/next buttons

The white and gray 10 themes look like they have a white inner focus that isn't present in React
Screenshot 2023-05-09 at 11 40 34 AM
Screenshot 2023-05-09 at 11 40 41 AM

Tool tip

  • Our tool tip looks like it has some extra bottom padding or maybe just an extra return?
Screenshot 2023-05-09 at 11 33 38 AM Screenshot 2023-05-09 at 11 33 43 AM
  • It also looks like the React version might have a left alignment on the next button to prevent it from running off the viewport if the pagination is extended to the edge
Screenshot 2023-05-09 at 11 47 27 AM Screenshot 2023-05-09 at 11 46 54 AM

Gray 90 and Gray 100 theme icon color

Our icons are not using the correct color token in the dark themes, it should be $icon-01 (v10) or $icon-primary (v11)
Screenshot 2023-05-09 at 11 36 08 AM
Screenshot 2023-05-09 at 11 36 13 AM

Size knob

Small thing, but it might be confusing to call it "button size" in our Storybook knob vs React just says "size"
Screenshot 2023-05-09 at 11 39 45 AM

Playground story

If I enabled the last page knob it disables the Next page button even if there are more pages left. Idk what the exact expected behavior is because the React playground story seems broken (all the selects and buttons are disabled???)

It might be worth reaching out to Taylor or Lauren to find out what's going on with the React storybook and what the expected behavior is for this knob?
Screenshot 2023-05-09 at 11 54 58 AM

@IgnacioBecerra
Copy link
Contributor Author

@oliviaflory Man, I'm always so amazed you and Rich are able to notice these tiny things!! 😆

All the issues have been addressed, and as for the is-last-page knob, it's doing what its meant to. It's just a boolean that disables the next page button as it specifies the current page as the last, we used to have it in the earlier Storybook as well: https://web-components.carbondesignsystem.com/?path=/story/components-pagination--default

Copy link

@RichKummer RichKummer left a comment

Choose a reason for hiding this comment

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

Looks like Olivia's comments have been addressed – thanks @IgnacioBecerra ! 🚀

Copy link
Member

@kennylam kennylam left a comment

Choose a reason for hiding this comment

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

@IgnacioBecerra Looks great! Just a few small things.

@IgnacioBecerra
Copy link
Contributor Author

@kennylam Nice catch, addressed the comments!

Copy link
Member

@kennylam kennylam left a comment

Choose a reason for hiding this comment

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

LGTM!

@kennylam kennylam merged commit e71c8a4 into carbon-design-system:feat/cwc-v2 May 26, 2023
kennylam added a commit to kennylam/carbon-for-ibm-dotcom that referenced this pull request Dec 4, 2023
…0420)

* feat(pagination): syncing pagination

---------

Co-authored-by: kennylam <[email protected]>
kennylam added a commit to kennylam/carbon-for-ibm-dotcom that referenced this pull request Jun 11, 2024
…0420)

* feat(pagination): syncing pagination

---------

Co-authored-by: kennylam <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev Needs some dev work package: carbon web components v2: prep preparation items for Carbon for IBM.com V2
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants