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

fix(Button): button typing issues #2823

Merged
merged 29 commits into from
Feb 7, 2024
Merged

Conversation

dreamwasp
Copy link
Contributor

@dreamwasp dreamwasp commented Dec 19, 2023

Overview

Correct Button types to not be overly permissive

PR Checklist

  • Related to designs: no
  • Related to JIRA ticket: [GM-TBA]
  • 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

Testing Instructions

  1. Check that buttons still look the same in Storybook preview
  2. Check out this branch locally
  3. Uncomment the test code and see that the correct errors are reported by TS
  4. Profit ✨

PR Links and Envs

I will not be shipping this until the above are also reviewed + ready to ship

@dreamwasp dreamwasp changed the title fix button types fix button types (this may be the best option?) Dec 19, 2023
@dreamwasp dreamwasp changed the title fix button types (this may be the best option?) fix(Button): button ty[ing issues Jan 29, 2024
@dreamwasp dreamwasp changed the title fix(Button): button ty[ing issues fix(Button): button typing issues Jan 29, 2024
This reverts commit 8ebd730.
@dreamwasp dreamwasp marked this pull request as ready for review February 2, 2024 15:42
@dreamwasp dreamwasp requested a review from a team as a code owner February 2, 2024 15:42
| typeof StrokeButton
| typeof TextButton;

// export type ButtonComponentProps = ComponentProps<typeof FillButton>;
Copy link
Member

Choose a reason for hiding this comment

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

should this be removed?

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! will clean up

Copy link
Member

@jakemhiller jakemhiller left a comment

Choose a reason for hiding this comment

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

the changes look good! based on testing it out & the implementation PR this is a huge improvement in type safety! 🎊

@dreamwasp dreamwasp added the Ship It :shipit: Automerge this PR when possible label Feb 7, 2024
@codecademydev
Copy link
Collaborator

📬Published Alpha Packages:

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

@codecademydev codecademydev merged commit 4eefddf into main Feb 7, 2024
17 of 19 checks passed
@codecademydev codecademydev deleted the cass-web-1833-anchorbase branch February 7, 2024 20:47
@codecademydev codecademydev removed the Ship It :shipit: Automerge this PR when possible label Feb 7, 2024
@codecademydev
Copy link
Collaborator

🚀 Styleguide deploy preview ready!

https://65c3ec7cdf04a61df28cea48--gamut-preview.netlify.app

Deploy Logs

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