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

Remove react-day-picker #6638

Merged
merged 5 commits into from
Jan 6, 2025
Merged

Remove react-day-picker #6638

merged 5 commits into from
Jan 6, 2025

Conversation

tjmw
Copy link
Member

@tjmw tjmw commented Dec 17, 2024

What are you doing in this PR?

Remove react-day-picker NPM package and replace with our own implementation. and the method which uses it (it's no longer needed, as it was only ever used for Digipack Gift subs which we no longer support).

Trello Card

Why are you doing this?

The version of react-day-picker we're on is 5 years old, and the interface has changed. The only code paths which use it are no longer needed.

How to test

I took this approach:

1. Make the existing method (which does use react-day-picker) testable, by allowing passing in now
2. Add some tests
3. Update the method, removing react-day-picker and ensure tests still pass

How can we measure success?

Have we considered potential risks?

Accessibility test checklist

Screenshots

Copy link
Contributor

github-actions bot commented Dec 17, 2024

Size Change: -53.9 kB (-2.41%)

Total Size: 2.19 MB

Filename Size Change
./public/compiled-assets/javascripts/[countryGroupId]/router.js 258 kB -8.55 kB (-3.21%)
./public/compiled-assets/javascripts/digitalSubscriptionLandingPage.js 227 kB -9.54 kB (-4.03%)
./public/compiled-assets/javascripts/paperSubscriptionCheckoutPage.js 166 kB -9.05 kB (-5.17%)
./public/compiled-assets/javascripts/subscriptionsRedemptionPage.js 118 kB -8.74 kB (-6.89%)
./public/compiled-assets/javascripts/supporterPlusLandingPage.js 299 kB -9.04 kB (-2.93%)
./public/compiled-assets/javascripts/weeklySubscriptionCheckoutPage.js 163 kB -8.98 kB (-5.23%)
ℹ️ View Unchanged
Filename Size
./public/compiled-assets/javascripts/[countryGroupId]/events/router.js 90.1 kB
./public/compiled-assets/javascripts/ausMomentMap.js 108 kB
./public/compiled-assets/javascripts/contributionsRedirectStyles.js 20 B
./public/compiled-assets/javascripts/downForMaintenancePage.js 70.7 kB
./public/compiled-assets/javascripts/error404Page.js 70.7 kB
./public/compiled-assets/javascripts/error500Page.js 70.6 kB
./public/compiled-assets/javascripts/favicons.js 617 B
./public/compiled-assets/javascripts/paperSubscriptionLandingPage.js 87.5 kB
./public/compiled-assets/javascripts/payPalErrorPage.js 69 kB
./public/compiled-assets/javascripts/payPalErrorPageStyles.js 20 B
./public/compiled-assets/javascripts/promotionTerms.js 73.6 kB
./public/compiled-assets/javascripts/subscriptionsLandingPage.js 72.9 kB
./public/compiled-assets/javascripts/unsupportedBrowserStyles.js 20 B
./public/compiled-assets/javascripts/weeklySubscriptionLandingPage.js 87.7 kB
./public/compiled-assets/webpack/136.js 2.17 kB
./public/compiled-assets/webpack/187.js 21.6 kB
./public/compiled-assets/webpack/344.js 2.01 kB
./public/compiled-assets/webpack/643.js 22.4 kB
./public/compiled-assets/webpack/706.js 107 kB

compressed-size-action

Copy link
Contributor

@andrewHEguardian andrewHEguardian left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Copy link
Member

@rupertbates rupertbates left a comment

Choose a reason for hiding this comment

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

Good idea

Copy link
Contributor

@andrewHEguardian andrewHEguardian left a comment

Choose a reason for hiding this comment

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

Even better

tjmw added 5 commits January 6, 2025 14:11
Now we're no longer using it.
It was only ever called from checkGiftStartDate, which we were only
using for Digipack Gift subs, which we don't support any more.
@tjmw tjmw force-pushed the tw/remove-react-day-picker branch from e9b2a19 to 72eac18 Compare January 6, 2025 14:13
@tjmw tjmw merged commit 5b274e0 into main Jan 6, 2025
19 checks passed
@tjmw tjmw deleted the tw/remove-react-day-picker branch January 6, 2025 14:27
@prout-bot
Copy link

Seen on PROD (merged by @tjmw 10 minutes and 45 seconds ago)

Sentry Release: support-client-side, support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants