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: remove deprecated code #529

Merged
merged 13 commits into from
Jan 28, 2020
Merged

feat: remove deprecated code #529

merged 13 commits into from
Jan 28, 2020

Conversation

connor-baer
Copy link
Member

@connor-baer connor-baer commented Jan 21, 2020

Addresses #469.

Purpose

Remove all components and other code that were deprecated in v1.2 (#470).

Approach and changes

  • The RestrictedInput has been removed.
  • The State component has been removed. Use React's useState hook instead.
  • The RadioButton and Switch components no longer accept the onToggle prop. Use the onChange prop instead.
  • The Input component no longer accepts *ClassName props. Emotion 10 uses style objects instead of class names. Use the *Styles props instead.
  • The Heading, SubHeading, Text, and Input components no longer accept the element prop. Emotion 10 introduced the ability to change the HTML element. Use the as prop instead.
  • The SvgButton component has been renamed to IconButton.
  • The SideNav component has been removed. Use the Sidebar component instead.
  • The Picture component has been removed.
  • The MaskedInput component has been removed. Use react-text-mask directly instead.
  • The Markdown component has been removed. Use markdown-to-jsx directly instead.
  • The CreditCardDetails, CardNumberInput, NameOnCardInput, SecurityCodeInput, ExpiryDateInput, and the credit card utils have been removed. Use SumUp's card widget instead.
  • The ListView component has been renamed to CardList.
  • The GlobalStyles component has been renamed to BaseStyles. It no longer accepts a custom prop, use Emotion's Global component instead.

Definition of done

  • Development completed
  • Reviewers assigned
  • Unit and integration tests
  • Meets minimum browser support
  • Meets accessibility requirements

@codecov
Copy link

codecov bot commented Jan 21, 2020

Codecov Report

Merging #529 into alpha will increase coverage by 13.3%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##            alpha     #529      +/-   ##
==========================================
+ Coverage   79.79%   93.09%   +13.3%     
==========================================
  Files         188      154      -34     
  Lines        3256     2462     -794     
  Branches      887      687     -200     
==========================================
- Hits         2598     2292     -306     
+ Misses        542      139     -403     
+ Partials      116       31      -85
Impacted Files Coverage Δ
.../components/PaymentMethodIcon/PaymentMethodIcon.js 92.85% <ø> (ø) ⬆️
src/components/Portal/Portal.js 5.88% <ø> (-2.69%) ⬇️
src/components/Input/Input.js 100% <ø> (ø) ⬆️
src/components/CardSchemes/card-scheme-icons.js 100% <ø> (ø)
src/components/BaseStyles/BaseStyles.js 100% <100%> (ø) ⬆️
src/components/SubHeading/SubHeading.js 100% <100%> (ø) ⬆️
...ponents/SimpleCurrencyInput/SimpleCurrencyInput.js 100% <100%> (ø) ⬆️
src/components/Text/Text.js 100% <100%> (ø) ⬆️
src/components/Heading/Heading.js 100% <100%> (ø) ⬆️
src/components/BaseStyles/BaseStylesService.js 100% <100%> (ø) ⬆️
... and 5 more

@vercel
Copy link

vercel bot commented Jan 21, 2020

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/sumup-oss/circuit-ui/88gh7slcv
✅ Preview: https://circuit-ui-git-feature-remove-components.sumup-oss.now.sh

@larimaza
Copy link
Contributor

giphy

Copy link
Contributor

@herberthenrique herberthenrique left a comment

Choose a reason for hiding this comment

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

🔥

@herberthenrique
Copy link
Contributor

200w_d

Copy link
Contributor

@hleote hleote left a comment

Choose a reason for hiding this comment

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

LGTM 👍 💯
Storybook runs fine.
Noticed that we have 38 snapshot tests failing....

Screenshot 2020-01-28 at 11 55 28

Is that normal? Don't you push the new snapshots when stuff is changed?

@connor-baer
Copy link
Member Author

@hleote Yes, we always push updates to snapshot files. They’re also checked in CI and since the pipeline ran successfully for this PR, I’m guessing it’s something on your local machine.

Did you update your node modules? Which version of Node are you using?

BREAKING CHANGE:
GlobalStyles has been renamed to BaseStyles. It no longer accepts a `custom` prop, use Emotion's
Global component instead.
BREAKING CHANGE:
ListView has been renamed to CardList.
BREAKING CHANGE:
CreditCardDetails, CardNumberInput, NameOnCardInput, SecurityCodeInput, ExpiryDateInput, and the
credit card utils have been removed. Use SumUp's card widget instead:
https://developer.sumup.com/docs/widgets-card-v2
BREAKING CHANGE:
Markdown has been deprecated.
BREAKING CHANGE:
MaskedInput has been deprecated. Use react-text-mask directly instead:
https://www.npmjs.com/package/react-text-mask
BREAKING CHANGE:
Picture has been removed.
BREAKING CHANGE:
SideNav has been deprecated. Use the Sidebar component instead.
BREAKING CHANGE:
SvgButton has been renamed to IconButton
BREAKING CHANGE:
Heading, SubHeading, and Text no longer accept the `element` prop. Emotion 10 introduced the ability
to change the HTML element. Use the "as" prop instead.
BREAKING CHANGE:
Input component no longer accept `className` props. Emotion 10 uses style objects instead of
classnames. Use the "inputStyles" prop instead.
…tch components

BREAKING CHANGE:
RadioButton and Switch no longer accept the "onToggle" prop. Use the "onChange" prop instead.
BREAKING CHANGE:
State has been deprecated. Use React's useState hook instead:
https://reactjs.org/docs/hooks-reference.html#usestate
BREAKING CHANGE:
RestrictedInput has been removed.
@github-actions
Copy link
Contributor

🎉 This PR is included in version 2.0.0-alpha.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@hleote
Copy link
Contributor

hleote commented Jan 28, 2020

@hleote Yes, we always push updates to snapshot files. They’re also checked in CI and since the pipeline ran successfully for this PR, I’m guessing it’s something on your local machine.

Did you update your node modules? Which version of Node are you using?

Using Node version 12.13.0.
Ok I will check it out it's probably something with my machine in that case 👍 🙂

@github-actions
Copy link
Contributor

github-actions bot commented Jun 8, 2020

🎉 This PR is included in version 2.0.0-beta.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link
Contributor

🎉 This PR is included in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

4 participants