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

refactor(theme-classic): extract common PaginatorNavLink component #6213

Merged
merged 5 commits into from
Dec 29, 2021

Conversation

Josh-Cena
Copy link
Collaborator

Motivation

Fix #6171.

  1. Extracted common PaginatorNavLink component.
  2. Refactored the props to make the component more standalone (since this is not backward compatible anyways)

Have you read the Contributing Guidelines on pull requests?

Yes

@Josh-Cena Josh-Cena added the pr: bug fix This PR fixes a bug in a past release. label Dec 29, 2021
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Dec 29, 2021
@netlify
Copy link

netlify bot commented Dec 29, 2021

✔️ [V2]

🔨 Explore the source changes: 28e1931

🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/61cbdb0beea2d30007f204b5

😎 Browse the preview: https://deploy-preview-6213--docusaurus-2.netlify.app

@github-actions
Copy link

github-actions bot commented Dec 29, 2021

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 88
🟢 Accessibility 98
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

Lighthouse ran on https://deploy-preview-6213--docusaurus-2.netlify.app/

@github-actions
Copy link

github-actions bot commented Dec 29, 2021

Size Change: 0 B

Total Size: 667 kB

ℹ️ View Unchanged
Filename Size
website/.docusaurus/globalData.json 40.1 kB
website/build/assets/css/styles.********.css 102 kB
website/build/assets/js/main.********.js 496 kB
website/build/index.html 29.6 kB

compressed-size-action

Copy link
Collaborator

@slorber slorber left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM 👍

import Link from '@docusaurus/Link';
import type {Props} from '@theme/PaginatorNavLink';

function PaginatorNavLink(props: Props): JSX.Element {
Copy link
Collaborator

Choose a reason for hiding this comment

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

not a big deal for now, but this is bad encapsulation that Infima is using a --next suffix in parent class to determine the position/direction of the arrow. This should be a props instead of a parent class, and this component should be self-sufficient to render properly without using any parent CSS

@slorber slorber added pr: bug fix This PR fixes a bug in a past release. and removed pr: bug fix This PR fixes a bug in a past release. labels Dec 29, 2021
@slorber slorber merged commit ae9f43f into main Dec 29, 2021
@slorber slorber deleted the jc/paginator-link branch December 29, 2021 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: bug fix This PR fixes a bug in a past release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Double next/prev arrow on blog post
3 participants