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: simplify Toggle component #6049

Merged
merged 1 commit into from
Dec 5, 2021

Conversation

lex111
Copy link
Contributor

@lex111 lex111 commented Dec 4, 2021

Motivation

Essentially icons prop is what's left of react-toggle we used earlier. So we don't need this one in our implementation at all, it just complicates the component code at this time.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Preview

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

@lex111 lex111 added the pr: polish This PR adds a very minor behavior improvement that users will enjoy. label Dec 4, 2021
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Dec 4, 2021
@netlify
Copy link

netlify bot commented Dec 4, 2021

✔️ [V2]
Built without sensitive environment variables

🔨 Explore the source changes: df3b099

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

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

@github-actions
Copy link

github-actions bot commented Dec 4, 2021

⚡️ Lighthouse report for the changes in this PR:

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

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

Copy link
Collaborator

@Josh-Cena Josh-Cena left a comment

Choose a reason for hiding this comment

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

Makes sense to me

@@ -103,6 +103,3 @@
justify-content: center;
width: 10px;
}
.toggle::before {
position: absolute;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this legacy code? Don't understand its effect before...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it's a meaningless code.

@Josh-Cena Josh-Cena merged commit 58720c9 into facebook:main Dec 5, 2021
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: polish This PR adds a very minor behavior improvement that users will enjoy.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants