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

chore(Pagination): remove navigation option #3013

Closed
wants to merge 1 commit into from

Conversation

jrood
Copy link
Contributor

@jrood jrood commented Jan 22, 2025

Overview

When attempting to upgrade framer-motion, improved type checking alerted us to the fact that we were trying to set href on a button when using isNavigation for Pagination. Upon searching the monorepo and monolith, no usage of the isNavigation prop was found. Thus, it seems reasonable to upblock the upgrade by just removing this feature.

PR Checklist

  • Related to designs:
  • Related to JIRA ticket: [ABC-123]
  • I have run this code to verify it works
  • This PR includes unit tests for the code change
  • This PR includes testing instructions tests for the code change
  • The alpha package of this PR is passing end-to-end tests in all relevant Codecademy repositories

PR Links and Envs

Repository PR Link PR Env
Monolith Monolith PR Monolith Env
Portal Monorepo PR Portal Env

Copy link

nx-cloud bot commented Jan 22, 2025

View your CI Pipeline Execution ↗ for commit ccbb4ff.


☁️ Nx Cloud last updated this comment at 2025-01-22 17:27:03 UTC

@codecademydev
Copy link
Collaborator

📬Published Alpha Packages:

@codecademy/[email protected]
@codecademy/[email protected]
@codecademy/[email protected]

@codecademydev
Copy link
Collaborator

🚀 Styleguide deploy preview ready!

https://67912a7d68c6af2f4fc2798e--gamut-preview.netlify.app

Deploy Logs

@jrood jrood marked this pull request as ready for review January 22, 2025 18:07
@jrood jrood requested a review from a team as a code owner January 22, 2025 18:07
Copy link
Contributor

@dreamwasp dreamwasp left a comment

Choose a reason for hiding this comment

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

for accessibility, our Pagination'Buttons' are polymorphic, so when they are provided a href they render as an a element (you'll see this in the Gamut page for Pagination if you inspect the isNavigation example). i can help with the framer-motion upgrades, the types can get pretty wacky with our more flexible components.

i will need to look into this more, but i find it hard to believe that none of our pagination components are used as navigation and this is likely just developer oversight... in the meantime, i'll cut a ticket to make the isNavigation no longer optional so folks are forced to think about it when using the component

@jrood
Copy link
Contributor Author

jrood commented Jan 23, 2025

Thanks @dreamwasp ! Yep, that's a good point. Maybe when developers have to think about which one to use, we'll discover places where we should be using isNavigation.

I had assumed that the type checking change after upgrading framer motion upgrade was an improvement, but perhaps it actually is a bug/failure to pick up on the HTMLAnchorElement | HTMLButtonElement union for ButtonBaseElements.

@jrood jrood closed this Jan 23, 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.

3 participants